Skip to main content
PATCH
/
v1
/
api-keys
/
{id}
Update an API key
curl --request PATCH \
  --url https://api.wavix.com/v1/api-keys/{id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "active": true,
  "restricted": true,
  "scopes_enabled": true,
  "permitted_ips": [
    "192.168.1.1",
    "10.0.0.1"
  ],
  "label": "Production API Key"
}
'
{
  "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"
}

Authorizations

Authorization
string
header
required

Wavix API key. Pass as Authorization: Bearer <api_key>. Keys support per-resource scopes (none / read / write). See Restricted keys and scopes.

Path Parameters

id
integer
required

The unique ID of the API key.

Body

application/json

Fields to update on an API key. All fields are optional; only the provided fields are changed.

active
boolean

Indicates whether the API key is active.

Example:

true

restricted
boolean

Indicates whether the API key is restricted to the listed permitted IPs.

Example:

true

scopes_enabled
boolean

Indicates whether per-resource scope permissions are enforced for the API key.

Example:

true

permitted_ips
string[]

IP addresses allowed to use the API key when restriction is enabled.

Example:
["192.168.1.1", "10.0.0.1"]
label
string

Human-readable label for the API key.

Example:

"Production API Key"

numbers
object

View, buy, release, and configure phone numbers, browse inventory, and manage the cart.

trunks
object

View, create, update, and delete SIP trunks and their settings.

calls
object

Access call records and active calls, and control live call actions such as starting, answering, ending, audio playback, DTMF, streaming, and transcription requests.

messages
object

Access message history and Sender IDs, send messages, manage opt-outs, and create or delete Sender IDs.

recordings
object

List, download, and delete call recordings.

campaigns
object

View campaign analytics and Sender ID or Brand status, schedule bulk voice or SMS campaigns, register Brands, and create short links.

two_fa
object

View 2FA service details and verification logs, trigger OTPs by voice or SMS, and validate verification codes.

validator
object

View number validation results and trigger single or bulk validation or HLR lookup requests.

webhooks
object

List, create, and delete webhooks.

embeddable
object

Manage widget tokens, including listing, viewing, creating, updating, and deleting them.

billing
object

Access statements, balance, payment methods, usage reports, and billing settings, including payment method updates.

account
object

View and update account profile information and timezone.

subaccounts
object

Manage subaccounts: list and view them, create, update, and suspend them.

Response

Returns the updated API key.

API key details including IP restrictions and scope permissions.

id
integer
required

API key ID.

Example:

123

label
string
required

API key label.

Example:

"Production API Key"

value
string
required

API key value.

Example:

"abc123def456ghi789jkl012mno345pqr678stu901vwx234yz"

active
boolean
required

Indicates whether the API key is active.

Example:

true

restricted
boolean
required

Indicates whether IP restrictions are enabled. When enabled, the API key works only from IP addresses in permitted_ips.

Example:

true

permitted_ips
string[]
required

List of permitted IP addresses. If restricted is false, an empty list means no IP restrictions. If restricted is true, an empty list prevents all requests.

Example:
["192.168.1.1", "10.0.0.1"]
scopes_enabled
boolean
required

When true, the key is restricted to the permissions defined in the scope fields below. When false, the key has full access.

Example:

true

last_used_at
string<date-time> | null
required

Timestamp of the most recent authenticated request made with this key.

Example:

"2026-04-20T15:42:11Z"

numbers
object
required

View, buy, release, and configure phone numbers, browse inventory, and manage the cart.

trunks
object
required

View, create, update, and delete SIP trunks and their settings.

calls
object
required

Access call records and active calls, and control live call actions such as starting, answering, ending, audio playback, DTMF, streaming, and transcription requests.

messages
object
required

Access message history and Sender IDs, send messages, manage opt-outs, and create or delete Sender IDs.

recordings
object
required

List, download, and delete call recordings.

campaigns
object
required

View campaign analytics and Sender ID or Brand status, schedule bulk voice or SMS campaigns, register Brands, and create short links.

two_fa
object
required

View 2FA service details and verification logs, trigger OTPs by voice or SMS, and validate verification codes.

validator
object
required

View number validation results and trigger single or bulk validation or HLR lookup requests.

webhooks
object
required

List, create, and delete webhooks.

embeddable
object
required

Manage widget tokens, including listing, viewing, creating, updating, and deleting them.

billing
object
required

Access statements, balance, payment methods, usage reports, and billing settings, including payment method updates.

account
object
required

View and update account profile information and timezone.

subaccounts
object
required

Manage subaccounts: list and view them, create, update, and suspend them.

created_at
string<date-time>
required

Creation date and time in ISO 8601 format.

Example:

"2024-01-15T10:30:00Z"