Skip to content

Update company API key

PATCH
/company/{id}/apikeys/{apiKeyId}
curl --request PATCH \
--url https://api.colourbox.com/company/1/apikeys/1 \
--header 'Authorization: CBX-SIMPLE-TOKEN Token=<token>' \
--header 'Content-Type: application/json' \
--data '{ "name": "example", "active": true }'

Rename, deactivate or reactivate a company API key. Deactivating a key signs out everything that signed in with it, through the key and signature or through username, password and HMAC: its tokens are refused from then on, and it cannot be used to obtain new ones. Reactivating the key within 14 days of a token’s last use makes that token valid again. Company administrators only.

id
required
integer
apiKeyId
required
integer
Media typeapplication/json
object
>= 1 properties
name

Send null to clear the name.

string
nullable >= 1 characters <= 255 characters
active
boolean

Example generated

{
"name": "example",
"active": true
}

The updated key

Media typeapplication/json
object
id
integer
key
string
secret
string
companyId
integer
name
string
nullable
active
boolean
createdAt
string format: date-time
nullable
deactivatedAt
string format: date-time
nullable

Example

{
"id": 56,
"companyId": 42
}

The company has no key with that id