Skip to main content
PUT
/
api
/
api-keys
/
{key_id}
Update Api Key
curl --request PUT \
  --url https://api.example.com/api/api-keys/{key_id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "scopes": [
    "<string>"
  ],
  "is_active": true
}
'
{
  "id": 123,
  "uuid": "<string>",
  "name": "<string>",
  "key_preview": "<string>",
  "scopes": [
    "<string>"
  ],
  "is_active": true,
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z",
  "expires_at": "2023-11-07T05:31:56Z",
  "last_used_at": "2023-11-07T05:31:56Z"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

X-API-Key
string | null

Path Parameters

key_id
integer
required

Cookies

antidote_session
string | null

Body

application/json

Request to update an API key.

name
string | null
Required string length: 1 - 255
scopes
string[] | null
is_active
boolean | null

Response

Successful Response

API key details (without the actual key).

id
integer
required
uuid
string
required
name
string
required
key_preview
string
required
scopes
string[]
required
is_active
boolean
required
created_at
string<date-time>
required
updated_at
string<date-time>
required
expires_at
string<date-time> | null
last_used_at
string<date-time> | null