Skip to main content

createPersonalAccessToken

form schema

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

Only human accounts can call this mutation — service accounts should use createServiceAccountAccessToken instead. Expiration is capped at 1 year (525,600 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 {
createPersonalAccessToken(
organizationId: "my-org"
input: { name: "local-cli", scopes: ["*"], expiresInMinutes: 43200 }
) {
result {
id
token
prefix
expiresAt
}
successful
messages { field message }
}
}
createPersonalAccessToken(
organizationId: ID!
input: CreatePersonalAccessTokenInput!
): AccessTokenWithValuePayload

Form Schema

This mutation supports dynamic form generation using JSON Schema.

Loading schema...

Arguments

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

Your organization's unique identifier.

createPersonalAccessToken.input ● CreatePersonalAccessTokenInput! non-null input {#input}

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

Type

AccessTokenWithValuePayload object