Skip to main content

createServiceAccountAccessToken

form schema

Create a scoped, time-limited access token for the authenticated service account.

Only service accounts can call this mutation — human accounts should use createPersonalAccessToken instead. Expiration is capped at 10 years (5,256,000 minutes).

The token field in the response contains the full bearer token value — it is only shown once. Store it securely before navigating away. If you lose it, revoke the token and create a new one.

Defaults to a 60-minute expiration if expiresInMinutes is not specified.

Example:

mutation {
createServiceAccountAccessToken(
organizationId: "my-org"
input: { name: "deploy-token", scopes: ["*"], expiresInMinutes: 525600 }
) {
result {
id
token
prefix
expiresAt
}
successful
messages { field message }
}
}
createServiceAccountAccessToken(
organizationId: ID!
input: CreateServiceAccountAccessTokenInput!
): AccessTokenWithValuePayload

Form Schema

This mutation supports dynamic form generation using JSON Schema.

Loading schema...

Arguments

createServiceAccountAccessToken.organizationId ● ID! non-null scalar {#organization-id}

Your organization's unique identifier.

createServiceAccountAccessToken.input ● CreateServiceAccountAccessTokenInput! non-null input {#input}

Create a scoped, time-limited access token for the authenticated service account.

Type

AccessTokenWithValuePayload object