Skip to Content
veriom

Rename workspace API token

Rename an API token; its secret, scopes, expiry, and status are unchanged. Revoked tokens answer 409. Requires an Admin browser session with a recent step-up, and, as with rotation, only an Owner can rename a token created by another Owner or Admin.

PATCH
/v1/workspaces/{workspace_id}/api-tokens/{token_id}

Rename an API token; its secret, scopes, expiry, and status are unchanged.

Revoked tokens answer 409. Requires an Admin browser session with a recent step-up, and, as with rotation, only an Owner can rename a token created by another Owner or Admin.

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

Request Body

application/json
  1. body

Rename a workspace API token; its secret, scopes, and expiry are unchanged.

name*Name
Length1 <= length <= 255

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 PATCH 'https://api.veriom.ai/v1/workspaces/497f6eca-6276-4993-bfeb-53cbbbba6f08/api-tokens/497f6eca-6276-4993-bfeb-53cbbbba6f08' \  -H 'Content-Type: application/json' \  -d '{  "name": "string"}'
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"}