Endpoint:
PUT https://api.mailjet.com/v1/REST/images/:id
Update the metadata of an existing image using its unique ID. This endpoint allows you to modify the metadata of the image, such as the name, status and more.
Info
Only the metadata of the image can be updated through this endpoint, not the image file itself.
URL Parameters
id: The ID of the image.
| Name | Type | Description |
|---|---|---|
Name | string | The name of the image. |
Status | string | Accepted values: open or locked. |
LabelIDs | array of integers | An array of IDs representing labels associated with the image or images. |
IsStarred | boolean | Indicates whether the image is marked as a favorite. True = favorite. |
curl --request PUT \
--url https://api.mailjet.com/v1/data/images/a3da1de2-2319-44e9-9c75-e6a00a2ec5da \
--header 'Authorization: Bearer 612d5125131d406081abb9cd2afdc4e3' \
--header 'Content-Type: application/json' \
--data '{
"Name": "myotherimage"
}'Status code: 200
| Name | Type | Description |
|---|---|---|
ID | string | The ID of the image. |
Name | string | The name of the image. |
Status | string | Indicates whether the image is open or locked. |
TargetContent | string | Indicates the purpose of the image. Possible values: image, background, video or social. |
ImageSize | integer | The size of the image file in bytes. |
LabelIDs | array of integers | An array of IDs representing labels associated with the image. |
IsStarred | boolean | Indicates whether the image is marked as a favorite. |
ImageURL | string | The URL where the image is stored. |
ThumbnailUrl | string | The URL where the thumbnail is stored. |
CreatedAt | DateTime UTC | The date and time when the image was created. |
UpdatedAt | DateTime UTC | The date and time when the image was last updated. |
ExpiresAt | DateTime UTC | The date and time when the image will expire. |
{
"Count": 1,
"Total": 1,
"Data": [
{
"ID": "a3da1de2-2319-44e9-9c75-e6a00a2ec5da",
"OrganisationID": 2,
"Name": "myotherimage",
"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:20:14.461823Z",
"ExpiresAt": "2025-03-20T14:13:28.08024Z"
}
]
}