Create access token API Reference
const url = 'https://api.kupe.cloud/api/v1/tenants/acme/registries/registry/tokens';const options = { method: 'POST', headers: {Authorization: '<Authorization>', 'Content-Type': 'application/json'}, body: '{"access":"pull","displayName":"GitHub Actions","expiresInDays":90}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.kupe.cloud/api/v1/tenants/acme/registries/registry/tokens \ --header 'Authorization: <Authorization>' \ --header 'Content-Type: application/json' \ --data '{ "access": "pull", "displayName": "GitHub Actions", "expiresInDays": 90 }'Create an access token for the registry, for CI or anything else that pulls or pushes images
without a person signed in. access is pull, or push (which includes pull); expiresInDays is
1 to 365, default 90.
Authorizations
Section titled “ Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “ Path Parameters ”Tenant name
Registry name: always registry
Request Body
Section titled “ Request Body ”Access token
object
Pull, or push (which includes pull).
Example
pullA name to recognise the token by: 1 to 128 printable characters.
Example
GitHub ActionsDays until the token stops working: 1 to 365, default 90.
Example
90Responses
Section titled “ Responses ”Access token created; the secret is shown only here
object
Registry is the registry host to sign in to.
Secret is the password for the registry: 49 characters, returned once. Store it now; it cannot be retrieved again. Its format is published for secret scanning (see the security docs).
object
Phase is empty or Pending until the token is issued (seconds), then Ready.
Username is the registry username the token is issued under.
Example
{ "access": "pull", "createdAt": "2026-10-21T10:00:00Z", "createdBy": "alice@acme.com", "displayName": "GitHub Actions", "expiresAt": "2027-01-19T10:00:00Z", "id": "rt-0a1b2c3d4e5f6a7b", "kind": "token", "registry": "registry.kupe.cloud", "secret": "<shown once>", "status": { "phase": "Pending" }, "username": "kupe+acme+tok-0a1b2c3d4e5f6a7b"}Validation error, or an expiry out of range (code REGISTRY_TOKEN_EXPIRY_INVALID, field spec.expiresAt)
object
Example generated
{ "code": "example", "error": "example", "field": "example", "message": "example", "severity": "example"}Missing or invalid authentication
object
Example generated
{ "code": "example", "error": "example", "field": "example", "message": "example", "severity": "example"}Admin access required; the creator is no longer a member (code REGISTRY_TOKEN_CREATOR_NOT_MEMBER) or no longer an admin (code REGISTRY_TOKEN_PUSH_ADMIN_ONLY)
object
Example generated
{ "code": "example", "error": "example", "field": "example", "message": "example", "severity": "example"}Registry not found, or the registry is not enabled (code registries_unavailable)
object
Example generated
{ "code": "example", "error": "example", "field": "example", "message": "example", "severity": "example"}The registry already has 50 access tokens (code REGISTRY_TOKEN_LIMIT_REACHED), the registry is being deleted (code terminating), or the tenant is suspended (code tenant_suspended), awaiting a payment method (code payment_setup_required) or being deleted (code tenant_terminating)
object
Example generated
{ "code": "example", "error": "example", "field": "example", "message": "example", "severity": "example"}Rate limit exceeded
object
Example generated
{ "code": "example", "error": "example", "field": "example", "message": "example", "severity": "example"}