Create a project API token.

Endpoint that allows creation of project API tokens for the specified project.

Authentication

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

Path parameters

projectIdstringRequired

Request

createProjectApiTokenSchema
typestringRequiredformat: "^([Cc][Ll][Ii][Ee][Nn][Tt]|[Bb][Aa][Cc][Kk][Ee][Nn][Dd]|[Ff][Rr][Oo][Nn][Tt][Ee][Nn][Dd])$"

A client or frontend token. Must be one of the strings “client” (deprecated), “backend” (preferred over “client”) or “frontend” (not case sensitive).

tokenNamestringRequired
A unique name for this particular token
environmentstringOptionalDefaults to default
The environment that the token should be valid for. Defaults to "default".
expiresAtstringOptionalformat: "date-time"
The date and time when the token should expire. The date should be in ISO 8601 format.

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