Create API token

Create an API token of a specific type: one of client, admin, frontend, backend.

Authentication

Authorizationstring
API key needed to access this API
OR
AuthorizationBearer
API key needed to access this API, in Bearer token format

Request

createApiTokenSchema
CreateApiTokenSchema0objectRequired

Response headers

locationstring or null
The location of the newly created resource.

Response

The resource was successfully created.
secretstring
The token used for authentication.
tokenNamestring
A unique name for this particular token
typeenum
The type of API token
Allowed values:
projectslist of strings

The list of projects this token has access to. If the token has access to specific projects they will be listed here. If the token has access to all projects it will be represented as [*]

createdAtstringformat: "date-time"
When the token was created.
environmentstring or nullDefaults to development
The environment the token has access to.
projectstring or null
The project this token belongs to.
expiresAtstring or nullformat: "date-time"
The token's expiration date. NULL if the token doesn't have an expiration set.
seenAtstring or nullformat: "date-time"

When the token was last seen/used to authenticate with. NULL if the token has not yet been used for authentication.

aliasstring or null
Alias is no longer in active use and will often be NULL. It's kept around as a way of allowing old proxy tokens created with the old metadata format to keep working.

Errors