Skip to main content
POST
/
api
/
canary
/
authentication
/
api-key
/
update
Update API Key
curl --request POST \
  --url http://localhost:3000/api/canary/authentication/api-key/update \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "keyId": "key_12345",
  "name": "My Updated API Key",
  "enabled": true,
  "metadata": {
    "env": "production"
  }
}
'
{
  "statusCode": 400,
  "message": [
    "Invalid input data"
  ],
  "error": "Bad Request"
}

Authorizations

Authorization
string
header
required

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

Body

application/json
keyId
string
required

The ID of the API key to update

Example:

"key_12345"

name
string

The new name of the API key

Example:

"My Updated API Key"

enabled
boolean

Whether the API key is enabled

Example:

true

metadata
object

Metadata for the API key

Example:
{ "env": "production" }

Response

API key updated successfully