Skip to Content
veriom

Deactivate workspace API token

Stop an API token authenticating until it is reactivated. The token keeps its secret, and requests made with it answer 401 with code `api_token_inactive`. Revoked or expired tokens answer 409. Like revocation, it requires an Admin browser session with a recent step-up.

POST
/v1/workspaces/{workspace_id}/api-tokens/{token_id}/deactivate

Stop an API token authenticating until it is reactivated.

The token keeps its secret, and requests made with it answer 401 with code api_token_inactive. Revoked or expired tokens answer 409. Like revocation, it requires an Admin browser session with a recent step-up.

Authorization

workspaceToken
headerAuthorizationBearer <vat_<opaque-token>>

Expiring, hashed workspace token with explicit scopes.

Path Parameters

workspace_id*Workspace Id
Formatuuid
token_id*Token Id
Formatuuid

Response Body

Successful Response

application/json
  1. response
created_at*Created At
Formatdate-time
created_by*

The member a token authenticates as.

deactivated_at*|null
expires_at*Expires At
Formatdate-time
id*Id
Formatuuid
last_used_at*|null
name*Name
prefix*Prefix
revoked_at*|null
scopes*array<string>
status*Status

revoked and expired are final. inactive tokens were deactivated and do not authenticate until they are reactivated.

Value in"active""inactive""expired""revoked"
Example Request
curl -X POST 'https://api.veriom.ai/v1/workspaces/497f6eca-6276-4993-bfeb-53cbbbba6f08/api-tokens/497f6eca-6276-4993-bfeb-53cbbbba6f08/deactivate'
Example Response
{  "created_at": "2019-08-24T14:15:22Z",  "created_by": {    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",    "name": "string"  },  "deactivated_at": "2019-08-24T14:15:22Z",  "expires_at": "2019-08-24T14:15:22Z",  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "last_used_at": "2019-08-24T14:15:22Z",  "name": "string",  "prefix": "string",  "revoked_at": "2019-08-24T14:15:22Z",  "scopes": [    "string"  ],  "status": "active"}