Skip to main content
DELETE
Delete tokens

Authorizations

Authorization
string
header
required

Get access to data with your API token. Example header:

Authorization: Bearer 2991e2fb4b540fe75b8f90677b0b892b6314e4961cb001fe6eb452eee248a628

The token can be provisioned from the Tokens section in your Settings, and requires explicitly enabling Web API access.

Path Parameters

deploymentId
integer<int64>
required

The unique numerical identifier for the deployment.

Example:

1111

Query Parameters

purpose
enum<string>

Required. Only CLI and API tokens can be bulk-deleted through this RPC, so the value must be TOKEN_PURPOSE_CLI or TOKEN_PURPOSE_API. Other purposes (service tokens, etc.) are intentionally not deletable here. Which tokens to delete. Must be TOKEN_PURPOSE_CLI or TOKEN_PURPOSE_API. Required.

Available options:
TOKEN_PURPOSE_UNSPECIFIED,
TOKEN_PURPOSE_NONE,
TOKEN_PURPOSE_SMS,
TOKEN_PURPOSE_SCRAT,
TOKEN_PURPOSE_CLICK_TO_FIX,
TOKEN_PURPOSE_AI_SCAN,
TOKEN_PURPOSE_CLI,
TOKEN_PURPOSE_API
Example:

"TOKEN_PURPOSE_CLI"

roleFilter
enum<string>

Required when purpose is TOKEN_PURPOSE_API (API tokens span multiple roles, so the caller must pick one); must not be set for TOKEN_PURPOSE_CLI, which is role-uniform. Only delete tokens with this role, such as TOKEN_ROLE_MEMBER. Required when purpose is TOKEN_PURPOSE_API; must not be set for TOKEN_PURPOSE_CLI.

Available options:
TOKEN_ROLE_UNSPECIFIED,
TOKEN_ROLE_AGENT_CLI,
TOKEN_ROLE_WEBAPI,
TOKEN_ROLE_MEMBER
Example:

"TOKEN_ROLE_MEMBER"

Response

200 - application/json

OK

deletedCount
integer<int64>

The number of tokens that were deleted.

Example:

5