Skip to main content

1. Overview

When reporting an alert, you can attach images via the images 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_key returned by this API after uploading an image.
When an image has no public URL, call the image upload API first to upload it and get an image_key, then reference that key when reporting the alert. The workflow is:
  1. Call the image upload API to upload the image file and obtain an image_key;
  2. When reporting a standard alert, put the image_key into images[].src;
  3. 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-data

Request 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 5 requests per second per account;
  • Up to 50 requests per minute per account.
Exceeding the limit returns RequestTooFrequently (HTTP 429).

3. Example

Request:
Success response:

4. Referencing the Image in an Alert

Once you have the image_key, put it into the src field of an image in the images array when reporting a Standard Alert:
For the full field definitions of the images array and the image struct, see Standard Alert - image struct.
  • In images[].src, image_key is limited to 256 characters; 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_key in an alert report promptly after uploading.

5. FAQ

  1. What happens if I upload the same image twice?
    • Images are deduplicated by content. Uploading byte-identical images returns the same image_key and does not consume extra storage.
  2. Can I use a public image URL directly?
    • Yes. If the image already has a public http/https URL, there is no need to upload it — just put the URL into images[].src. The image upload API is only for images without a public URL.
  3. Can an image_key be used across accounts?
    • No. An image_key is bound to the account of the integration_key used at upload time and is valid only within that same account.