API Keys
Update an API key
Updates an API key identified by id. Only the provided fields are changed.
patch/v1/api-keys/{id}
Path parameters
idinteger required
The unique ID of the API key.
Request body
Example request
{
"active": true,
"restricted": true,
"scopes_enabled": true,
"permitted_ips": [
"192.168.1.1",
"10.0.0.1"
],
"label": "Production API Key",
"numbers": {
"allow": "read"
},
"trunks": {
"allow": "read"
},
"calls": {
"allow": "read"
},
"messages": {
"allow": "read"
},
"recordings": {
"allow": "read"
},
"campaigns": {
"allow": "read"
},
"two_fa": {
"allow": "read"
},
"validator": {
"allow": "read"
},
"webhooks": {
"allow": "read"
},
"embeddable": {
"allow": "read"
},
"billing": {
"allow": "read"
},
"account": {
"allow": "read"
},
"subaccounts": {
"allow": "read"
}
}Response
Returns the updated API key.
Example response
{
"id": 123,
"label": "Production API Key",
"value": "abc123def456ghi789jkl012mno345pqr678stu901vwx234yz",
"active": true,
"restricted": true,
"permitted_ips": [
"192.168.1.1",
"10.0.0.1"
],
"scopes_enabled": true,
"last_used_at": "2026-04-20T15:42:11Z",
"numbers": {
"allow": "read"
},
"trunks": {
"allow": "read"
},
"calls": {
"allow": "read"
},
"messages": {
"allow": "read"
},
"recordings": {
"allow": "read"
},
"campaigns": {
"allow": "read"
},
"two_fa": {
"allow": "read"
},
"validator": {
"allow": "read"
},
"webhooks": {
"allow": "read"
},
"embeddable": {
"allow": "read"
},
"billing": {
"allow": "read"
},
"account": {
"allow": "read"
},
"subaccounts": {
"allow": "read"
},
"created_at": "2024-01-15T10:30:00Z"
}