Endpoint:
PUT https://api.mailjet.com/v1/REST/tokens/id Updating a token allows you to modify its properties, such as its name or permissions, to reflect changes in your security policies or operational requirements. You should also use this endpoint to renew a token.
URL Parameters: `id' = The ID of the token.
| Name | Type | Description |
|---|---|---|
Name | string | Required. Name of the existing token. |
Permissions | array of strings | List of permissions assigned to the token. See full list of permissions. |
ExpiresAt | Date RFC3339 | Date at which the token expires |
curl --request PUT \
--url https://api.mailjet.com/v1/rest/tokens/1 \
--header 'Authorization: Bearer 612d5125131d406081abb9cd2afdc4e3' \
--header 'Content-Type: application/json' \
--data '{
"Permissions": [
"read_template_marketing",
"create-template_marketing",
"update_template_marketing"
],
"Name": "marketing team"
}'Status code: 200
| Name | Type | Description |
|---|---|---|
ID | integer | The ID of the token. |
Name | string | Required. A unique identifier for the token. |
Permissions | array of strings | List of permissions assigned to the token. See full list of permissions. |
ExpiresAt | Date RFC3339 | Date at which the token expires. |
CreatedAt | Date RFC3339 | Date on which the token was created. |
UpdatedAt | Date RFC3339 | Date on which the token was last updated. |
{
"Count": 1,
"Total": 1,
"Data": [
{
"ID": 32,
"UserID": 6,
"OrganisationID": 10,
"AccessToken": null,
"Name": "marketing team",
"Permissions": [
"read_template_marketing",
"create-template_marketing",
"update_template_marketing"
],
"CreatedAt": "2024-04-19T08:57:00.195202Z",
"UpdatedAt": "2024-04-19T10:16:20.290549Z"
}
]
}