Deployment Tokens

Create a new deployment token for a project

post/projects/{project_id}/deployment-tokens

Request

  • Base URL: /api (relative, and the document was published on a file host, not at the API’s origin)
  • URL: /api/projects/{project_id}/deployment-tokens
  • Auth: HTTP bearer

Path parameters

project_idinteger required

Project ID

Request body

deployment_idinteger nullable

Optional deployment ID - if set, token is scoped to a specific deployment

environment_idinteger nullable

Optional environment ID - if not set, token applies to all environments

expires_atstring date-time nullable
namestring required
permissionsstring[] nullable

List of permissions (e.g., ["visitors:enrich", "emails:send"]) If not provided, defaults to full access

Example request

{
  "expires_at": "2024-12-31T23:59:59Z",
  "permissions": [
    "visitors:enrich",
    "emails:send"
  ]
}

Response

Deployment token created successfully

created_atstring date-time required
deployment_idinteger nullable
environment_idinteger nullable
expires_atstring date-time nullable
idinteger required
namestring required
permissionsstring[] nullable
project_idinteger required
tokenstring required

The full token value - only returned on creation

token_prefixstring required

Example response

{
  "created_at": "2024-01-01T00:00:00Z",
  "expires_at": "2024-12-31T23:59:59Z"
}

Changes

No recorded changes to this operation across all 50 revisions of this API.