v17

latestOpenAPI 3.0.1raw.githubusercontent.com2026-07-08165682.0 MB
Service tokens

Create a service token

Create a new service token for the organization.

Authorization

A service token must have at least one of the following access in order to use this API endpoint:

Service Token Accesses write_service_tokens

post/organizations/{organization}/service-tokens

Path parameters

organizationstring required

The name of the organization

Request body

namestring

The name of the service token

ttlinteger

Time to live (in seconds) for the service token. The token will be invalid when TTL has passed

Response

Returns the created service token with the plaintext token

idstring required

The ID of the service token

namestring nullable required

The name of the service token

display_namestring required

The display name of the service token

tokenstring nullable

The plaintext token. Available only after create.

plain_text_refresh_tokenstring nullable

The plaintext refresh token. Available only after create.

avatar_urlstring required

The image source for the avatar of the service token

created_atstring required

When the service token was created

updated_atstring required

When the service token was last updated

expires_atstring nullable required

When the service token will expire

last_used_atstring nullable required

When the service token was last used

actor_idstring nullable required

The ID of the actor on whose behalf the service token was created

actor_display_namestring nullable required

The name of the actor on whose behalf the service token was created

actor_typestring nullable required

The type of the actor on whose behalf the service token was created