Mon-Fri 10am - 6pm
API Documentation
Base URL for your account: https://cpaas.studio
This is the REST API reference for CPaaS Studio's Audio Library and Voice Broadcast modules. Every example below is built for your account's base URL shown above, so you can copy and run it directly.
New here? Start with Getting started — it covers creating an API key, authentication, the response envelope, and the full error-code reference.
Audio Library
Upload, look up, and enable/disable the voice audio assets a Voice Broadcast can play.
-
Audio Upload
POST /api/voice/v1/audio/uploadUploads a voice audio file to your Audio Library, ready to select as a Voice Broadcast's message. Requires a key scoped to voice.broadcast or all. -
Audio Status
GET/POST /api/voice/v1/audio/statusLook up one audio asset, or list all of them. Requires a key scoped to voice.broadcast or all. -
Audio Enable / Disable
GET/POST /api/voice/v1/audio/toggleTurns an audio asset on or off for selection in a broadcast. This is not approval — it's a usability switch layered on top of the pending/approved/rejected status.
Voice Broadcast
Send a voice broadcast to a list of numbers, poll its per-number outcomes, and check your billing balance.
-
Voice Broadcast
GET/POST /api/voice/v1/broadcastSends a broadcast to a list of numbers from one of your account's DIDs. Requires a key scoped to voice.broadcast or all. This endpoint accepts a request; it does not bill or deliver synchronously. -
Status webhook
POST https://your-server.example/your-webhook (we call you)When a broadcast was sent with webhook_url (Voice Broadcast or Voice Broadcast with Text to Speech), we POST a JSON event to that URL each time one of its numbers changes status: when it is handed to the operator (submitted) and when the call result arrives (answered, no_answer, busy or failed). On Voice Broadcast, numbers rejected at submit (duplicate, invalid) are already in the submit response and get no webhook. On Voice Broadcast with Text to Speech the submit response comes before numbers are checked, so each number skipped while preparing gets one final webhook instead (no_audio, duplicate or invalid). -
Verifying webhook signatures
POST https://your-server.example/your-webhook (we call you)Every webhook we send is signed with your account's webhook signing secret, so you can check it came from us and was not replayed. Find, reveal, copy and regenerate the secret on Administration → API Keys → Webhook signing secret. -
Voice Broadcast with Text to Speech
GET/POST /api/voice/v1/broadcast/ttsSends a broadcast whose audio is spoken from text. Two modes — send exactly one: (1) template_id + variables: an approved TTS template from your account, with a value for each of its variables; open to every voice.broadcast key. (2) text: free text; only for keys with audio auto-approval. Asynchronous: the response is 202 "preparing" — poll Broadcast with TTS Status. Every different message is a new audio: it costs TTS credits and takes a few seconds (up to about 30 for some voices) before dialling starts. -
TTS request failed webhook
POST https://your-server.example/your-webhook (we call you)Sent once to the webhook_url of a Voice Broadcast with Text to Speech request when the whole request fails while preparing (for example text to speech failed for every message), so no broadcast and no calls were made. It is the same failure Broadcast with TTS Status reports. -
Voice Broadcast with TTS Status
GET/POST /api/voice/v1/broadcast/tts/statusShows whether a Broadcast with TTS request is still preparing, has been submitted as a broadcast, or failed. -
TTS Templates
GET/POST /api/voice/v1/tts/templatesLists your account's text-to-speech templates — the ids and variables you send to Voice Broadcast with Text to Speech in template mode. Templates are created in the web app (Voice › Text To Speech › Templates) and approved by the platform before use; only approved templates can be sent. -
Voice Broadcast Number Status
GET/POST /api/voice/v1/broadcast/statusLook up a broadcast's progress and per-number outcomes. Requires a key scoped to voice.broadcast or all. This is the endpoint you should poll after sending a broadcast. -
Balance Check
GET/POST /api/account/v1/balanceYour current credit/plan balance. Unlike every other endpoint in this API, this one is not restricted to a specific module — it's available to any key, and shows exactly the scope(s) that key's own module covers.
Voice Click to Call
Place a two-leg call — CPaaS dials your agent, then bridges the customer on answer — and poll its outcome.
-
Place a Click to Call
GET/POST /api/voice/v1/click2callPlaces one Click to Call from one of your account's DIDs. Requires a key scoped to voice.click2call or all. A 202 means the call was accepted — it is billed later, after the CDR, and only if it connects. Only one Click to Call may be in flight per account. -
Click to Call Status
GET/POST /api/voice/v1/click2call/statusLook up one Click to Call by uid, event_id, or reference. Requires a key scoped to voice.click2call or all.
URLinks
Create short links, manage dynamic URL redirects, track click analytics, and handle link renewals programmatically.
-
Create URL Link
POST /api/v1/urlinksCreates a new short URL link. Consumes 1 URLinks credit (urlinks.link). Link status starts as pending and requires admin approval before redirection becomes active. -
List URL Links
GET /api/v1/urlinksRetrieves a paginated list of short links belonging to your account. -
Get URL Link Details
GET /api/v1/urlinks/{id}Fetches detailed information for a specific URL link. -
Update URL Link
PUT /api/v1/urlinks/{id}Updates name, slug, redirect URL, or auto-renew settings. Modifying link details resets status to pending for administrator re-approval. -
Delete URL Link
DELETE /api/v1/urlinks/{id}Soft deletes a URL link. If the link is deleted while still pending, the consumed 1 credit is automatically refunded to your account balance. -
Renew URL Link
POST /api/v1/urlinks/{id}/renewRenews an approved URL link for an additional 1 year period. Consumes 1 URLinks credit (urlinks.link). Only approved links can be renewed. -
Link Analytics
GET /api/v1/urlinks/{id}/analyticsRetrieves click statistics, device breakdowns, browser breakdowns, and recent click logs for a specific URL link.
Send WhatsApp template, session and media messages, follow their status, run campaigns, manage contacts, groups and opt-outs, read your allowance and usage, and receive signed webhooks. Postman collection: /api-documentation/whatsapp/postman.json
-
Send Template
POST /api/whatsapp/v1/send/templateSend an approved template — the only way to start a conversation or write outside the 24-hour window. Authentication (OTP) templates take `code`. -
Send Session Message
POST /api/whatsapp/v1/send/sessionSend free-form text (or an interactive message) inside the 24-hour customer-service window — i.e. within 24 hours of the contact's last message to you. -
Send Media
POST /api/whatsapp/v1/send/mediaSend an image, video, audio, document or sticker inside the 24-hour window — from your media library (media) or an https link. -
Message Status
GET /api/whatsapp/v1/messages/{ref}One message by the ref the send returned: our status, its error (mapped status + provider_code), billing, and every timestamp. -
Create Campaign
POST /api/whatsapp/v1/campaignsCreate a campaign and launch it now (or schedule it with schedule_at). Recipients excluded by opt-out, blacklist or inactive status are recorded as skipped and cost nothing. -
List Campaigns
GET /api/whatsapp/v1/campaignsYour campaigns, newest first. -
Get Campaign
GET /api/whatsapp/v1/campaigns/{uid}One campaign: status, counters (the funnel), exclusions by reason, money. -
Pause Campaign
POST /api/whatsapp/v1/campaigns/{uid}/pauseStop sending after the batch in flight. Messages already handed to Meta still deliver. -
Resume Campaign
POST /api/whatsapp/v1/campaigns/{uid}/resumeContinue a paused campaign where it stopped (after a top-up, for paused_no_balance). -
Cancel Campaign
POST /api/whatsapp/v1/campaigns/{uid}/cancelCancel: messages not yet sent become cancelled and are never charged. -
List Numbers
GET /api/whatsapp/v1/channelsActive, non-deleted WhatsApp numbers available for selection, with their uid, quality rating, messaging tier and status. A key restricted to one number sees only that one when active. Use number details to inspect a disabled number. -
List Templates
GET /api/whatsapp/v1/templatesYour templates with their status and whether they can be sent now. -
Balance
GET /api/whatsapp/v1/balanceYour live plan and the allowance left per category, in ₹ and in whole messages (own pot, and with the shared pot). -
Usage Report
GET /api/whatsapp/v1/reports/usageDaily counts and charges per category (at most 93 days per request). Kept indefinitely, after message details age out. -
Upload Media
POST /api/whatsapp/v1/mediaUpload a file to your media library (multipart form field `file`). Image 5 MB, video / audio 16 MB, document 100 MB, sticker 500 KB; the type is detected from the file itself. -
List Media
GET /api/whatsapp/v1/mediaYour library, with usage against your quota. -
Get Media
GET /api/whatsapp/v1/media/{uid}One file's metadata. -
Delete Media
DELETE /api/whatsapp/v1/media/{uid}Delete a file — refused (409) while a template or an active campaign uses it. -
List Contacts
GET /api/whatsapp/v1/contactsYour contacts. -
Create Contact
POST /api/whatsapp/v1/contactsAdd a contact with its opt-in record. consent_source and consent_evidence are required — Meta requires businesses to hold an opt-in for every number they message. -
Get Contact
GET /api/whatsapp/v1/contacts/{phone}One contact, addressed by phone. Add ?channel={uid} when the number is a contact on several of your numbers. -
Update Contact
PUT/POST /api/whatsapp/v1/contacts/{phone}Change the name and attributes (merge=true merges attributes instead of replacing them). The phone and the consent record cannot change. -
Delete Contact
DELETE /api/whatsapp/v1/contacts/{phone}Remove the contact. Its messages, opt-outs and consent history are kept. -
List Groups
GET /api/whatsapp/v1/groupsYour contact groups (campaign audiences). -
Create Group
POST /api/whatsapp/v1/groupsA new group. -
Update Group
PUT/POST /api/whatsapp/v1/groups/{uid}Rename. -
Delete Group
DELETE /api/whatsapp/v1/groups/{uid}Delete the group (its contacts stay). Refused while an active campaign targets it. -
Add Group Members
POST /api/whatsapp/v1/groups/{uid}/membersAdd existing contacts by phone (up to 10,000 per call). -
Remove Group Members
DELETE /api/whatsapp/v1/groups/{uid}/membersRemove contacts from the group by phone. -
List Opt-outs
GET /api/whatsapp/v1/optoutsNumbers that opted out, per number and scope. -
Add Opt-out
POST /api/whatsapp/v1/optoutsRecord an opt-out (marketing = marketing templates blocked; all = every message you start). -
Lift Opt-out
DELETE /api/whatsapp/v1/optoutsLift an opt-out — only when the person asked to receive messages again; `note` (10+ characters) records why. -
Webhook: message
POST https://your-server.example/your-webhook (we call you)A contact sent a message to your number (text, media, button / list reply, location, …). Sent only for a message that was stored (and billed, if inbound messages are charged on your plan). -
Webhook: status
POST https://your-server.example/your-webhook (we call you)A message you sent moved forward: sent, delivered, read — or failed. One per change; a status never moves backwards. error is present only for failed. -
Webhook: template_status
POST https://your-server.example/your-webhook (we call you)Meta changed one of your templates: approved / rejected / paused / disabled (kind = status), re-categorised (kind = category), or a quality rating change (kind = quality). -
Webhook: optout
POST https://your-server.example/your-webhook (we call you)A contact opted out: replied STOP / UNSUBSCRIBE (source keyword), or was added on the opt-out page (manual_optout) or through the API (api_optout). scope is marketing or all. -
Message statuses and errors
GET /api/whatsapp/v1/messages/{ref} → error.codeThe error codes a failed message carries (Message Status, the status webhook). Column 3 says whether the allowance is returned when a message fails with that code. provider_code (Meta's raw code) is returned alongside for your logs.