Skip to main content
PATCH
/
v1
/
admin
/
api-keys
/
{id}
Update API key
curl --request PATCH \
  --url http://localhost:3000/v1/admin/api-keys/{id} \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "description": "<string>",
  "scopes": [
    "<string>"
  ],
  "expires_at": "2023-11-07T05:31:56Z",
  "is_active": true
}
'
{
  "success": true,
  "api_key": {
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "name": "<string>",
    "key_prefix": "<string>",
    "key_last_four": "<string>",
    "staff_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "description": "<string>",
    "scopes": [
      "<string>"
    ],
    "is_active": true,
    "expires_at": "<string>",
    "last_used_at": "<string>",
    "usage_count": 123,
    "created_at": "<string>",
    "updated_at": "<string>",
    "revoked_at": "<string>",
    "staff": {
      "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "email": "<string>",
      "first_name": "<string>",
      "last_name": "<string>"
    }
  }
}

Path Parameters

id
string<uuid>
required

Body

application/json
name
string
Required string length: 1 - 100
description
string
Maximum string length: 500
scopes
string[]
expires_at
string<date-time> | null
is_active
boolean

Response

200 - application/json

Updated API key

success
boolean
required
api_key
object
required