Overview

Manage your CommPeak balance, rates, SIP accounts, caller IDs, call records, DID numbers, voicemails, and Speech-to-Text through one REST API.

The CommPeak Portal API gives you programmatic access to what you manage in the CommPeak Portal: your balance and billing, voice and SMS rates, SIP accounts, caller IDs, call records, DID numbers, voicemails, and Speech-to-Text. Use it to sync usage and billing data into your own systems, set up voice service without opening the portal, or add calls, SMS, and transcription to your applications.

Base URL and authentication

Send every request to https://api.commpeak.com/portal with your Portal API key in the Authorization header. To create a key, see Managing Portal API Keys. For your first request, see Getting Started with CommPeak APIs.

A key with Read-only (Portal API only) turned on can retrieve data and place calls, but cannot create, change, or delete anything through the Portal API.

Customer

Get account details and current balance returns your account email, available balance, and temporary credit. The balance is in USD and does not include temporary credit. SMS-enabled accounts also get their SMS balance. See Account Details.

Voice rates

Retrieve the per-minute voice termination rates of your tech prefixes. You can get all rates for your default tech prefix or a specific tech prefix, search them by destination prefix for your default tech prefix or a specific one, or download them as a CSV or XLS file. For example, searching for 1212 returns New York City destinations. See How Do I Check Voice Rates for a Specific Country?

SIP accounts

List, create, get, update, and delete the SIP accounts you use to send calls to CommPeak. These endpoints work like the SIP account form in the portal, including authentication settings and assigned Dynamic Caller ID rules. See Adding SIP Accounts and SIP Account Authentication.

CDRs

Retrieve your call detail records, newest first and paginated. Outbound (termination) records cover calls sent from your SIP accounts, with caller ID, destination, duration, and cost. Inbound (origination) records cover calls received on your DID numbers and return the last 24 hours when you do not set a time range. See Call Records (CDR) and Origination CDR.

Calls

Get outbound call totals per destination network or per day for a date range, the same data as the Calls by Destination and Daily Calls reports in the portal.

You can also place an outbound call that speaks text to the callee, plays hosted audio, and collects keypad input, using one of the available text-to-speech voices. Calls are originated from the SIP account selected as SIP Account for Calls on your API key.

Allowed caller IDs

List the verified caller IDs you can use for outbound calls. To add one, request a verification call that reads out a code, then submit the code. You can also delete a caller ID. See Allowed Caller IDs.

📘

NOTE

After five wrong codes, request a new verification call. Your account must always keep at least one verified caller ID, so you cannot delete the last one.

Dynamic Caller ID rules

List, create, get, update, and delete the rules that decide which caller ID is presented for calls of a SIP account, for all destinations, a country, or a prefix. An update applies to every SIP account that uses the rule, and a rule in use cannot be deleted. See Dynamic Caller ID Rules.

SMS rates

List the current SMS prices of one of your SMS channels, with one entry per mobile network. See How Do I Check Messaging Rates for a Specific Country?

Messages

Send an SMS to one recipient. To send in batches, use templates or WhatsApp, or run one-time password checks, use the TextPeak Streams API.

Speech-to-Text

Submit an audio recording for transcription. The request returns a task ID right away while processing runs in the background. Then check the task until it succeeds to get the transcription. See Speech-to-Text.

Payments

List your payment history: top-ups, deductions, subscriptions, and temporary credits, newest first, as on the Payment History page.

Invoices

List your invoices with their number, date, billing period, amount, and status, newest first, as on the Invoices page.

Users

List the portal users of your account, with their roles and which user is the account's main user. See Users.

DID numbers

List your active and suspended DID numbers. Numbers that are still being ordered or have been cancelled are not included. See DID Inventory: My DIDs.

Voicemails

List the voicemails left on your DID numbers, the same data as the Voicemails report in the portal, or get one voicemail with its transcription. The transcription is added shortly after the voicemail is received.

Voicemail playbacks

Manage the greetings played to callers before a voicemail is recorded. You can list, upload a WAV file, get, update, and delete playbacks, and make one the account default. Assign a playback to DID numbers directly or through DID number tags. The default playback covers DID numbers without one and cannot be deleted. See Setting Voicemail for DID Numbers.