developer

Create a personal access token

Creates a new PAT and returns the plaintext token once. Store it securely - it cannot be retrieved again. JWT only - PATs cannot create other PATs.

post/api-tokens

Request

  • Base URL: https://api.onplana.com/api
  • URL: https://api.onplana.com/api/api-tokens
  • Auth: HTTP bearer

Request body

namestring required
organizationIdstring uuid required
scopesstring[] required
expiresAtstring date-time

Optional expiry (ISO 8601)

Example request

{
  "name": "CI/CD deployment token"
}

Response

Token created - plaintext returned once

idstring uuid required
namestring required

Human-readable label for this token

tokenPrefixstring required

First 12 chars of the token (e.g. "pat_AbCdEfGh") - safe to display

scopesstring[] required
organizationIdstring uuid required
orgPlanstring

Plan snapshot at creation time

expiresAtstring date-time nullable
lastUsedAtstring date-time nullable
createdAtstring date-time required
tokenstring required

Plaintext token - shown ONCE; save it immediately.

warningstring required

Changes

No recorded changes to this operation across all 1 revision of this API.