projects
keys

Create a project key

Changed on

Create a new API key for a project. The plaintext key is only returned once in the response. Requires manage permission on the project and a user session: neither a user API key nor a deprecated user API token can create a project key.

post/v0/projects/{project}/keys

Request

  • The document declares no server URL.
  • Auth
    none declared

Path parameters

projectstring required

The slug or UUID for a project.

Request body

namestring required
ttlinteger nullable

The time-to-live (TTL) for the key in seconds. If not provided, the key will not expire for over 128 years.

Response

successful creation

creationstring date-time required
expirationstring date-time required
keystring required
namestring required
projectstring uuid required
uuidstring uuid required

Changes