API KeysUpdate an API key

Update an API key

curl -X POST "https://api.5centscdn.com/v2/account/api/12345" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: YOUR_API_KEY" \
  -d '{
  "name": "My Application",
  "description": "Used by the mobile app",
  "permission[]": [
    "read",
    "update"
  ],
  "ip_whitelist": "203.0.113.10,10.0.0.0/8"
}'
{
  "result": "success",
  "message": "API Key Updated"
}
POST
/account/api/{apikeyid}
POST
Base URLstring

Target server for requests. Edit to use your own host.

API Key (header: X-API-Key)
X-API-Keystring
Required

API key (sent in header)

path
apikeyidinteger
Required

Unique identifier of the API key record.

Content-Typestring
Required

The media type of the request body

Options: application/json
namestring

Human-readable label for the API key / application.

descriptionstring

Description of the key's purpose, shown alongside the key in the API Keys list.

permission[]array

Set of CRUD permissions granted to this key. Multiple values allowed. Replaces the key's existing permission set.

ip_whiteliststring

Comma-separated list of IPs and/or CIDR ranges allowed to use this key. Omit or leave empty to allow requests from any IP. Replaces the key's existing IP whitelist.

Request Preview
Response

Response will appear here after sending the request

Authentication

header
X-API-Keystring
Required

API Key for authentication. Provide your API key in the header.

Path Parameters

apikeyidinteger
Required

Unique identifier of the API key record.

Example:
12345

Body

application/json
namestring

Human-readable label for the API key / application.

Example:
My Application
descriptionstring

Description of the key's purpose, shown alongside the key in the API Keys list.

Example:
Used by the mobile app
permission[]array

Set of CRUD permissions granted to this key. Multiple values allowed. Replaces the key's existing permission set.

Example:
["read","update"]
ip_whiteliststring

Comma-separated list of IPs and/or CIDR ranges allowed to use this key. Omit or leave empty to allow requests from any IP. Replaces the key's existing IP whitelist.

Example:
203.0.113.10,10.0.0.0/8

Responses

resultstring

Operation outcome.

messagestring

Human-readable description of the operation outcome.