1. Overview
When reporting an alert, you can attach images via theimages field of a Standard Alert to display alert-related screenshots in the frontend and in Feishu/DingTalk app notifications. The src of each image in images accepts two kinds of values:
- A publicly accessible image URL starting with
http/https; - An
image_keyreturned by this API after uploading an image.
image_key, then reference that key when reporting the alert. The workflow is:
- Call the image upload API to upload the image file and obtain an
image_key; - When reporting a standard alert, put the
image_keyintoimages[].src; - While processing the alert, Flashduty resolves the
image_key, associates the image with the alert, and persists it for display.
Image upload and standard alert reporting share the same integration key (
integration_key). Use the push key you obtained from a Standard Alert (or any other) integration — no separate provisioning is required.2. API Specification
Request Method
POST, Content-Type:
multipart/form-dataRequest URL
{api_host} is the Flashduty endpoint domain, which defaults to https://api.flashcat.cloud on the public cloud and matches your alert push URL.Request Parameters
Query parameters:
Form-data parameters:
Supported image formats:
Response
Data:
Error:
Code:
Rate Limits
To keep the service stable, image upload is rate-limited per account:- Up to
5requests per second per account; - Up to
50requests per minute per account.
RequestTooFrequently (HTTP 429).
3. Example
Request:4. Referencing the Image in an Alert
Once you have theimage_key, put it into the src field of an image in the images array when reporting a Standard Alert:
images array and the image struct, see Standard Alert - image struct.
- In
images[].src,image_keyis limited to256characters; anything longer is discarded. - An uploaded image is stored temporarily at first and is promoted to long-term storage only after it is referenced by an alert. Use the
image_keyin an alert report promptly after uploading.
5. FAQ
-
What happens if I upload the same image twice?
- Images are deduplicated by content. Uploading byte-identical images returns the same
image_keyand does not consume extra storage.
- Images are deduplicated by content. Uploading byte-identical images returns the same
-
Can I use a public image URL directly?
- Yes. If the image already has a public
http/httpsURL, there is no need to upload it — just put the URL intoimages[].src. The image upload API is only for images without a public URL.
- Yes. If the image already has a public
-
Can an image_key be used across accounts?
- No. An
image_keyis bound to the account of theintegration_keyused at upload time and is valid only within that same account.
- No. An