Skip to content
Last updated

Retrieve Image Metadata

Endpoint:

GET https://api.mailjet.com/v1/REST/images/:id

Retrieve metadata for a single image using its unique ID, including details such as the status, name, and label IDs.

URL Parameters

id: The ID of the image.

Example Request

curl --request GET \
  --url https://api.mailjet.com/v1/rest/images/a3da1de2-2319-44e9-9c75-e6a00a2ec5da \
  --header 'Authorization: Bearer 612d5125131d406081abb9cd2afdc4e3'

Status code: 200

Response Data Field Structure

NameTypeDescription
IDstringThe ID of the image.
NamestringThe name of the image.
StatusstringIndicates whether the image is open or locked.
TargetContentstringIndicates the purpose of the image. Possible values: image, background, video or social.
ImageSizeintegerThe size of the image file in bytes.
LabelIDsarray of integersAn array of IDs representing labels associated with the image.
IsStarredbooleanIndicates whether the image is marked as a favorite.
ImageURLstringThe URL where the image is stored.
ThumbnailUrlstringThe URL where the thumbnail is stored.
CreatedAtDateTime UTCThe date and time when the image was created.
UpdatedAtDateTime UTCThe date and time when the image was last updated.
ExpiresAtDateTime UTCThe date and time when the image will expire.

Example API Response

{
    "Count": 1,
    "Total": 1,
    "Data": [
        {
            "ID": "a3da1de2-2319-44e9-9c75-e6a00a2ec5da",
            "OrganisationID": 2,
            "Name": "My Image",
            "Status": "open",
            "TargetContent": "image",
            "ImageSize": 425155,
            "ThumbnailSize": 425155,
            "TotalSize": 850310,
            "LabelIDs": [],
            "IsStarred": false,
            "ImageUrl": "https://0abcd.mjt.lu/img2/0abcd/a3da1de2-2319-44e9-9c75-e6a00a2ec5da/content",
            "ThumbnailUrl": "https://0abcd.mjt.lu/img2/0abcd/a3da1de2-2319-44e9-9c75-e6a00a2ec5da/thumbnail",
            "CreatedAt": "2024-05-23T12:51:58.97041Z",
            "UpdatedAt": "2024-05-23T13:17:52.522524Z",
            "ExpiresAt": "2024-12-10T00:00:00Z"
        }
    ]
}