Provision an access token
POST/v1/tokens
Provisions a new access token. Either bind it to an account, or set permissions - an instance-wide token that is not narrowed reaches every account and every endpoint, so the API declines to mint one. A token can not mint one less restricted than itself: when the calling token has an address allowlist, a referrer allowlist, a rate limit or an expiry, the request has to repeat each of them at least as narrowly (addresses within its allowlist, referrers from its list, a rate no higher, an expiry no later), otherwise it is refused with 403.
Request
Responses
- 200
- 400
- 401
- 403
- 404
- 429
- 500
Returns the new token value. This is the only time it is shown - store it now.
Invalid input - the path parameters, query arguments, or request payload did not pass validation. Also returned when the email server refused the request, in which case the response carries a code and the server response instead of a field list
Authentication failed - the access token is missing, invalid, or was not accepted
Access denied - the access token does not grant permission for this operation (token scope, account, or IP address restriction)
Not found - the requested entity (account, message, mailbox, etc.) does not exist
Rate limit exceeded - too many requests were made with this access token
Internal server error - an unexpected error occurred while processing the request