Skip to main content
PATCH
/
api-keys
/
{id}
Rename or toggle an API key
curl --request PATCH \
  --url https://api.example.com/api/v1/api-keys/{id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "isActive": false
}
'
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "name": "My CRM Integration",
  "type": "branch",
  "keyPrefix": "sk_personal_Ab3x",
  "isActive": true,
  "lastUsedAt": "2023-11-07T05:31:56Z",
  "expiresAt": "2023-11-07T05:31:56Z",
  "createdAt": "2023-11-07T05:31:56Z",
  "updatedAt": "2023-11-07T05:31:56Z"
}

Authorizations

Authorization
string
header
required

Staff panel JWT access token

Path Parameters

id
string<uuid>
required

API key UUID

Body

application/json
name
string
Maximum string length: 100
Example:

"Renamed key"

isActive
boolean
Example:

false

Response

Updated API key

id
string<uuid>
name
string
Example:

"My CRM Integration"

type
enum<string>
Available options:
branch,
personal,
public
keyPrefix
string

First 20 chars of the key, for display

Example:

"sk_personal_Ab3x"

isActive
boolean
Example:

true

lastUsedAt
string<date-time> | null
expiresAt
string<date-time> | null
createdAt
string<date-time>
updatedAt
string<date-time>