Skip to main content
POST
/
api
/
canary
/
authentication
/
api-key
/
update
Update API Key
curl --request POST \
  --url https://api.cashful.africa/api/canary/authentication/api-key/update \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "keyId": "key_12345"
}
'
{
  "apiKey": {
    "id": "key_123",
    "name": "Updated API Key"
  }
}

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

apiKey
object
required

API key updated successfully

Example:
{
  "id": "key_123",
  "name": "Updated API Key"
}