token

post/api/tokens

Request body

expiresAtstring date-time nullable

Expiration date as a Unix timestamp (seconds since epoch)

namestring required

Name

ownerOrgstring uuid nullable

UUID of the organization that should own this token

ownerRepostring uuid nullable

UUID of the repository that should own this token

ownerUserstring uuid nullable

UUID of the user that should own this token. Can only ever be the creating user

permissionsTokenPermission[] required

Permissions

scope'all' | 'public' | 'selected'
scopeOrgsstring[]

UUIDs of the organizations to limit this token to

scopeReposstring[]

UUIDs of the repositories to limit this token to

tokenType'personal' | 'organization' | 'ci' | 'deploy' | 'runner' | 'instance' required

Response

Token created

secretstring required

Token secret, will not be shown ever again

Changes

Changed in 1 of the 3 revisions of this API.1