Tokens API — Types

NewToken

Returned when a new token is created. Contains the full (unredacted) token value.

FieldTypeDescription
unredactedTokenID!The full, unredacted token value. Only returned once at creation time — store it securely.
tokenToken!The full details of the created token
expiresInIntSeconds until the token expires. Null if the token never expires.
primaryScopeTokenScopeThe first scope attached to this token, if any. Null for tokens created without scopes (e.g., via createToken).

Token

An API token.

FieldTypeDescription
idID!Unique token ID
redactedTokenID!The redacted token value (e.g., abc1****5678)
descriptionString!Token description
createdByID!User ID of the token creator
createdAtTime!When the token was created
updatedAtTime!When the token was last updated
expiresAtTimeWhen the token expires (null = no expiration)
revokedAtTimeWhen the token was revoked (null = still active)
credentialIdIDID of the client credential that generated this token, if applicable. Null for tokens created directly via JWT.
scopes[TokenScope!]!Authorization scopes granted to this token
scopesHistory[TokenScopeAction!]!History of scope changes

TokenScope

An authorization scope granted to a token. Scopes determine which resources/APIs a token can access.

FieldTypeDescription
idID!Scope ID
tokenIDID!The token this scope belongs to
scopeTypeScopeType!The scope type
scopeKeyID!The scope key (e.g., company ID or plan ID)
createdAtTime!When the scope was added
deletedAtTimeWhen the scope was removed (null = still active)

TokenScopeAction

An audit record for scope changes.

FieldTypeDescription
idID!Record ID
tokenIdID!Token ID
scopeIdID!Scope ID
updatedByID!Who made the change
updatedAtTime!When the change was made
actionTokenScopeActionType!The action taken
scopeTokenScope!The scope that was affected

ClientCredential

A client ID/secret pair bound to one or more companies, used for programmatic token generation without JWT authentication.

FieldTypeDescription
idID!Unique credential ID
clientIdID!The client identifier used for authentication
redactedClientSecretString!The redacted client secret. The full secret is only returned at creation time.
companyIds[ID!]!The companies this credential is bound to
createdByID!User ID of the credential creator
createdAtTime!When the credential was created
updatedAtTime!When the credential was last updated
revokedAtTimeWhen the credential was revoked, if applicable
revokedByIDWho revoked the credential, if applicable
lastUsedAtTimeWhen this credential was last used to generate a token

NewClientCredential

Returned when a client credential is first created. The full client secret is only available at this time.

FieldTypeDescription
clientIdID!The client identifier
clientSecretID!The full client secret. Only returned once — store it securely.
credentialClientCredential!The full details of the created credential

Enums

ScopeType

The type of resource that can be authorized for a given token.

ValueDescription
COMPANYAccess to company-level resources (Catalog, Program Progress, Assessment Progress, Learning Plan Progress APIs)
PLAN_REPORTAccess to the Reports API for a specific learning plan report
CATALOG_COMPANYDeprecated — Use COMPANY instead. Legacy scope for catalog access.

TokenScopeActionType

ValueDescription
ADDA scope was added to the token
REMOVEA scope was removed from the token

Input Types

CreateTokenInput

FieldTypeRequiredDescription
descriptionString!YesDescription of the API token
expiresAtTimeNoOptional expiration date

AddTokenScopeInput

FieldTypeRequiredDescription
tokenIdID!YesThe token to add the scope to
scopeTypeScopeType!YesThe scope type
scopeKeyID!YesThe scope key

CreateClientCredentialInput

FieldTypeRequiredDescription
companyIds[ID!]!YesThe company IDs to bind this credential to
revokeExistingBooleanNoWhen true, revokes all existing active credentials that overlap with any of the specified company IDs before creating the new one. Defaults to false.

GenerateTokenInput

FieldTypeRequiredDescription
clientIdID!YesThe client ID of the credential
clientSecretString!YesThe client secret of the credential
companyIdIDNoThe company to generate a COMPANY-scoped token for. Required when the credential is bound to multiple companies; omit to default to the credential's only company.

Scalars

ScalarDescription
TimeDate and time formatted as RFC 3339 (e.g., 2025-06-15T10:00:00Z)