Endpoint:
GET https://api.mailjet.com/v1/rest/labels You can retrieve a list of your labels using this endpoint.
Sort is available for Name. Default: ID ASC
| Name | Type | Description |
|---|---|---|
Name | string | Search by the name of the label. |
IDs | array of integers | Search using an array of label IDs. |
UsedFor | string | Specify if you want to retrieve labels for images or templates (resource). Possible values are image or resource. You cannot retrieve both in one request. Default: resource |
curl --request GET \
--url https://api.mailjet.com/v1/rest/labels?Limit=3&Sort=name%20asc,id%20asc&UsedFor=image' / \
--header 'Authorization: Bearer 612d5125131d406081abb9cd2afdc4e3'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": 2,
"Total": 2,
"Data": [
{
"ID": 6,
"OrganisationID": 2,
"Name": "Cat images",
"Color": "#FFFFFF",
"UsedFor": "image"
},
{
"ID": 7,
"OrganisationID": 2,
"Name": "Cat images 2",
"Color": "#FFFFFF",
"UsedFor": "image"
}
]
}Endpoint:
GET https://api.mailjet.com/v1/rest/labels/:id You can retrieve a single label using this endpoint. The label is identified by its unique ID.
URL Parameters:
id = The ID of the label.
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": "Cat images",
"Color": "#FFFFFF",
"UsedFor": "image"
}]
}