Skip to content
Last updated

List of Image Metadata

Endpoint:

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

Retrieve metadata for multiple images, including details such as image ID, status, name, and label IDs. This endpoint can be useful for retrieving the URLs of images you would like to use in your templates.

Query Parameters

NameTypeDescription
IDstringThe ID of the image.
IDsarray of stringsAn array of image IDs.
IsStarredbooleanIndicates whether the image is marked as a favorite.
StatusstringAccepted values: "open" or "locked".
LabelIDsarray of integersAn array of IDs representing labels associated with the image or images.
NamestringThe name of the image.
PartialNamestring

Example Request

curl --request GET \
  --url https://api.mailjet.com/v1/rest/images \
  --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": 2,
    "Total": 2,
    "Data": [
        {
            "ID": "07ea8ad6-161a-4bfe-9f38-3311c9e38984",
            "OrganisationID": 2,
            "Name": "My Image",
            "Status": "open",
            "TargetContent": "image",
            "ImageSize": 425155,
            "ThumbnailSize": 0,
            "TotalSize": 425155,
            "LabelIDs": [],
            "IsStarred": false,
            "ImageUrl": "https://0abcd.mjt.lu/img2/0abcd/07ea8ad6-161a-4bfe-9f38-3311c9e38984/content",
            "ThumbnailUrl": null,
            "CreatedAt": "2024-05-06T07:32:41.262245Z",
            "UpdatedAt": "2024-05-06T07:32:41.262245Z",
            "ExpiresAt": "2024-11-23T00:00:00Z"
        },
        {
            "ID": "83732525-8a61-48b1-86ef-b54cac7aa897",
            "OrganisationID": 2,
            "Name": "My Other Image",
            "Status": "open",
            "TargetContent": "image",
            "ImageSize": 425155,
            "ThumbnailSize": 0,
            "TotalSize": 425155,
            "LabelIDs": [],
            "IsStarred": false,
            "ImageUrl": "https://0abcd.mjt.lu/img2/0abcd/83732525-8a61-48b1-86ef-b54cac7aa897/content",
            "ThumbnailUrl": null,
            "CreatedAt": "2024-04-16T14:29:54.182242Z",
            "UpdatedAt": "2024-04-16T14:29:54.182242Z",
            "ExpiresAt": "2024-11-03T00:00:00Z"
        },
    ]
}