API Tokens

Update Token

Rename a token, revoke it by setting status to revoked, or change its expiry with expires_at. A token that a detection setting uses cannot be revoked until that setting changes.

patch/api/v1/tokens/{token_id}

Request

Path parameters

token_idinteger required

Token ID

Request body

namestring nullable

New display name.

status'revoked' nullable

Set to revoked to revoke the token.

expires_atstring date nullable

The day the token stops working (UTC, YYYY-MM-DD only). Must be after today and at most 2 years ahead. null = never expires. Omit to keep the current expiry.

Response

Successful Response

idinteger required
namestring required
prefixstring required

First characters of the token, to recognize it. Not a secret.

owner_emailstring nullable
rolestring nullable

Role of the account that owns the token.

statusstring required

active, revoked or expired.

sourcestring required

user, api or otel.

expires_atstring date-time nullable

Expiry time, UTC.

created_atstring date-time required

Creation time, UTC.

last_used_atstring date-time nullable

Last time the token was used, UTC.

Changes

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