api_keys_create
Creates an API key. Optional IP restrictions can be configured to limit access.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| calls | No | Access call records and active calls, and control live call actions such as starting, answering, ending, audio playback, DTMF, streaming, and transcription requests. | |
| label | No | API key label. | |
| trunks | No | View, create, update, and delete SIP trunks and their settings. | |
| two_fa | No | View 2FA service details and verification logs, trigger OTPs by voice or SMS, and validate verification codes. | |
| account | No | View and update account profile information and timezone. | |
| billing | No | Access invoices, balance, payment methods, usage reports, and billing settings, including payment method updates. | |
| numbers | No | View, buy, release, and configure phone numbers, browse inventory, and manage the cart. | |
| messages | No | Access message history and Sender IDs, send messages, manage opt-outs, and create or delete Sender IDs. | |
| webhooks | No | List, create, and delete webhooks. | |
| campaigns | No | View campaign analytics and Sender ID or Brand status, schedule bulk voice or SMS campaigns, register Brands, and create short links. | |
| is_active | No | Indicates whether the API key should be activated upon creation. | |
| validator | No | View number validation results and trigger single or bulk validation or HLR lookup requests. | |
| embeddable | No | Manage widget tokens, including listing, viewing, creating, updating, and deleting them. | |
| recordings | No | List, download, and delete call recordings. | |
| subaccounts | No | Manage subaccounts: list and view them, create, update, and suspend them. | |
| permitted_ips | No | List of permitted IP addresses for this API key. Each must be a valid IPv4 address. Required when `is_restriction` is true. | |
| is_restriction | No | Indicates whether to restrict API key access by IP address. When enabled, only requests from IP addresses listed in `permitted_ips` are allowed. | |
| is_scopes_enabled | No | When `true`, scope fields below are enforced. When `false` (default), the key has full access. Omitted scope fields default to `{ allow: none }`, so with `is_scopes_enabled: true` and no scopes set the key has no access. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | API key ID. | |
| calls | Yes | Access call records and active calls, and control live call actions such as starting, answering, ending, audio playback, DTMF, streaming, and transcription requests. | |
| label | Yes | API key label. | |
| value | Yes | API key value. | |
| trunks | Yes | View, create, update, and delete SIP trunks and their settings. | |
| two_fa | Yes | View 2FA service details and verification logs, trigger OTPs by voice or SMS, and validate verification codes. | |
| account | Yes | View and update account profile information and timezone. | |
| billing | Yes | Access invoices, balance, payment methods, usage reports, and billing settings, including payment method updates. | |
| numbers | Yes | View, buy, release, and configure phone numbers, browse inventory, and manage the cart. | |
| messages | Yes | Access message history and Sender IDs, send messages, manage opt-outs, and create or delete Sender IDs. | |
| webhooks | Yes | List, create, and delete webhooks. | |
| campaigns | Yes | View campaign analytics and Sender ID or Brand status, schedule bulk voice or SMS campaigns, register Brands, and create short links. | |
| is_active | Yes | Indicates whether the API key is active. | |
| validator | Yes | View number validation results and trigger single or bulk validation or HLR lookup requests. | |
| created_at | Yes | Creation date and time in ISO 8601 format. | |
| embeddable | Yes | Manage widget tokens, including listing, viewing, creating, updating, and deleting them. | |
| recordings | Yes | List, download, and delete call recordings. | |
| subaccounts | Yes | Manage subaccounts: list and view them, create, update, and suspend them. | |
| last_used_at | Yes | Timestamp of the most recent authenticated request made with this key. | |
| permitted_ips | Yes | List of permitted IP addresses. If `is_restriction` is false, an empty list means no IP restrictions. If `is_restriction` is true, an empty list prevents all requests. | |
| is_restriction | Yes | Indicates whether IP restrictions are enabled. When enabled, the API key works only from IP addresses in `permitted_ips`. | |
| is_scopes_enabled | Yes | When `true`, the key is restricted to the permissions defined in the scope fields below. When `false`, the key has full access. |