Create a new API token scoped to this organization
POST
/api/v2/organizations/{organization}/tokens
const url = 'https://dashboard.quantcdn.io/api/v2/organizations/test-org/tokens';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"name":"My CI token","preset":"content_management","scopes":["projects:read","content:write"],"projects":[1],"expires_in":"30d"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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" }'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”organization
required
string
Organization identifier
Example
test-orgRequest Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
name
required
Name for the token
string
Example
My CI tokenpreset
Preset scope bundle
string
Example
content_managementscopes
Individual scopes (mutually exclusive with preset)
Array<string>
Example
[ "projects:read", "content:write"]projects
Project IDs to restrict this token to
Array<integer>
expires_in
Token expiration period
string
Example
90dResponses
Section titled “Responses”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>
projects
Array<integer>
preset
string
expires_at
string format: date-time
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}