Admiral
User

Update a personal access token

PATCH
/v1/user/tokens/{token_id}

Scope: token:write

Authorization

bearerAuth
AuthorizationBearer <token>

Personal Access Token (PAT) or Service Access Token (SAT). Pass the token in the Authorization header: Bearer admp_...

In: header

Path Parameters

token_id*token_id

The unique identifier of the key to update (UUID).

Formatuuid

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

UpdateApiKeyRequest contains the fields to update on an API key. Only provided fields are updated; omitted fields remain unchanged.

Response Body

application/json

curl -X PATCH "https://example.com/v1/user/tokens/497f6eca-6276-4993-bfeb-53cbbbba6f08" \  -H "Content-Type: application/json" \  -d '{}'
{  "api_key": {    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",    "tenant_id": "34f5c98e-f430-457b-a812-92637d0c6fd0",    "name": "string",    "key_prefix": "string",    "scopes": [      "string"    ],    "status": "API_KEY_STATUS_UNSPECIFIED",    "binding_type": "BINDING_TYPE_UNSPECIFIED",    "binding_id": "string",    "expires_at": "2023-01-15T01:30:15.01Z",    "last_used_at": "2023-01-15T01:30:15.01Z",    "revoked_at": "2023-01-15T01:30:15.01Z",    "created_by": {      "id": "string",      "display_name": "string",      "email": "string"    },    "created_at": "2023-01-15T01:30:15.01Z"  }}