Skip to main content
PATCH
/
api
/
v1
/
keys
/
{hash}
Update API key
curl --request PATCH \
  --url https://api.myrouter.example/api/v1/keys/{hash} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "label": "<string>",
  "disabled": true,
  "limit": 123
}
'
{
  "data": {
    "hash": "<string>",
    "name": "<string>",
    "account_id": "<string>",
    "disabled": true,
    "usage": 123,
    "created_at": "2023-11-07T05:31:56Z",
    "label": "<string>",
    "limit": 123,
    "limit_remaining": 123,
    "last_used_at": "2023-11-07T05:31:56Z"
  },
  "request_id": "<string>"
}

Authorizations

Authorization
string
header
required

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

Headers

x-request-id
string

Optional caller request id.

Path Parameters

hash
string
required

Public key hash.

Minimum string length: 1

Body

application/json
name
string

New key display name.

label
string

Customer-visible label; not platform label id.

disabled
boolean

Desired disabled state.

limit
number

Optional customer charge limit.

Response

Update API key response.

data
object
required

Current API key.

request_id
string

Request id.