Mail: API Tokens
Create API token
Create an API token for the given mail order. The token grants access to the Hostinger Email API, where you can provision and manage the mailboxes it is scoped to.
The plaintext token is returned only in this response, never again. A maximum of 10 tokens can exist per order. Use scope.has_all_mailboxes to cover all current and future mailboxes, or list specific mailboxes in scope.mailbox_ids.
post/api/mail/v1/orders/{orderId}/api-tokens
Path parameters
orderIdstring required
Example:OR1a2b3c4d5e6f7g
Order resource ID
Request body
Example request
{
"name": "CRM integration",
"scope": {
"mailbox_ids": [
"AC1a2b3c4d5e6f7g"
]
}
}Response
Created response
Example response
{
"id": "019683f8-1234-7abc-8def-0123456789ab",
"token": "4a6f8b2d1e9c3f7a0b5d8e2c4f1a7b3d9e6c2f8a1b4d7e0c3f6a9b2d5e8c1f4a",
"name": "CRM integration",
"scope": {
"mailboxes": [
{
"id": "AC1a2b3c4d5e6f7g",
"address": "user@example.com"
}
]
},
"created_at": "2026-05-05T12:00:00Z",
"type": "api_token"
}