Endpoint:
PUT https://api.mailjet.com/v1/rest/labels/:id You can update a label using this endpoint. The label is identified by its unique ID, and you can update its name and color.
URL Parameters:
id = The ID of the label.
| Name | Type | Description |
|---|---|---|
Name | string | Must be unique. |
Color | string | Should be a valid hexadecimal color (e.g., #FFFFFF) |
curl --request PUT \
--url https://api.mailjet.com/v1/rest/labels/5 / \
--header 'Authorization: Bearer 612d5125131d406081abb9cd2afdc4e3' \
--header 'Content-Type: application/json' \
--data '{
"Name": "Dog images",
}'Status code: 200
| Name | Type | Description |
|---|---|---|
ID | integer | The ID of the label. |
Name | string | The name of the label. |
Color | string | The hexidecimal color of the label. |
UsedFor | string | Indicates if the label is used for a template (resource) or an image. |
{
"Count": 1,
"Total": 1,
"Data": [
{
"ID": 5,
"OrganisationID": 2,
"Name": "Dog images",
"Color": "#FFFFFF",
"UsedFor": "image"
}
}