Skip to content

Create a new API token scoped to this organization

POST
/api/v2/organizations/{organization}/tokens
curl --request POST \
--url https://dashboard.quantcdn.io/api/v2/organizations/test-org/tokens \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "name": "My CI token", "preset": "content_management", "scopes": [ "projects:read", "content:write" ], "projects": [ 1 ], "expires_in": "30d" }'
organization
required
string

Organization identifier

Example
test-org
Media typeapplication/json
object
name
required

Name for the token

string
Example
My CI token
preset

Preset scope bundle

string
nullable
Example
content_management
scopes

Individual scopes (mutually exclusive with preset)

Array<string>
nullable
Example
[
"projects:read",
"content:write"
]
projects

Project IDs to restrict this token to

Array<integer>
nullable
expires_in

Token expiration period

string
nullable
Allowed values: 30d 90d 365d never
Example
90d

Token created. The plain token is returned once and cannot be retrieved again.

Media typeapplication/json
object
token

The plain text token (shown once)

string
id

Token ID

integer
name
string
scopes
Array<string>
nullable
projects
Array<integer>
nullable
preset
string
nullable
expires_at
string format: date-time
nullable
created_at
string format: date-time
Examplegenerated
{
"token": "example",
"id": 1,
"name": "example",
"scopes": [
"example"
],
"projects": [
1
],
"preset": "example",
"expires_at": "2026-04-15T12:00:00Z",
"created_at": "2026-04-15T12:00:00Z"
}

Bad request.

Media typeapplication/json
object
message
required

Error message

string
error
required

Error flag

boolean
Example
{
"message": "The requested resource was not found",
"error": true
}

Access is forbidden.

Media typeapplication/json
object
message
required

Error message

string
error
required

Error flag

boolean
Example
{
"message": "The requested resource was not found",
"error": true
}

Validation error.

Media typeapplication/json
object
message
required

Error message

string
error
required

Error flag

boolean
Example
{
"message": "The requested resource was not found",
"error": true
}