Developer guide
Build an integration from setup through delivery tracking. This is the same reference available in Developers inside your workspace. Check each channel's API availability and setup requirements before sending.
Start here: your first integration
Base URL: https://getpulserelay.com/api/public/v1
HTTPS + JSON. Send Authorization: Bearer <API_KEY> from your server. Browser/mobile frontend code must not contain the key. Workspace keys start with wpr_; partner keys start with wpp_. A Meta access token is a different credential.
- Ask an owner/admin to check this workspace's API access and create a named key. Store it on the backend; use a separate key for each environment/application.
- Configure and test the channel in Settings or Channels. Use a controlled recipient with permission: example sends are live, not a dry run. A dedicated sandbox is not documented.
- GET /numbers for sender UUIDs and GET /templates for the exact approved WhatsApp name/language/variable count or India SMS DLT registration. Review the selected account in the app before sending.
- Choose a channel and language example below. Replace every sample recipient, template and value. Persist one notification key per business event AND recipient, together with the original payload.
- POST /messages with that Idempotency-Key. Capture HTTP status and data.id from 202. An accepted request may still be queued, held or later fail.
- GET /messages/{messageId} for current status, and set up signed webhooks for later updates. Confirm provider delivery separately from request acceptance.
Import the JSON URL/file into an OpenAPI-compatible API client, such as Postman. Set the server URL and secret Bearer token in its private environment. API access depends on the configured plan feature, not the plan name. Only owners/admins manage console credentials.
Channel capabilities and requirements
WhatsApp — REST: templates, session text and OTP
Setup: Connect a Meta account and active phone in Settings, validate the account/number pair, and sync approved templates. Registration is setup, not a step for every send.
Content: Use the exact approved template name/language (en and en_US differ), ordered body values and required HTTPS header media. Free-form text needs an open customer-service window. Authentication codes need an AUTHENTICATION template.
Tracking: Save data.id and inspect GET /messages/{messageId}, then message.sent/message.status/message.failed webhooks. Meta acceptance does not confirm delivery.
Limits and recovery: Recipient permission/opt-out, workspace allowance, sending hours and Meta/provider restrictions all apply. A message limit is different from Meta's rolling unique-recipient limit. Never infer remaining capacity from message totals.
SMS — REST: text and OTP
Setup: Connect and test an SMS sender in Channels. Configure provider credentials and permitted sender identity. India traffic also needs the applicable entity, sender and DLT template registration.
Content: Send channel=sms with text. For India, pin dlt_template_id and match the registered content/variable rules; OTP text contains {code}. A WhatsApp template name is not an SMS template.
Tracking: Use the job ID for status and signed webhooks. Provider receipt availability varies. Count segments as well as messages when assessing usage/cost.
Limits and recovery: Opt-outs, channel consent, provider/country rules and promotional sending hours apply. Unicode and long messages can use multiple SMS segments. Check the exact rejection rather than assuming a phone-format failure.
Email — REST: transactional email
Setup: Connect and test an active Email channel. Configure the selected managed provider or SMTP service and an authorised sender/domain. Domain authentication and receipt/inbound configuration depend on that provider; ask the workspace admin to review Channels.
Content: Send channel=email, one recipient, subject, and text or html (or both). Optional reply_to is one mailbox. from selects a workspace email channel UUID, not a literal address. Marketing email, attachments and bulk recipient arrays are not part of this v1 send contract.
Tracking: SMTP/API acceptance is not delivery or inbox placement. Use status and signed message events where receipts are configured. SMTP alone may not provide delivered/open/read evidence. Inbound replies need the provider's separate inbound setup.
Limits and recovery: Workspace credits, provider capacity, sender verification, suppression/bounces/complaints and quiet hours apply. Unknown acceptance is held for investigation; creating a new request key can duplicate an email.
RCS — App workflow; no public v1 send/OTP/catalog contract
Setup: Set up the RCS provider and agent in Channels (the current driver uses Twilio credentials and an agent ID). Complete the provider's agent/brand requirements and use the available connection checks before a controlled app test.
Content: Use the app's RCS template/composer and campaign workflows for the content supported by the configured driver. Rich cards, actions and handset support depend on the implementation/provider; saving a card does not prove every feature is delivered.
Tracking: Review the recorded campaign/queue outcome and provider references in Delivery health. Provider acceptance and handset delivery are separate. Receipt coverage must be verified for your configuration.
Limits and recovery: RCS is not accepted as channel=rcs by POST /v1/messages or /v1/otp, and /v1/numbers does not list RCS agents. There is no documented public RCS callback contract. Do not call internal /_serverFn URLs or assume SMS fallback occurred; inspect the recorded outcome and contact support for a public integration requirement.
from is a workspace sender UUID from GET /numbers. It is not a Meta account ID, Meta phone-number ID, phone string or email address. Omit it to use the applicable configured default. Discovery lists saved configuration; it does not prove live provider readiness or recipient consent.
Phone recipients need their own international country code, including +; do not prepend the workspace's country to an already international number. not_before accepts an ISO timestamp up to 30 days ahead. quiet_hours defaults to respecting workspace hours; an override does not bypass provider restrictions, opt-outs or allowance checks.
Backend code examples
These are integration examples, not separately maintained SDK packages. Run after your business transaction commits; use an application outbox/worker for background sending. Reuse the original event/recipient key and unchanged payload on retries. Templates and DLT IDs below are samples that must match your own approved configuration. RCS currently uses the app workflow described above.
# Run on your backend. Set PULSERELAY_API_KEY in its secret store.
# Replace the sample recipient/template/content. Keep this key AND payload on retries.
curl --silent --show-error --include "https://getpulserelay.com/api/public/v1/messages" \
-H "Authorization: Bearer $PULSERELAY_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: whatsapp-event-1042-recipient-57-v1" \
--data '{
"channel": "whatsapp",
"type": "template",
"to": "+919876543210",
"template_name": "order_confirmation",
"language": "en",
"variables": [
"Customer",
"1042"
],
"reference": "order-1042-recipient-57"
}'
# Save data.id from HTTP 202. A replay is an old snapshot; look up current status:
curl --silent --show-error "https://getpulserelay.com/api/public/v1/messages/REPLACE_WITH_MESSAGE_UUID" \
-H "Authorization: Bearer $PULSERELAY_API_KEY"
# Partner keys: add -H "X-PulseRelay-Workspace: CHILD_WORKSPACE_UUID" to BOTH calls.PHP: one-file WhatsApp helper and full client
PHP 8+ and cURL. Copy whatsapp.php to your application and set PULSERELAY_API_KEY on its server. Optional language/from/workspace_id options override PULSERELAY_WHATSAPP_LANGUAGE, PULSERELAY_WHATSAPP_FROM and PULSERELAY_WORKSPACE_ID. Default language is en; specify en_US explicitly if that is the approved language. The synchronous helper waits up to 15 seconds, does not auto-retry and returns an array: check result['ok'], not the array's truthiness.
<?php
// Copy whatsapp.php into pages/ and set PULSERELAY_API_KEY once.
require_once __DIR__ . '/whatsapp.php';
// Run after saving the loan. Reuse the same event key and payload on retries.
$result = sendWhatsApp($mobile, 'loan_application',
[$mname, $applicationNumber, $loanAmount],
'loan-application-' . $applicationNumber);
if ($result['ok']) {
$jobId = $result['id']; // save for status checks; accepted does not mean delivered
// A replayed response is a snapshot. Use GET /messages/{id} for current status.
} else {
// Record for follow-up without undoing the loan application.
// Reconcile an unknown outcome before sending again.
error_log('WhatsApp: ' . $result['outcome'] . ' / ' . $result['code']);
// Your background worker may use retry_after_seconds; this helper never auto-retries.
}
Result fields include ok, outcome, id, status, http_status, code, error, retry_after_seconds and idempotent_replay. Persist the original key/payload and returned ID; reconcile an unknown outcome before resending. The full PulseRelay.php class also supports senders(), templates(), status(), sendEmail() and sendWhatsAppTemplate(); its methods throw exceptions, so catch them at your integration boundary. Its constructor takes the API key, optional child workspace UUID, and optional origin URL.
All public v1 endpoints
27 of 27 operations. Expand an endpoint for headers, request fields and responses. Paths below follow the base URL.
GET /workspace — Identity of the authenticated workspace
Workspace keys only. Returns the key's workspace identity; caller-supplied workspace headers do not select it.
Workspace key, or partner key with X-PulseRelay-Workspace set to an owned child UUID.
Responses
200 — OK
Response schema
{
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"type": "object",
"required": [
"id",
"apiVersion"
],
"properties": {
"id": {
"type": "string",
"format": "uuid"
},
"apiVersion": {
"const": "public-v1"
}
}
}
}
}400 — Invalid request (code: invalid_json, invalid_request, invalid_phone, …)
Response schema
{
"$ref": "#/components/schemas/Error"
}401 — Missing, invalid or revoked key
Response schema
{
"$ref": "#/components/schemas/Error"
}403 — Plan without API access, missing scope, or not a partner
Response schema
{
"$ref": "#/components/schemas/Error"
}404 — Not found in this workspace (also returned for other workspaces' ids)
Response schema
{
"$ref": "#/components/schemas/Error"
}429 — Rate limit (Retry-After header) or per-number OTP limit
Response schema
{
"$ref": "#/components/schemas/Error"
}451 — Data-residency contract refused the serving region
Response schema
{
"$ref": "#/components/schemas/Error"
}500 — Internal failure; a send may already exist. Reconcile using the original notification key/payload.
Response schema
{
"$ref": "#/components/schemas/Error"
}POST /messages — Queue WhatsApp, SMS or transactional Email
Validated, queued and tried once immediately. Provider failures are retried with backoff (watch message.sent / message.failed webhooks).
Workspace key, or partner key with X-PulseRelay-Workspace set to an owned child UUID.
X-PulseRelay-Workspace (header; optional) — Partner keys only: id of the child workspace to act for. Ignored for workspace keys.
Idempotency-Key (header; optional) — Retry safely: a repeated key replays the first response (Idempotent-Replay: true).
JSON request fields
| Field | Type / required | Description / constraints |
|---|---|---|
| channel | string | Allowed: whatsapp, sms, email. Default: "whatsapp". |
| type | string | WhatsApp only; text needs an open 24-hour window Allowed: template, text. |
| to | string · required | One email address for email; an E.164 phone number for WhatsApp/SMS maxLength: 254 |
| template_name | string | minLength: 1; maxLength: 512 |
| language | string | Default: "en". |
| variables | array | maxItems: 30 |
| header_media_url | string | https image/video/document for media templates format: uri |
| text | string | Email plain-text body (up to 100000 characters); SMS or WhatsApp text (up to 4096) maxLength: 100000 |
| subject | string | Required for email; no line breaks maxLength: 200 |
| html | string | Email HTML body. Supply text, html, or both. maxLength: 200000 |
| reply_to | string | Email reply-to override; defaults to the channel setting format: email |
| purpose | string | Email API supports transactional messages only Allowed: transactional. |
| dlt_template_id | string | SMS to India: the registered DLT template the text must match |
| from | string | Workspace sender UUID: WhatsApp number id, SMS channel id, or email channel id (GET /numbers) format: uuid |
| reference | string | maxLength: 128 |
| metadata | object | Flat key/value pairs (≤2 KB) stored with the message and echoed in webhooks. maxProperties: 20 |
| not_before | string | Earliest send time, ≤30 days ahead format: date-time |
| quiet_hours | variant | respect (default: the workspace's quiet hours), ignore, or a window for this message |
Channel-dependent fields are described above; see the request model's conditional requirements below.
Responses
202 — Queued (and possibly already sent)
Response schema
{
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"$ref": "#/components/schemas/Message"
}
}
}400 — Invalid request (code: invalid_json, invalid_request, invalid_phone, …)
Response schema
{
"$ref": "#/components/schemas/Error"
}401 — Missing, invalid or revoked key
Response schema
{
"$ref": "#/components/schemas/Error"
}403 — Plan without API access, missing scope, or not a partner
Response schema
{
"$ref": "#/components/schemas/Error"
}404 — Not found in this workspace (also returned for other workspaces' ids)
Response schema
{
"$ref": "#/components/schemas/Error"
}409 — idempotency_in_progress: wait and retry the identical request with the same key
Response schema
{
"$ref": "#/components/schemas/Error"
}422 — Rule refused it: opted_out, outside_window, variables_mismatch, invalid_from, dlt_no_match, dlt_no_entity, …
Response schema
{
"$ref": "#/components/schemas/Error"
}429 — Rate limit (Retry-After header) or per-number OTP limit
Response schema
{
"$ref": "#/components/schemas/Error"
}451 — Data-residency contract refused the serving region
Response schema
{
"$ref": "#/components/schemas/Error"
}500 — Internal failure; a send may already exist. Reconcile using the original notification key/payload.
Response schema
{
"$ref": "#/components/schemas/Error"
}GET /messages/{messageId} — Status of one message
Workspace key, or partner key with X-PulseRelay-Workspace set to an owned child UUID.
messageId (path; required) —
X-PulseRelay-Workspace (header; optional) — Partner keys only: id of the child workspace to act for. Ignored for workspace keys.
Responses
200 — OK
Response schema
{
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"$ref": "#/components/schemas/Message"
}
}
}400 — Invalid request (code: invalid_json, invalid_request, invalid_phone, …)
Response schema
{
"$ref": "#/components/schemas/Error"
}401 — Missing, invalid or revoked key
Response schema
{
"$ref": "#/components/schemas/Error"
}403 — Plan without API access, missing scope, or not a partner
Response schema
{
"$ref": "#/components/schemas/Error"
}404 — Not found in this workspace (also returned for other workspaces' ids)
Response schema
{
"$ref": "#/components/schemas/Error"
}429 — Rate limit (Retry-After header) or per-number OTP limit
Response schema
{
"$ref": "#/components/schemas/Error"
}451 — Data-residency contract refused the serving region
Response schema
{
"$ref": "#/components/schemas/Error"
}500 — Internal failure; a send may already exist. Reconcile using the original notification key/payload.
Response schema
{
"$ref": "#/components/schemas/Error"
}503 — Message status temporarily unavailable; retry the status lookup
Response schema
{
"$ref": "#/components/schemas/Error"
}GET /contacts — List contacts
Workspace key, or partner key with X-PulseRelay-Workspace set to an owned child UUID.
X-PulseRelay-Workspace (header; optional) — Partner keys only: id of the child workspace to act for. Ignored for workspace keys.
search (query; optional) —
limit (query; optional) — Default 50. Maximum 200.
Responses
200 — OK
Response schema
{
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Contact"
}
}
}
}400 — Invalid request (code: invalid_json, invalid_request, invalid_phone, …)
Response schema
{
"$ref": "#/components/schemas/Error"
}401 — Missing, invalid or revoked key
Response schema
{
"$ref": "#/components/schemas/Error"
}403 — Plan without API access, missing scope, or not a partner
Response schema
{
"$ref": "#/components/schemas/Error"
}404 — Not found in this workspace (also returned for other workspaces' ids)
Response schema
{
"$ref": "#/components/schemas/Error"
}429 — Rate limit (Retry-After header) or per-number OTP limit
Response schema
{
"$ref": "#/components/schemas/Error"
}451 — Data-residency contract refused the serving region
Response schema
{
"$ref": "#/components/schemas/Error"
}500 — Internal failure; a send may already exist. Reconcile using the original notification key/payload.
Response schema
{
"$ref": "#/components/schemas/Error"
}POST /contacts — Create or update a contact
Workspace key, or partner key with X-PulseRelay-Workspace set to an owned child UUID.
X-PulseRelay-Workspace (header; optional) — Partner keys only: id of the child workspace to act for. Ignored for workspace keys.
JSON request fields
| Field | Type / required | Description / constraints |
|---|---|---|
| phone | string · required | |
| name | string | maxLength: 200 |
| tags | array | maxItems: 30 |
| lead_status | string | Allowed: new, contacted, qualified, customer, lost. |
| attributes | object |
Channel-dependent fields are described above; see the request model's conditional requirements below.
Responses
201 — Saved
Response schema
{
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"$ref": "#/components/schemas/Contact"
}
}
}400 — Invalid request (code: invalid_json, invalid_request, invalid_phone, …)
Response schema
{
"$ref": "#/components/schemas/Error"
}401 — Missing, invalid or revoked key
Response schema
{
"$ref": "#/components/schemas/Error"
}403 — Plan without API access, missing scope, or not a partner
Response schema
{
"$ref": "#/components/schemas/Error"
}404 — Not found in this workspace (also returned for other workspaces' ids)
Response schema
{
"$ref": "#/components/schemas/Error"
}429 — Rate limit (Retry-After header) or per-number OTP limit
Response schema
{
"$ref": "#/components/schemas/Error"
}451 — Data-residency contract refused the serving region
Response schema
{
"$ref": "#/components/schemas/Error"
}500 — Internal failure; a send may already exist. Reconcile using the original notification key/payload.
Response schema
{
"$ref": "#/components/schemas/Error"
}PUT /contacts — Create a contact or return the existing contact ID
Keeps existing contact details and consent. New contacts have no marketing consent.
Workspace key, or partner key with X-PulseRelay-Workspace set to an owned child UUID.
X-PulseRelay-Workspace (header; optional) — Partner keys only: id of the child workspace to act for. Ignored for workspace keys.
JSON request fields
| Field | Type / required | Description / constraints |
|---|---|---|
| workspace_id | string · required | format: uuid |
| phone | string · required | minLength: 5; maxLength: 32 |
| name | string · required | minLength: 1; maxLength: 200 |
Channel-dependent fields are described above; see the request model's conditional requirements below.
Responses
200 — Existing contact
Response schema
{
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid"
}
}
}
}
}201 — Created
Response schema
{
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid"
}
}
}
}
}400 — Invalid request (code: invalid_json, invalid_request, invalid_phone, …)
Response schema
{
"$ref": "#/components/schemas/Error"
}401 — Missing, invalid or revoked key
Response schema
{
"$ref": "#/components/schemas/Error"
}403 — Plan without API access, missing scope, or not a partner
Response schema
{
"$ref": "#/components/schemas/Error"
}404 — Not found in this workspace (also returned for other workspaces' ids)
Response schema
{
"$ref": "#/components/schemas/Error"
}429 — Rate limit (Retry-After header) or per-number OTP limit
Response schema
{
"$ref": "#/components/schemas/Error"
}451 — Data-residency contract refused the serving region
Response schema
{
"$ref": "#/components/schemas/Error"
}500 — Internal failure; a send may already exist. Reconcile using the original notification key/payload.
Response schema
{
"$ref": "#/components/schemas/Error"
}GET /voice-setup — Check the authenticated workspace's AI counselling setup
Requires webhooks:manage. Reports the published carrier deployment, approved voice knowledge, programme availability, and the selected result subscription.
Workspace key, or partner key with X-PulseRelay-Workspace set to an owned child UUID.
X-PulseRelay-Workspace (header; optional) — Partner keys only: id of the child workspace to act for. Ignored for workspace keys.
webhook_id (query; optional) —
Responses
200 — OK
Response schema
{
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"type": "object",
"required": [
"workspace_id",
"voice",
"catalogue_ready",
"results_subscription_active"
],
"properties": {
"workspace_id": {
"type": "string",
"format": "uuid"
},
"voice": {
"type": [
"object",
"null"
],
"description": "Null when voice route configuration could not be read.",
"properties": {
"configured": {
"type": "boolean"
},
"inbound_number": {
"type": [
"string",
"null"
]
},
"carrier_verified": {
"type": "boolean"
},
"knowledge_verified": {
"type": "boolean"
},
"counselling_tools_configured": {
"type": "boolean"
},
"outbound_enabled": {
"type": "boolean"
},
"outreach_key_matches": {
"type": "boolean"
}
}
},
"catalogue_ready": {
"type": [
"boolean",
"null"
]
},
"results_subscription_active": {
"type": [
"boolean",
"null"
]
}
}
}
}
}400 — Invalid request (code: invalid_json, invalid_request, invalid_phone, …)
Response schema
{
"$ref": "#/components/schemas/Error"
}401 — Missing, invalid or revoked key
Response schema
{
"$ref": "#/components/schemas/Error"
}403 — Plan without API access, missing scope, or not a partner
Response schema
{
"$ref": "#/components/schemas/Error"
}404 — Not found in this workspace (also returned for other workspaces' ids)
Response schema
{
"$ref": "#/components/schemas/Error"
}429 — Rate limit (Retry-After header) or per-number OTP limit
Response schema
{
"$ref": "#/components/schemas/Error"
}451 — Data-residency contract refused the serving region
Response schema
{
"$ref": "#/components/schemas/Error"
}500 — Internal failure; a send may already exist. Reconcile using the original notification key/payload.
Response schema
{
"$ref": "#/components/schemas/Error"
}POST /voice-setup — Verify one signed voice result callback
Requires webhooks:manage. Sends a signed voice.setup_probe to one active voice result subscription. The receiver acknowledges its event ID. No call is placed.
Workspace key, or partner key with X-PulseRelay-Workspace set to an owned child UUID.
X-PulseRelay-Workspace (header; optional) — Partner keys only: id of the child workspace to act for. Ignored for workspace keys.
JSON request fields
| Field | Type / required | Description / constraints |
|---|---|---|
| workspace_id | string · required | format: uuid |
| webhook_id | string · required | format: uuid |
Channel-dependent fields are described above; see the request model's conditional requirements below.
Responses
200 — OK
Response schema
{
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"type": "object",
"required": [
"acknowledged"
],
"properties": {
"acknowledged": {
"type": "boolean"
}
}
}
}
}400 — Invalid request (code: invalid_json, invalid_request, invalid_phone, …)
Response schema
{
"$ref": "#/components/schemas/Error"
}401 — Missing, invalid or revoked key
Response schema
{
"$ref": "#/components/schemas/Error"
}403 — Plan without API access, missing scope, or not a partner
Response schema
{
"$ref": "#/components/schemas/Error"
}404 — Not found in this workspace (also returned for other workspaces' ids)
Response schema
{
"$ref": "#/components/schemas/Error"
}429 — Rate limit (Retry-After header) or per-number OTP limit
Response schema
{
"$ref": "#/components/schemas/Error"
}451 — Data-residency contract refused the serving region
Response schema
{
"$ref": "#/components/schemas/Error"
}500 — Internal failure; a send may already exist. Reconcile using the original notification key/payload.
Response schema
{
"$ref": "#/components/schemas/Error"
}GET /voice-sync — Recover the workspace's voice results and opt-outs
Returns up to 100 entries from the ordered feed for an active voice results subscription. Save the last cursor after applying the entries. Omit after to read from the beginning.
Workspace key, or partner key with X-PulseRelay-Workspace set to an owned child UUID.
webhook_id (query; required) —
after (query; optional) —
include_inbound (query; optional) —
Responses
200 — OK
Response schema
{
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"type": "object",
"required": [
"workspace_id",
"events"
],
"properties": {
"workspace_id": {
"type": "string",
"format": "uuid"
},
"events": {
"type": "array",
"items": {
"type": "object",
"required": [
"cursor",
"kind",
"data"
],
"properties": {
"cursor": {
"type": "string"
},
"kind": {
"enum": [
"result",
"opt_out",
"inbound"
]
},
"data": {
"type": "object"
}
}
}
}
}
}
}
}400 — Invalid request (code: invalid_json, invalid_request, invalid_phone, …)
Response schema
{
"$ref": "#/components/schemas/Error"
}401 — Missing, invalid or revoked key
Response schema
{
"$ref": "#/components/schemas/Error"
}403 — Plan without API access, missing scope, or not a partner
Response schema
{
"$ref": "#/components/schemas/Error"
}404 — Not found in this workspace (also returned for other workspaces' ids)
Response schema
{
"$ref": "#/components/schemas/Error"
}429 — Rate limit (Retry-After header) or per-number OTP limit
Response schema
{
"$ref": "#/components/schemas/Error"
}451 — Data-residency contract refused the serving region
Response schema
{
"$ref": "#/components/schemas/Error"
}500 — Internal failure; a send may already exist. Reconcile using the original notification key/payload.
Response schema
{
"$ref": "#/components/schemas/Error"
}503 — Voice recovery is temporarily unavailable
Response schema
{
"$ref": "#/components/schemas/Error"
}POST /voice-catalogue — Synchronize approved Edulexa programmes
Publishes the Edulexa portion of the catalogue using the configured outreach key.
Workspace key, or partner key with X-PulseRelay-Workspace set to an owned child UUID.
JSON request fields
| Field | Type / required | Description / constraints |
|---|---|---|
| programmes | array · required | maxItems: 50 |
Channel-dependent fields are described above; see the request model's conditional requirements below.
Responses
200 — OK
Response schema
{
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"type": "object",
"properties": {
"revision": {
"type": [
"string",
"null"
]
}
}
}
}
}400 — Invalid request (code: invalid_json, invalid_request, invalid_phone, …)
Response schema
{
"$ref": "#/components/schemas/Error"
}401 — Missing, invalid or revoked key
Response schema
{
"$ref": "#/components/schemas/Error"
}403 — Plan without API access, missing scope, or not a partner
Response schema
{
"$ref": "#/components/schemas/Error"
}404 — Not found in this workspace (also returned for other workspaces' ids)
Response schema
{
"$ref": "#/components/schemas/Error"
}409 — Catalogue revision or programme codes conflict
Response schema
{
"$ref": "#/components/schemas/Error"
}429 — Rate limit (Retry-After header) or per-number OTP limit
Response schema
{
"$ref": "#/components/schemas/Error"
}451 — Data-residency contract refused the serving region
Response schema
{
"$ref": "#/components/schemas/Error"
}500 — Internal failure; a send may already exist. Reconcile using the original notification key/payload.
Response schema
{
"$ref": "#/components/schemas/Error"
}503 — Programme catalogue is temporarily unavailable
Response schema
{
"$ref": "#/components/schemas/Error"
}POST /voice-outreach — Schedule a permissioned CRM outreach call
Requires the workspace key configured for the voice pilot. Profile counselling also requires a permissioned profile and an active published programme.
Workspace key, or partner key with X-PulseRelay-Workspace set to an owned child UUID.
JSON request fields
| Field | Type / required | Description / constraints |
|---|---|---|
| request_id | string · required | Stable across retries format: uuid |
| contact_id | string · required | format: uuid |
| permission_ref | string · required | minLength: 3; maxLength: 240 |
| scheduled_for | string · required | format: date-time |
| counselling_profile | object | A structured profile the learner has permitted the institute to use for this call. |
| context | object · required |
Channel-dependent fields are described above; see the request model's conditional requirements below.
Responses
202 — Queued
Response schema
{
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid"
}
}
}
}
}400 — Invalid request (code: invalid_json, invalid_request, invalid_phone, …)
Response schema
{
"$ref": "#/components/schemas/Error"
}401 — Missing, invalid or revoked key
Response schema
{
"$ref": "#/components/schemas/Error"
}403 — Plan without API access, missing scope, or not a partner
Response schema
{
"$ref": "#/components/schemas/Error"
}404 — Not found in this workspace (also returned for other workspaces' ids)
Response schema
{
"$ref": "#/components/schemas/Error"
}409 — Call rejected or outbound calling paused
Response schema
{
"$ref": "#/components/schemas/Error"
}429 — Rate limit (Retry-After header) or per-number OTP limit
Response schema
{
"$ref": "#/components/schemas/Error"
}451 — Data-residency contract refused the serving region
Response schema
{
"$ref": "#/components/schemas/Error"
}500 — Internal failure; a send may already exist. Reconcile using the original notification key/payload.
Response schema
{
"$ref": "#/components/schemas/Error"
}GET /voice-outreach — Read an outreach call and its structured outcome
Workspace key, or partner key with X-PulseRelay-Workspace set to an owned child UUID.
id (query; required) —
Responses
200 — OK
Response schema
{
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"type": "object",
"properties": {
"counselling_result": {
"type": [
"object",
"null"
],
"description": "The learner-confirmed profile, catalogue revision, matched programme (if selected), and requested next step. Also delivered as data.counselling in voice.outreach_finished."
},
"provider_ref": {
"type": [
"string",
"null"
]
},
"attempted_at": {
"type": [
"string",
"null"
],
"format": "date-time"
},
"carrier_ended_at": {
"type": [
"string",
"null"
],
"format": "date-time"
},
"last_checked_at": {
"type": [
"string",
"null"
],
"format": "date-time"
},
"duration_seconds": {
"type": [
"number",
"null"
]
},
"operator_closed_at": {
"type": [
"string",
"null"
],
"format": "date-time"
}
}
}
}
}400 — Invalid request (code: invalid_json, invalid_request, invalid_phone, …)
Response schema
{
"$ref": "#/components/schemas/Error"
}401 — Missing, invalid or revoked key
Response schema
{
"$ref": "#/components/schemas/Error"
}403 — Plan without API access, missing scope, or not a partner
Response schema
{
"$ref": "#/components/schemas/Error"
}404 — Call not found
Response schema
{
"$ref": "#/components/schemas/Error"
}429 — Rate limit (Retry-After header) or per-number OTP limit
Response schema
{
"$ref": "#/components/schemas/Error"
}451 — Data-residency contract refused the serving region
Response schema
{
"$ref": "#/components/schemas/Error"
}500 — Internal failure; a send may already exist. Reconcile using the original notification key/payload.
Response schema
{
"$ref": "#/components/schemas/Error"
}DELETE /voice-outreach — Cancel a scheduled outreach call
Workspace key, or partner key with X-PulseRelay-Workspace set to an owned child UUID.
id (query; required) —
Responses
200 — OK
Response schema
{
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"type": "object"
}
}
}400 — Invalid request (code: invalid_json, invalid_request, invalid_phone, …)
Response schema
{
"$ref": "#/components/schemas/Error"
}401 — Missing, invalid or revoked key
Response schema
{
"$ref": "#/components/schemas/Error"
}403 — Plan without API access, missing scope, or not a partner
Response schema
{
"$ref": "#/components/schemas/Error"
}404 — Not found in this workspace (also returned for other workspaces' ids)
Response schema
{
"$ref": "#/components/schemas/Error"
}409 — Call is no longer scheduled
Response schema
{
"$ref": "#/components/schemas/Error"
}429 — Rate limit (Retry-After header) or per-number OTP limit
Response schema
{
"$ref": "#/components/schemas/Error"
}451 — Data-residency contract refused the serving region
Response schema
{
"$ref": "#/components/schemas/Error"
}500 — Internal failure; a send may already exist. Reconcile using the original notification key/payload.
Response schema
{
"$ref": "#/components/schemas/Error"
}PATCH /voice-outreach — Check or close an aged Edulexa carrier attempt
The configured managed workspace key can check an attempt after 90 minutes. Closing requires carrier confirmation. A late receipt can still resolve the original attempt.
Workspace key, or partner key with X-PulseRelay-Workspace set to an owned child UUID.
id (query; required) —
JSON request fields
See the data model below.
Channel-dependent fields are described above; see the request model's conditional requirements below.
Responses
200 — OK
Response schema
{
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"type": "object"
}
}
}400 — Invalid request (code: invalid_json, invalid_request, invalid_phone, …)
Response schema
{
"$ref": "#/components/schemas/Error"
}401 — Missing, invalid or revoked key
Response schema
{
"$ref": "#/components/schemas/Error"
}403 — Plan without API access, missing scope, or not a partner
Response schema
{
"$ref": "#/components/schemas/Error"
}404 — Not found in this workspace (also returned for other workspaces' ids)
Response schema
{
"$ref": "#/components/schemas/Error"
}409 — The attempt is still within its reconciliation window
Response schema
{
"$ref": "#/components/schemas/Error"
}429 — Rate limit (Retry-After header) or per-number OTP limit
Response schema
{
"$ref": "#/components/schemas/Error"
}451 — Data-residency contract refused the serving region
Response schema
{
"$ref": "#/components/schemas/Error"
}500 — Internal failure; a send may already exist. Reconcile using the original notification key/payload.
Response schema
{
"$ref": "#/components/schemas/Error"
}GET /templates — WhatsApp templates and India DLT SMS templates
Workspace key, or partner key with X-PulseRelay-Workspace set to an owned child UUID.
X-PulseRelay-Workspace (header; optional) — Partner keys only: id of the child workspace to act for. Ignored for workspace keys.
Responses
200 — OK
Response schema
{
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"$ref": "#/components/schemas/Templates"
}
}
}400 — Invalid request (code: invalid_json, invalid_request, invalid_phone, …)
Response schema
{
"$ref": "#/components/schemas/Error"
}401 — Missing, invalid or revoked key
Response schema
{
"$ref": "#/components/schemas/Error"
}403 — Plan without API access, missing scope, or not a partner
Response schema
{
"$ref": "#/components/schemas/Error"
}404 — Not found in this workspace (also returned for other workspaces' ids)
Response schema
{
"$ref": "#/components/schemas/Error"
}429 — Rate limit (Retry-After header) or per-number OTP limit
Response schema
{
"$ref": "#/components/schemas/Error"
}451 — Data-residency contract refused the serving region
Response schema
{
"$ref": "#/components/schemas/Error"
}500 — Internal failure; a send may already exist. Reconcile using the original notification key/payload.
Response schema
{
"$ref": "#/components/schemas/Error"
}GET /numbers — WhatsApp numbers, SMS senders and email channels (ids for the from field)
Workspace key, or partner key with X-PulseRelay-Workspace set to an owned child UUID.
X-PulseRelay-Workspace (header; optional) — Partner keys only: id of the child workspace to act for. Ignored for workspace keys.
Responses
200 — OK
Response schema
{
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"$ref": "#/components/schemas/Numbers"
}
}
}400 — Invalid request (code: invalid_json, invalid_request, invalid_phone, …)
Response schema
{
"$ref": "#/components/schemas/Error"
}401 — Missing, invalid or revoked key
Response schema
{
"$ref": "#/components/schemas/Error"
}403 — Plan without API access, missing scope, or not a partner
Response schema
{
"$ref": "#/components/schemas/Error"
}404 — Not found in this workspace (also returned for other workspaces' ids)
Response schema
{
"$ref": "#/components/schemas/Error"
}429 — Rate limit (Retry-After header) or per-number OTP limit
Response schema
{
"$ref": "#/components/schemas/Error"
}451 — Data-residency contract refused the serving region
Response schema
{
"$ref": "#/components/schemas/Error"
}500 — Internal failure; a send may already exist. Reconcile using the original notification key/payload.
Response schema
{
"$ref": "#/components/schemas/Error"
}POST /otp — Send a one-time code
Workspace key, or partner key with X-PulseRelay-Workspace set to an owned child UUID.
X-PulseRelay-Workspace (header; optional) — Partner keys only: id of the child workspace to act for. Ignored for workspace keys.
Idempotency-Key (header; optional) — Retry safely: a repeated key replays the first response (Idempotent-Replay: true).
JSON request fields
| Field | Type / required | Description / constraints |
|---|---|---|
| to | string · required | |
| channel | string | Allowed: whatsapp, sms. Default: "whatsapp". |
| template_name | string | WhatsApp AUTHENTICATION template |
| language | string | Default: "en". |
| text | string | SMS text containing {code} maxLength: 500 |
| dlt_template_id | string | |
| from | string | format: uuid |
| code_length | integer | Default: 6. minimum: 4; maximum: 8 |
| ttl_seconds | integer | Default: 600. minimum: 60; maximum: 1800 |
| max_attempts | integer | Default: 5. minimum: 1; maximum: 10 |
| reference | string | maxLength: 128 |
| metadata | object | Flat key/value pairs (≤2 KB) stored with the message and echoed in webhooks. maxProperties: 20 |
Channel-dependent fields are described above; see the request model's conditional requirements below.
Responses
202 — Code created; delivery shows whether it was sent
Response schema
{
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"$ref": "#/components/schemas/OtpChallenge"
}
}
}400 — Invalid request (code: invalid_json, invalid_request, invalid_phone, …)
Response schema
{
"$ref": "#/components/schemas/Error"
}401 — Missing, invalid or revoked key
Response schema
{
"$ref": "#/components/schemas/Error"
}403 — Plan without API access, missing scope, or not a partner
Response schema
{
"$ref": "#/components/schemas/Error"
}404 — Not found in this workspace (also returned for other workspaces' ids)
Response schema
{
"$ref": "#/components/schemas/Error"
}409 — idempotency_in_progress: wait and retry the identical request with the same key
Response schema
{
"$ref": "#/components/schemas/Error"
}422 — template_not_authentication, dlt_promotional, opted_out, …
Response schema
{
"$ref": "#/components/schemas/Error"
}429 — Rate limit (Retry-After header) or per-number OTP limit
Response schema
{
"$ref": "#/components/schemas/Error"
}451 — Data-residency contract refused the serving region
Response schema
{
"$ref": "#/components/schemas/Error"
}500 — Internal failure; a send may already exist. Reconcile using the original notification key/payload.
Response schema
{
"$ref": "#/components/schemas/Error"
}503 — OTP not configured on this platform
Response schema
{
"$ref": "#/components/schemas/Error"
}POST /otp/verify — Check a one-time code
Workspace key, or partner key with X-PulseRelay-Workspace set to an owned child UUID.
X-PulseRelay-Workspace (header; optional) — Partner keys only: id of the child workspace to act for. Ignored for workspace keys.
JSON request fields
| Field | Type / required | Description / constraints |
|---|---|---|
| id | string · required | format: uuid |
| code | string · required | pattern: ^\d{4,8}$ |
Channel-dependent fields are described above; see the request model's conditional requirements below.
Responses
200 — Verified
Response schema
{
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"$ref": "#/components/schemas/OtpChallenge"
}
}
}400 — Invalid request (code: invalid_json, invalid_request, invalid_phone, …)
Response schema
{
"$ref": "#/components/schemas/Error"
}401 — Missing, invalid or revoked key
Response schema
{
"$ref": "#/components/schemas/Error"
}403 — Plan without API access, missing scope, or not a partner
Response schema
{
"$ref": "#/components/schemas/Error"
}404 — Not found in this workspace (also returned for other workspaces' ids)
Response schema
{
"$ref": "#/components/schemas/Error"
}409 — already_verified
Response schema
{
"$ref": "#/components/schemas/Error"
}410 — expired or superseded
Response schema
{
"$ref": "#/components/schemas/Error"
}422 — invalid_code (attempts_remaining)
Response schema
{
"$ref": "#/components/schemas/Error"
}429 — Rate limit (Retry-After header) or per-number OTP limit
Response schema
{
"$ref": "#/components/schemas/Error"
}451 — Data-residency contract refused the serving region
Response schema
{
"$ref": "#/components/schemas/Error"
}500 — Internal failure; a send may already exist. Reconcile using the original notification key/payload.
Response schema
{
"$ref": "#/components/schemas/Error"
}GET /webhooks — List webhook subscriptions
Workspace key, or partner key with X-PulseRelay-Workspace set to an owned child UUID.
X-PulseRelay-Workspace (header; optional) — Partner keys only: id of the child workspace to act for. Ignored for workspace keys.
Responses
200 — OK
Response schema
{
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Webhook"
}
}
}
}400 — Invalid request (code: invalid_json, invalid_request, invalid_phone, …)
Response schema
{
"$ref": "#/components/schemas/Error"
}401 — Missing, invalid or revoked key
Response schema
{
"$ref": "#/components/schemas/Error"
}403 — Plan without API access, missing scope, or not a partner
Response schema
{
"$ref": "#/components/schemas/Error"
}404 — Not found in this workspace (also returned for other workspaces' ids)
Response schema
{
"$ref": "#/components/schemas/Error"
}429 — Rate limit (Retry-After header) or per-number OTP limit
Response schema
{
"$ref": "#/components/schemas/Error"
}451 — Data-residency contract refused the serving region
Response schema
{
"$ref": "#/components/schemas/Error"
}500 — Internal failure; a send may already exist. Reconcile using the original notification key/payload.
Response schema
{
"$ref": "#/components/schemas/Error"
}POST /webhooks — Add a webhook subscription (secret returned once)
Workspace key, or partner key with X-PulseRelay-Workspace set to an owned child UUID.
X-PulseRelay-Workspace (header; optional) — Partner keys only: id of the child workspace to act for. Ignored for workspace keys.
JSON request fields
| Field | Type / required | Description / constraints |
|---|---|---|
| url | string · required | Public https:// address format: uri |
| events | array · required | |
| name | string | maxLength: 80 |
Channel-dependent fields are described above; see the request model's conditional requirements below.
Responses
201 — Created
Response schema
{
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"$ref": "#/components/schemas/Webhook"
}
}
}400 — Invalid request (code: invalid_json, invalid_request, invalid_phone, …)
Response schema
{
"$ref": "#/components/schemas/Error"
}401 — Missing, invalid or revoked key
Response schema
{
"$ref": "#/components/schemas/Error"
}403 — Plan without API access, missing scope, or not a partner
Response schema
{
"$ref": "#/components/schemas/Error"
}404 — Not found in this workspace (also returned for other workspaces' ids)
Response schema
{
"$ref": "#/components/schemas/Error"
}422 — too_many_webhooks
Response schema
{
"$ref": "#/components/schemas/Error"
}429 — Rate limit (Retry-After header) or per-number OTP limit
Response schema
{
"$ref": "#/components/schemas/Error"
}451 — Data-residency contract refused the serving region
Response schema
{
"$ref": "#/components/schemas/Error"
}500 — Internal failure; a send may already exist. Reconcile using the original notification key/payload.
Response schema
{
"$ref": "#/components/schemas/Error"
}DELETE /webhooks/{webhookId} — Delete a webhook subscription
Workspace key, or partner key with X-PulseRelay-Workspace set to an owned child UUID.
webhookId (path; required) —
X-PulseRelay-Workspace (header; optional) — Partner keys only: id of the child workspace to act for. Ignored for workspace keys.
Responses
204 — Deleted
400 — Invalid request (code: invalid_json, invalid_request, invalid_phone, …)
Response schema
{
"$ref": "#/components/schemas/Error"
}401 — Missing, invalid or revoked key
Response schema
{
"$ref": "#/components/schemas/Error"
}403 — Plan without API access, missing scope, or not a partner
Response schema
{
"$ref": "#/components/schemas/Error"
}404 — Not found in this workspace (also returned for other workspaces' ids)
Response schema
{
"$ref": "#/components/schemas/Error"
}429 — Rate limit (Retry-After header) or per-number OTP limit
Response schema
{
"$ref": "#/components/schemas/Error"
}451 — Data-residency contract refused the serving region
Response schema
{
"$ref": "#/components/schemas/Error"
}500 — Internal failure; a send may already exist. Reconcile using the original notification key/payload.
Response schema
{
"$ref": "#/components/schemas/Error"
}GET /partner/workspaces — List your customers' workspaces
Partner key required with the relevant partner scope.
external_ref (query; optional) —
Responses
200 — OK
Response schema
{
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Workspace"
}
}
}
}400 — Invalid request (code: invalid_json, invalid_request, invalid_phone, …)
Response schema
{
"$ref": "#/components/schemas/Error"
}401 — Missing, invalid or revoked key
Response schema
{
"$ref": "#/components/schemas/Error"
}403 — Plan without API access, missing scope, or not a partner
Response schema
{
"$ref": "#/components/schemas/Error"
}404 — Not found in this workspace (also returned for other workspaces' ids)
Response schema
{
"$ref": "#/components/schemas/Error"
}429 — Rate limit (Retry-After header) or per-number OTP limit
Response schema
{
"$ref": "#/components/schemas/Error"
}451 — Data-residency contract refused the serving region
Response schema
{
"$ref": "#/components/schemas/Error"
}500 — Internal failure; a send may already exist. Reconcile using the original notification key/payload.
Response schema
{
"$ref": "#/components/schemas/Error"
}POST /partner/workspaces — Provision a workspace for a customer (idempotent on external_ref)
Partner key required with the relevant partner scope.
JSON request fields
| Field | Type / required | Description / constraints |
|---|---|---|
| name | string · required | minLength: 2; maxLength: 120 |
| external_ref | string | Your id for this customer; provisioning is idempotent on it maxLength: 128 |
| timezone | string | Default: "UTC". |
| locale | string | Default: "en". |
| quiet_hours | object |
Channel-dependent fields are described above; see the request model's conditional requirements below.
Responses
200 — Already existed
Response schema
{
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"$ref": "#/components/schemas/Workspace"
},
"created": {
"type": "boolean"
}
}
}201 — Created
Response schema
{
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"$ref": "#/components/schemas/Workspace"
},
"created": {
"type": "boolean"
}
}
}400 — Invalid request (code: invalid_json, invalid_request, invalid_phone, …)
Response schema
{
"$ref": "#/components/schemas/Error"
}401 — Missing, invalid or revoked key
Response schema
{
"$ref": "#/components/schemas/Error"
}403 — Plan without API access, missing scope, or not a partner
Response schema
{
"$ref": "#/components/schemas/Error"
}404 — Not found in this workspace (also returned for other workspaces' ids)
Response schema
{
"$ref": "#/components/schemas/Error"
}429 — Rate limit (Retry-After header) or per-number OTP limit
Response schema
{
"$ref": "#/components/schemas/Error"
}451 — Data-residency contract refused the serving region
Response schema
{
"$ref": "#/components/schemas/Error"
}500 — Internal failure; a send may already exist. Reconcile using the original notification key/payload.
Response schema
{
"$ref": "#/components/schemas/Error"
}GET /partner/workspaces/{workspaceId} — One workspace with its readiness
Partner key required with the relevant partner scope.
workspaceId (path; required) —
Responses
200 — OK
Response schema
{
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"$ref": "#/components/schemas/Workspace"
}
}
}400 — Invalid request (code: invalid_json, invalid_request, invalid_phone, …)
Response schema
{
"$ref": "#/components/schemas/Error"
}401 — Missing, invalid or revoked key
Response schema
{
"$ref": "#/components/schemas/Error"
}403 — Plan without API access, missing scope, or not a partner
Response schema
{
"$ref": "#/components/schemas/Error"
}404 — Not found in this workspace (also returned for other workspaces' ids)
Response schema
{
"$ref": "#/components/schemas/Error"
}429 — Rate limit (Retry-After header) or per-number OTP limit
Response schema
{
"$ref": "#/components/schemas/Error"
}451 — Data-residency contract refused the serving region
Response schema
{
"$ref": "#/components/schemas/Error"
}500 — Internal failure; a send may already exist. Reconcile using the original notification key/payload.
Response schema
{
"$ref": "#/components/schemas/Error"
}PATCH /partner/workspaces/{workspaceId} — Update name, time zone, locale or quiet hours
Partner key required with the relevant partner scope.
workspaceId (path; required) —
JSON request fields
| Field | Type / required | Description / constraints |
|---|---|---|
| name | string | minLength: 2; maxLength: 120 |
| timezone | string | |
| locale | string | |
| quiet_hours | object |
Channel-dependent fields are described above; see the request model's conditional requirements below.
Responses
200 — OK
Response schema
{
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"$ref": "#/components/schemas/Workspace"
}
}
}400 — Invalid request (code: invalid_json, invalid_request, invalid_phone, …)
Response schema
{
"$ref": "#/components/schemas/Error"
}401 — Missing, invalid or revoked key
Response schema
{
"$ref": "#/components/schemas/Error"
}403 — Plan without API access, missing scope, or not a partner
Response schema
{
"$ref": "#/components/schemas/Error"
}404 — Not found in this workspace (also returned for other workspaces' ids)
Response schema
{
"$ref": "#/components/schemas/Error"
}429 — Rate limit (Retry-After header) or per-number OTP limit
Response schema
{
"$ref": "#/components/schemas/Error"
}451 — Data-residency contract refused the serving region
Response schema
{
"$ref": "#/components/schemas/Error"
}500 — Internal failure; a send may already exist. Reconcile using the original notification key/payload.
Response schema
{
"$ref": "#/components/schemas/Error"
}POST /partner/workspace-keys — Create a workspace key for one of your workspaces (shown once)
Partner key required with the relevant partner scope.
JSON request fields
| Field | Type / required | Description / constraints |
|---|---|---|
| workspace_id | string · required | format: uuid |
| name | string | maxLength: 80 |
Channel-dependent fields are described above; see the request model's conditional requirements below.
Responses
201 — Created
Response schema
{
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"$ref": "#/components/schemas/WorkspaceKey"
}
}
}400 — Invalid request (code: invalid_json, invalid_request, invalid_phone, …)
Response schema
{
"$ref": "#/components/schemas/Error"
}401 — Missing, invalid or revoked key
Response schema
{
"$ref": "#/components/schemas/Error"
}403 — Plan without API access, missing scope, or not a partner
Response schema
{
"$ref": "#/components/schemas/Error"
}404 — Not found in this workspace (also returned for other workspaces' ids)
Response schema
{
"$ref": "#/components/schemas/Error"
}429 — Rate limit (Retry-After header) or per-number OTP limit
Response schema
{
"$ref": "#/components/schemas/Error"
}451 — Data-residency contract refused the serving region
Response schema
{
"$ref": "#/components/schemas/Error"
}500 — Internal failure; a send may already exist. Reconcile using the original notification key/payload.
Response schema
{
"$ref": "#/components/schemas/Error"
}GET /openapi.json — This document
Public: no API key required.
Responses
200 — OK
Response schema
{
"type": "object"
}All request and response data models
Error
| Field | Type / required | Description / constraints |
|---|---|---|
| error | string · required | Readable message |
| code | string | Stable machine code |
| attempts_remaining | integer |
{
"type": "object",
"required": [
"error"
],
"properties": {
"error": {
"type": "string",
"description": "Readable message"
},
"code": {
"type": "string",
"description": "Stable machine code"
},
"attempts_remaining": {
"type": "integer"
}
}
}SendMessageRequest
| Field | Type / required | Description / constraints |
|---|---|---|
| channel | string | Allowed: whatsapp, sms, email. Default: "whatsapp". |
| type | string | WhatsApp only; text needs an open 24-hour window Allowed: template, text. |
| to | string · required | One email address for email; an E.164 phone number for WhatsApp/SMS maxLength: 254 |
| template_name | string | minLength: 1; maxLength: 512 |
| language | string | Default: "en". |
| variables | array | maxItems: 30 |
| header_media_url | string | https image/video/document for media templates format: uri |
| text | string | Email plain-text body (up to 100000 characters); SMS or WhatsApp text (up to 4096) maxLength: 100000 |
| subject | string | Required for email; no line breaks maxLength: 200 |
| html | string | Email HTML body. Supply text, html, or both. maxLength: 200000 |
| reply_to | string | Email reply-to override; defaults to the channel setting format: email |
| purpose | string | Email API supports transactional messages only Allowed: transactional. |
| dlt_template_id | string | SMS to India: the registered DLT template the text must match |
| from | string | Workspace sender UUID: WhatsApp number id, SMS channel id, or email channel id (GET /numbers) format: uuid |
| reference | string | maxLength: 128 |
| metadata | object | Flat key/value pairs (≤2 KB) stored with the message and echoed in webhooks. maxProperties: 20 |
| not_before | string | Earliest send time, ≤30 days ahead format: date-time |
| quiet_hours | variant | respect (default: the workspace's quiet hours), ignore, or a window for this message |
{
"type": "object",
"required": [
"to"
],
"allOf": [
{
"if": {
"not": {
"properties": {
"channel": {
"const": "email"
}
},
"required": [
"channel"
]
}
},
"then": {
"properties": {
"to": {
"maxLength": 32
},
"text": {
"maxLength": 4096
}
},
"not": {
"anyOf": [
{
"required": [
"subject"
]
},
{
"required": [
"html"
]
},
{
"required": [
"reply_to"
]
},
{
"required": [
"purpose"
]
}
]
}
}
},
{
"if": {
"properties": {
"channel": {
"const": "email"
}
},
"required": [
"channel"
]
},
"then": {
"required": [
"subject"
],
"anyOf": [
{
"required": [
"text"
]
},
{
"required": [
"html"
]
}
],
"not": {
"anyOf": [
{
"required": [
"type"
]
},
{
"required": [
"template_name"
]
},
{
"required": [
"variables"
]
},
{
"required": [
"header_media_url"
]
},
{
"required": [
"dlt_template_id"
]
}
]
}
}
},
{
"if": {
"properties": {
"channel": {
"const": "sms"
}
},
"required": [
"channel"
]
},
"then": {
"required": [
"text"
],
"not": {
"anyOf": [
{
"required": [
"template_name"
]
},
{
"properties": {
"type": {
"const": "template"
}
},
"required": [
"type"
]
}
]
}
}
},
{
"if": {
"properties": {
"channel": {
"const": "whatsapp"
}
}
},
"then": {
"anyOf": [
{
"properties": {
"type": {
"const": "text"
}
},
"required": [
"type",
"text"
],
"not": {
"required": [
"template_name"
]
}
},
{
"properties": {
"type": {
"const": "template"
}
},
"required": [
"template_name"
]
},
{
"not": {
"required": [
"type"
]
},
"required": [
"text"
]
}
]
}
}
],
"properties": {
"channel": {
"type": "string",
"enum": [
"whatsapp",
"sms",
"email"
],
"default": "whatsapp"
},
"type": {
"type": "string",
"enum": [
"template",
"text"
],
"description": "WhatsApp only; text needs an open 24-hour window"
},
"to": {
"type": "string",
"maxLength": 254,
"description": "One email address for email; an E.164 phone number for WhatsApp/SMS",
"example": "+919876543210"
},
"template_name": {
"type": "string",
"minLength": 1,
"maxLength": 512
},
"language": {
"type": "string",
"default": "en"
},
"variables": {
"type": "array",
"maxItems": 30,
"items": {
"type": "string",
"maxLength": 1024
}
},
"header_media_url": {
"type": "string",
"format": "uri",
"description": "https image/video/document for media templates"
},
"text": {
"type": "string",
"maxLength": 100000,
"description": "Email plain-text body (up to 100000 characters); SMS or WhatsApp text (up to 4096)"
},
"subject": {
"type": "string",
"maxLength": 200,
"description": "Required for email; no line breaks"
},
"html": {
"type": "string",
"maxLength": 200000,
"description": "Email HTML body. Supply text, html, or both."
},
"reply_to": {
"type": "string",
"format": "email",
"description": "Email reply-to override; defaults to the channel setting"
},
"purpose": {
"type": "string",
"enum": [
"transactional"
],
"description": "Email API supports transactional messages only"
},
"dlt_template_id": {
"type": "string",
"description": "SMS to India: the registered DLT template the text must match"
},
"from": {
"type": "string",
"format": "uuid",
"description": "Workspace sender UUID: WhatsApp number id, SMS channel id, or email channel id (GET /numbers)"
},
"reference": {
"type": "string",
"maxLength": 128
},
"metadata": {
"type": "object",
"maxProperties": 20,
"description": "Flat key/value pairs (≤2 KB) stored with the message and echoed in webhooks.",
"additionalProperties": {
"type": [
"string",
"number",
"boolean",
"null"
]
}
},
"not_before": {
"type": "string",
"format": "date-time",
"description": "Earliest send time, ≤30 days ahead"
},
"quiet_hours": {
"description": "respect (default: the workspace's quiet hours), ignore, or a window for this message",
"oneOf": [
{
"type": "string",
"enum": [
"respect",
"ignore"
]
},
{
"type": "object",
"required": [
"start",
"end",
"timezone"
],
"additionalProperties": false,
"properties": {
"start": {
"type": "string",
"pattern": "^([01]\\d|2[0-3]):[0-5]\\d$",
"example": "21:00"
},
"end": {
"type": "string",
"pattern": "^([01]\\d|2[0-3]):[0-5]\\d$",
"example": "08:00"
},
"timezone": {
"type": "string",
"example": "Asia/Kolkata"
}
}
}
]
}
}
}Message
| Field | Type / required | Description / constraints |
|---|---|---|
| id | string | format: uuid |
| status | string | Allowed: queued, scheduled, sending, sent, delivered, read, failed, canceled, uncertain. |
| channel | string | Allowed: whatsapp, sms, email. |
| to | string | |
| reference | string | null | |
| metadata | object | |
| scheduled_for | string | null | format: date-time |
| sent_at | string | null | format: date-time |
| delivered_at | string | null | format: date-time |
| read_at | string | null | format: date-time |
| attempts | integer | |
| wamid | string | null | |
| provider_message_id | string | null | |
| error | string | null |
{
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid"
},
"status": {
"type": "string",
"enum": [
"queued",
"scheduled",
"sending",
"sent",
"delivered",
"read",
"failed",
"canceled",
"uncertain"
]
},
"channel": {
"type": "string",
"enum": [
"whatsapp",
"sms",
"email"
]
},
"to": {
"type": "string"
},
"reference": {
"type": [
"string",
"null"
]
},
"metadata": {
"type": "object"
},
"scheduled_for": {
"type": [
"string",
"null"
],
"format": "date-time"
},
"sent_at": {
"type": [
"string",
"null"
],
"format": "date-time"
},
"delivered_at": {
"type": [
"string",
"null"
],
"format": "date-time"
},
"read_at": {
"type": [
"string",
"null"
],
"format": "date-time"
},
"attempts": {
"type": "integer"
},
"wamid": {
"type": [
"string",
"null"
]
},
"provider_message_id": {
"type": [
"string",
"null"
]
},
"error": {
"type": [
"string",
"null"
]
}
}
}Contact
| Field | Type / required | Description / constraints |
|---|---|---|
| id | string | format: uuid |
| phone_e164 | string | |
| name | string | null | |
| tags | array | |
| lead_status | string | null | |
| opted_out | boolean |
{
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid"
},
"phone_e164": {
"type": "string"
},
"name": {
"type": [
"string",
"null"
]
},
"tags": {
"type": "array",
"items": {
"type": "string"
}
},
"lead_status": {
"type": [
"string",
"null"
]
},
"opted_out": {
"type": "boolean"
}
}
}ContactInput
| Field | Type / required | Description / constraints |
|---|---|---|
| phone | string · required | |
| name | string | maxLength: 200 |
| tags | array | maxItems: 30 |
| lead_status | string | Allowed: new, contacted, qualified, customer, lost. |
| attributes | object |
{
"type": "object",
"required": [
"phone"
],
"properties": {
"phone": {
"type": "string"
},
"name": {
"type": "string",
"maxLength": 200
},
"tags": {
"type": "array",
"maxItems": 30,
"items": {
"type": "string",
"maxLength": 64
}
},
"lead_status": {
"type": "string",
"enum": [
"new",
"contacted",
"qualified",
"customer",
"lost"
]
},
"attributes": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
}Templates
| Field | Type / required | Description / constraints |
|---|---|---|
| array | ||
| sms_dlt | array | |
| dlt_entity_id_set | boolean |
{
"type": "object",
"properties": {
"whatsapp": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"language": {
"type": "string"
},
"category": {
"type": "string",
"enum": [
"MARKETING",
"UTILITY",
"AUTHENTICATION"
]
},
"status": {
"type": "string"
},
"variables": {
"type": "integer",
"description": "Number of {{n}} body variables"
},
"body": {
"type": "string"
}
}
}
},
"sms_dlt": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"dlt_template_id": {
"type": "string"
},
"sender_id": {
"type": "string"
},
"category": {
"type": "string"
},
"body": {
"type": "string",
"description": "Registered text; {#var#} marks a variable (≤30 characters)"
}
}
}
},
"dlt_entity_id_set": {
"type": "boolean"
}
}
}Numbers
| Field | Type / required | Description / constraints |
|---|---|---|
| array | ||
| array | ||
| sms | array |
{
"type": "object",
"properties": {
"email": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid"
},
"provider": {
"type": "string"
},
"sender": {
"type": [
"string",
"null"
]
},
"name": {
"type": [
"string",
"null"
]
},
"is_default": {
"type": "boolean"
},
"status": {
"type": "string"
}
}
}
},
"whatsapp": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid"
},
"phone": {
"type": [
"string",
"null"
]
},
"label": {
"type": [
"string",
"null"
]
},
"is_default": {
"type": "boolean"
},
"active": {
"type": "boolean"
},
"paused": {
"type": "boolean"
},
"quality_rating": {
"type": [
"string",
"null"
]
},
"tier": {
"type": [
"string",
"null"
]
}
}
}
},
"sms": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid"
},
"provider": {
"type": "string"
},
"sender": {
"type": [
"string",
"null"
]
},
"name": {
"type": [
"string",
"null"
]
},
"is_default": {
"type": "boolean"
},
"status": {
"type": "string"
}
}
}
}
}
}OtpSendRequest
| Field | Type / required | Description / constraints |
|---|---|---|
| to | string · required | |
| channel | string | Allowed: whatsapp, sms. Default: "whatsapp". |
| template_name | string | WhatsApp AUTHENTICATION template |
| language | string | Default: "en". |
| text | string | SMS text containing {code} maxLength: 500 |
| dlt_template_id | string | |
| from | string | format: uuid |
| code_length | integer | Default: 6. minimum: 4; maximum: 8 |
| ttl_seconds | integer | Default: 600. minimum: 60; maximum: 1800 |
| max_attempts | integer | Default: 5. minimum: 1; maximum: 10 |
| reference | string | maxLength: 128 |
| metadata | object | Flat key/value pairs (≤2 KB) stored with the message and echoed in webhooks. maxProperties: 20 |
{
"type": "object",
"required": [
"to"
],
"allOf": [
{
"if": {
"properties": {
"channel": {
"const": "whatsapp"
}
}
},
"then": {
"required": [
"template_name"
]
}
},
{
"if": {
"properties": {
"channel": {
"const": "sms"
}
},
"required": [
"channel"
]
},
"then": {
"required": [
"text"
],
"properties": {
"text": {
"pattern": "\\{code\\}"
}
}
}
}
],
"properties": {
"to": {
"type": "string"
},
"channel": {
"type": "string",
"enum": [
"whatsapp",
"sms"
],
"default": "whatsapp"
},
"template_name": {
"type": "string",
"description": "WhatsApp AUTHENTICATION template"
},
"language": {
"type": "string",
"default": "en"
},
"text": {
"type": "string",
"maxLength": 500,
"description": "SMS text containing {code}"
},
"dlt_template_id": {
"type": "string"
},
"from": {
"type": "string",
"format": "uuid"
},
"code_length": {
"type": "integer",
"minimum": 4,
"maximum": 8,
"default": 6
},
"ttl_seconds": {
"type": "integer",
"minimum": 60,
"maximum": 1800,
"default": 600
},
"max_attempts": {
"type": "integer",
"minimum": 1,
"maximum": 10,
"default": 5
},
"reference": {
"type": "string",
"maxLength": 128
},
"metadata": {
"type": "object",
"maxProperties": 20,
"description": "Flat key/value pairs (≤2 KB) stored with the message and echoed in webhooks.",
"additionalProperties": {
"type": [
"string",
"number",
"boolean",
"null"
]
}
}
}
}OtpChallenge
| Field | Type / required | Description / constraints |
|---|---|---|
| id | string | format: uuid |
| status | string | Allowed: pending, verified, expired, failed, canceled. |
| channel | string | |
| to | string | |
| expires_at | string | format: date-time |
| attempts | integer | |
| max_attempts | integer | |
| reference | string | null | |
| delivery | object |
{
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid"
},
"status": {
"type": "string",
"enum": [
"pending",
"verified",
"expired",
"failed",
"canceled"
]
},
"channel": {
"type": "string"
},
"to": {
"type": "string"
},
"expires_at": {
"type": "string",
"format": "date-time"
},
"attempts": {
"type": "integer"
},
"max_attempts": {
"type": "integer"
},
"reference": {
"type": [
"string",
"null"
]
},
"delivery": {
"type": "object",
"properties": {
"message_id": {
"type": "string",
"format": "uuid"
},
"status": {
"type": "string",
"enum": [
"queued",
"sent",
"failed",
"uncertain"
]
},
"error": {
"type": [
"string",
"null"
]
}
}
}
}
}OtpVerifyRequest
| Field | Type / required | Description / constraints |
|---|---|---|
| id | string · required | format: uuid |
| code | string · required | pattern: ^\d{4,8}$ |
{
"type": "object",
"required": [
"id",
"code"
],
"properties": {
"id": {
"type": "string",
"format": "uuid"
},
"code": {
"type": "string",
"pattern": "^\\d{4,8}$"
}
}
}Webhook
| Field | Type / required | Description / constraints |
|---|---|---|
| id | string | format: uuid |
| name | string | |
| url | string | format: uri |
| events | array | |
| active | boolean | |
| created_at | string | format: date-time |
| secret | string | Signing secret; returned only when the webhook is created |
{
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid"
},
"name": {
"type": "string"
},
"url": {
"type": "string",
"format": "uri"
},
"events": {
"type": "array",
"items": {
"$ref": "#/components/schemas/WebhookEventName"
}
},
"active": {
"type": "boolean"
},
"created_at": {
"type": "string",
"format": "date-time"
},
"secret": {
"type": "string",
"description": "Signing secret; returned only when the webhook is created"
}
}
}WebhookInput
| Field | Type / required | Description / constraints |
|---|---|---|
| url | string · required | Public https:// address format: uri |
| events | array · required | |
| name | string | maxLength: 80 |
{
"type": "object",
"required": [
"url",
"events"
],
"additionalProperties": false,
"properties": {
"url": {
"type": "string",
"format": "uri",
"description": "Public https:// address"
},
"events": {
"type": "array",
"minItems": 1,
"items": {
"$ref": "#/components/schemas/WebhookEventName"
}
},
"name": {
"type": "string",
"maxLength": 80
}
}
}WebhookEventName
See the data model below.
{
"type": "string",
"enum": [
"voice.outreach_finished",
"message.received",
"message.status",
"message.sent",
"message.failed",
"campaign.finished",
"contact.created",
"contact.opted_out",
"contact.opted_in"
]
}VoiceOutreachInput
| Field | Type / required | Description / constraints |
|---|---|---|
| request_id | string · required | Stable across retries format: uuid |
| contact_id | string · required | format: uuid |
| permission_ref | string · required | minLength: 3; maxLength: 240 |
| scheduled_for | string · required | format: date-time |
| counselling_profile | object | A structured profile the learner has permitted the institute to use for this call. |
| context | object · required |
{
"type": "object",
"additionalProperties": false,
"required": [
"request_id",
"contact_id",
"permission_ref",
"scheduled_for",
"context"
],
"allOf": [
{
"if": {
"properties": {
"context": {
"properties": {
"purpose": {
"const": "profile_counselling"
}
},
"required": [
"purpose"
]
}
}
},
"then": {
"required": [
"counselling_profile"
]
},
"else": {
"not": {
"required": [
"counselling_profile"
]
}
}
}
],
"properties": {
"request_id": {
"type": "string",
"format": "uuid",
"description": "Stable across retries"
},
"contact_id": {
"type": "string",
"format": "uuid"
},
"permission_ref": {
"type": "string",
"minLength": 3,
"maxLength": 240
},
"scheduled_for": {
"type": "string",
"format": "date-time"
},
"counselling_profile": {
"$ref": "#/components/schemas/VoiceCounsellingProfile"
},
"context": {
"type": "object",
"additionalProperties": false,
"required": [
"lead_ref",
"purpose",
"stage"
],
"properties": {
"lead_ref": {
"type": "string",
"pattern": "^[A-Za-z0-9_-]{1,96}$"
},
"purpose": {
"type": "string",
"enum": [
"lead_verification",
"re_engagement",
"profile_counselling",
"appointment_reminder",
"document_reminder",
"fee_reminder"
]
},
"stage": {
"type": "string",
"enum": [
"new",
"contacted",
"qualified",
"application_started",
"enrolled"
]
},
"programme_code": {
"type": "string",
"pattern": "^[A-Za-z0-9_-]{1,96}$"
},
"prior_outcome": {
"type": "string",
"enum": [
"no_answer",
"asked_to_call_back",
"interested",
"reminder_sent"
]
},
"appointment_at": {
"type": "string",
"format": "date-time",
"description": "Required for appointment reminders; omitted otherwise"
},
"fee_kind": {
"type": "string",
"enum": [
"application_fee",
"deposit"
]
},
"admissions_webhook_id": {
"type": "string",
"format": "uuid",
"description": "Edulexa subscription used to confirm current permission immediately before dispatch."
}
}
}
}
}VoiceCounsellingProfile
A structured profile the learner has permitted the institute to use for this call.
| Field | Type / required | Description / constraints |
|---|---|---|
| source | string · required | Allowed: enquiry, crm, learner_resume. |
| observed_on | string · required | format: date |
| profile_permission_ref | string · required | pattern: ^[A-Za-z0-9][A-Za-z0-9_.:-]{2,95}$ |
| goal | string | Allowed: leadership, management, product, data_ai, finance, technology. |
| track | string | Allowed: operations, engineering, sales_marketing, finance, data_ai, product, people, general_management, other. |
| skills | array | maxItems: 6 |
| education | string | Allowed: secondary, diploma, bachelors, postgraduate. |
| experience_years | integer | minimum: 0; maximum: 65 |
| format | string | Allowed: online, hybrid, campus. |
| max_fee_inr | integer | minimum: 0; maximum: 10000000 |
| max_weekly_hours | integer | minimum: 1; maximum: 60 |
{
"type": "object",
"additionalProperties": false,
"description": "A structured profile the learner has permitted the institute to use for this call.",
"required": [
"observed_on",
"source",
"profile_permission_ref"
],
"properties": {
"source": {
"type": "string",
"enum": [
"enquiry",
"crm",
"learner_resume"
]
},
"observed_on": {
"type": "string",
"format": "date"
},
"profile_permission_ref": {
"type": "string",
"pattern": "^[A-Za-z0-9][A-Za-z0-9_.:-]{2,95}$"
},
"goal": {
"type": "string",
"enum": [
"leadership",
"management",
"product",
"data_ai",
"finance",
"technology"
]
},
"track": {
"type": "string",
"enum": [
"operations",
"engineering",
"sales_marketing",
"finance",
"data_ai",
"product",
"people",
"general_management",
"other"
]
},
"skills": {
"type": "array",
"maxItems": 6,
"items": {
"type": "string",
"enum": [
"analytics",
"programming",
"project_management",
"product_discovery",
"people_management",
"digital_marketing",
"financial_analysis",
"process_improvement"
]
}
},
"education": {
"type": "string",
"enum": [
"secondary",
"diploma",
"bachelors",
"postgraduate"
]
},
"experience_years": {
"type": "integer",
"minimum": 0,
"maximum": 65
},
"format": {
"type": "string",
"enum": [
"online",
"hybrid",
"campus"
]
},
"max_fee_inr": {
"type": "integer",
"minimum": 0,
"maximum": 10000000
},
"max_weekly_hours": {
"type": "integer",
"minimum": 1,
"maximum": 60
}
}
}WebhookEnvelope
POSTed to your URL. Headers: X-PulseRelay-Event, X-PulseRelay-Signature (sha256=<hex HMAC-SHA256 of the raw body with your secret>), X-PulseRelay-Delivery (= id, the same on retries), X-PulseRelay-Attempt. Failures (network, 408, 425, 429, 5xx) are retried after ~30 s, 2 min, 10 min, 30 min, 2 h and 6 h.
| Field | Type / required | Description / constraints |
|---|---|---|
| id | string · required | format: uuid |
| event | string · required | Allowed: voice.outreach_finished, message.received, message.status, message.sent, message.failed, campaign.finished, contact.created, contact.opted_out, contact.opted_in. |
| tenant_id | string · required | Workspace id format: uuid |
| created_at | string · required | format: date-time |
| data | object · required |
{
"type": "object",
"description": "POSTed to your URL. Headers: X-PulseRelay-Event, X-PulseRelay-Signature (sha256=<hex HMAC-SHA256 of the raw body with your secret>), X-PulseRelay-Delivery (= id, the same on retries), X-PulseRelay-Attempt. Failures (network, 408, 425, 429, 5xx) are retried after ~30 s, 2 min, 10 min, 30 min, 2 h and 6 h.",
"required": [
"id",
"event",
"tenant_id",
"created_at",
"data"
],
"properties": {
"id": {
"type": "string",
"format": "uuid"
},
"event": {
"$ref": "#/components/schemas/WebhookEventName"
},
"tenant_id": {
"type": "string",
"format": "uuid",
"description": "Workspace id"
},
"created_at": {
"type": "string",
"format": "date-time"
},
"data": {
"type": "object"
}
}
}MessageEvent
data of message.sent, message.status and message.failed
| Field | Type / required | Description / constraints |
|---|---|---|
| id | string | Message (job) id from POST /messages format: uuid |
| reference | string | null | |
| metadata | object | |
| channel | string | |
| to | string | null | |
| status | string | Allowed: sent, delivered, read, failed. |
| wamid | string | null | |
| provider_message_id | string | null | |
| error | string | null | |
| error_code | string | null | |
| otp_id | string | format: uuid |
| timestamp | string | null | format: date-time |
{
"type": "object",
"description": "data of message.sent, message.status and message.failed",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"description": "Message (job) id from POST /messages"
},
"reference": {
"type": [
"string",
"null"
]
},
"metadata": {
"type": "object"
},
"channel": {
"type": "string"
},
"to": {
"type": [
"string",
"null"
]
},
"status": {
"type": "string",
"enum": [
"sent",
"delivered",
"read",
"failed"
]
},
"wamid": {
"type": [
"string",
"null"
]
},
"provider_message_id": {
"type": [
"string",
"null"
]
},
"error": {
"type": [
"string",
"null"
]
},
"error_code": {
"type": [
"string",
"null"
]
},
"otp_id": {
"type": "string",
"format": "uuid"
},
"timestamp": {
"type": [
"string",
"null"
],
"format": "date-time"
}
}
}ConsentEvent
data of contact.opted_out and contact.opted_in
| Field | Type / required | Description / constraints |
|---|---|---|
| phone | string | null | |
| contact_id | string | null | |
| channel | string | Allowed: whatsapp, sms, email, all. |
| scope | string | A STOP blocks every channel of the workspace Allowed: all_channels, email. |
| source | string | |
| keyword | string | null | |
| at | string | format: date-time |
{
"type": "object",
"description": "data of contact.opted_out and contact.opted_in",
"properties": {
"phone": {
"type": [
"string",
"null"
]
},
"contact_id": {
"type": [
"string",
"null"
]
},
"channel": {
"type": "string",
"enum": [
"whatsapp",
"sms",
"email",
"all"
]
},
"scope": {
"type": "string",
"enum": [
"all_channels",
"email"
],
"description": "A STOP blocks every channel of the workspace"
},
"source": {
"type": "string"
},
"keyword": {
"type": [
"string",
"null"
]
},
"at": {
"type": "string",
"format": "date-time"
}
}
}Workspace
| Field | Type / required | Description / constraints |
|---|---|---|
| id | string | format: uuid |
| name | string | |
| external_ref | string | null | |
| timezone | string | |
| locale | string | |
| suspended | boolean | |
| created_at | string | format: date-time |
| quiet_hours | object | |
| readiness | object |
{
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid"
},
"name": {
"type": "string"
},
"external_ref": {
"type": [
"string",
"null"
]
},
"timezone": {
"type": "string"
},
"locale": {
"type": "string"
},
"suspended": {
"type": "boolean"
},
"created_at": {
"type": "string",
"format": "date-time"
},
"quiet_hours": {
"$ref": "#/components/schemas/QuietHours"
},
"readiness": {
"type": "object",
"properties": {
"whatsapp_connected": {
"type": "boolean"
},
"sms_connected": {
"type": "boolean"
},
"dlt_entity_id_set": {
"type": "boolean"
},
"approved_whatsapp_templates": {
"type": "integer"
},
"dlt_templates": {
"type": "integer"
}
}
}
}
}QuietHours
| Field | Type / required | Description / constraints |
|---|---|---|
| enabled | boolean · required | |
| start | string | null | |
| end | string | null |
{
"type": "object",
"required": [
"enabled"
],
"properties": {
"enabled": {
"type": "boolean"
},
"start": {
"type": [
"string",
"null"
],
"example": "21:00"
},
"end": {
"type": [
"string",
"null"
],
"example": "08:00"
}
}
}WorkspaceInput
| Field | Type / required | Description / constraints |
|---|---|---|
| name | string · required | minLength: 2; maxLength: 120 |
| external_ref | string | Your id for this customer; provisioning is idempotent on it maxLength: 128 |
| timezone | string | Default: "UTC". |
| locale | string | Default: "en". |
| quiet_hours | object |
{
"type": "object",
"required": [
"name"
],
"additionalProperties": false,
"properties": {
"name": {
"type": "string",
"minLength": 2,
"maxLength": 120
},
"external_ref": {
"type": "string",
"maxLength": 128,
"description": "Your id for this customer; provisioning is idempotent on it"
},
"timezone": {
"type": "string",
"default": "UTC"
},
"locale": {
"type": "string",
"default": "en"
},
"quiet_hours": {
"$ref": "#/components/schemas/QuietHours"
}
}
}WorkspacePatch
| Field | Type / required | Description / constraints |
|---|---|---|
| name | string | minLength: 2; maxLength: 120 |
| timezone | string | |
| locale | string | |
| quiet_hours | object |
{
"type": "object",
"additionalProperties": false,
"properties": {
"name": {
"type": "string",
"minLength": 2,
"maxLength": 120
},
"timezone": {
"type": "string"
},
"locale": {
"type": "string"
},
"quiet_hours": {
"$ref": "#/components/schemas/QuietHours"
}
}
}WorkspaceKey
| Field | Type / required | Description / constraints |
|---|---|---|
| id | string | format: uuid |
| workspace_id | string | format: uuid |
| name | string | |
| key_prefix | string | |
| key | string | wpr_… workspace key; shown once |
| created_at | string | format: date-time |
{
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid"
},
"workspace_id": {
"type": "string",
"format": "uuid"
},
"name": {
"type": "string"
},
"key_prefix": {
"type": "string"
},
"key": {
"type": "string",
"description": "wpr_… workspace key; shown once"
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}Also available outside v1: GET /api/public/status without a key. It reports recorded processing evidence; unknown/degraded checks can return 503 and do not prove a provider can deliver a particular message. Public v1 has no RCS send, message-cancel or bulk-recipient endpoint.
Responses, status and safe retries
A successful send returns HTTP 202 with a data envelope. Save the ID, then inspect the latest status; a later delivery failure is different from an HTTP validation rejection.
{
"data": {
"id": "11111111-1111-4111-8111-111111111111",
"status": "queued",
"channel": "whatsapp",
"to": "+919876543210",
"reference": "order-1042-recipient-57",
"attempts": 0,
"error": null
}
}- queued/scheduled: waiting for an eligible attempt. sending: claimed by a worker. sent: provider acceptance. delivered/read: recorded receipts where supported. failed: inspect error/provider references. canceled: stopped. uncertain: acceptance needs reconciliation; do not start another send.
- Idempotency-Key protects one notification; reference/metadata correlate it with your business event and are not duplicate protection. Use different keys for different notifications, and the identical original key/payload when retrying one.
- Idempotent-Replay: true means an earlier response snapshot, including possible errors. Always GET the saved job for current evidence. A 409 idempotency_in_progress means wait and retry with the same key. No automatic key rotation after a timeout or 5xx.
- Keys share the workspace/endpoint idempotency scope. Rate limits are configured per key, with partner aggregate and child limits. Respect Retry-After on 429, and avoid tight polling. The examples do one status lookup.
- Provider quality/marketing limits, opt-outs, suppression, sending hours and credits can defer or refuse a send independently of API authentication. Never turn an uncertain provider outcome into a resend.
Signed outgoing webhooks
Create a subscription under Developers → Outgoing webhooks, then explicitly reveal/copy its signing secret. REST POST /webhooks returns the secret on creation; GET does not. The console provides authorised reveal and rotation. Rotation immediately affects future attempts/retries; update your receiver in coordination, since there is no dual-secret grace period.
Verify X-PulseRelay-Signature (sha256= plus a hex HMAC-SHA256 of raw body bytes) with that secret. X-PulseRelay-Event names the event; X-PulseRelay-Delivery equals body.id and stays stable on retries; X-PulseRelay-Attempt counts attempts. De-duplicate durably by delivery ID and do slow work after durable acknowledgement.
{
"id": "22222222-2222-4222-8222-222222222222",
"event": "message.status",
"tenant_id": "33333333-3333-4333-8333-333333333333",
"created_at": "2026-11-10T06:00:00Z",
"data": {
"id": "11111111-1111-4111-8111-111111111111",
"channel": "whatsapp",
"status": "delivered",
"reference": "order-1042-recipient-57",
"metadata": {
"order_id": "1042"
}
}
}// Node/TypeScript backend. Read raw bytes BEFORE JSON middleware alters them.
import { createHmac, timingSafeEqual } from "node:crypto";
export async function receive(request: Request, storeOnce: (id: string, event: unknown) => Promise<void>) {
const secret = process.env.PULSERELAY_WEBHOOK_SECRET;
if (!secret) return new Response("Receiver not configured", { status: 503 });
const raw = Buffer.from(await request.arrayBuffer());
const match = /^sha256=([0-9a-f]{64})$/i.exec(request.headers.get("X-PulseRelay-Signature") ?? "");
const expected = createHmac("sha256", secret).update(raw).digest();
if (!match || !timingSafeEqual(Buffer.from(match[1], "hex"), expected))
return new Response("Invalid signature", { status: 401 });
const event = JSON.parse(raw.toString("utf8"));
// Implement storeOnce with a durable unique event ID and your processing/outbox transaction.
// A duplicate must safely return without redoing business work. If storage fails, throw/return 5xx.
await storeOnce(event.id, event);
return new Response(null, { status: 204 });
}Return 2xx within 10 seconds. Redirects are not followed. Network errors, timeouts, 408, 425, 429 and 5xx retry after approximately 30s, 2m, 10m, 30m, 2h and 6h (with jitter), up to seven attempts. Other non-2xx outcomes stop. Events can repeat or arrive out of order; inspect provider/message references before changing a terminal state. Recent history shows only the latest 50 attempts.
Events: voice.outreach_finished, message.received, message.status, message.sent, message.failed, campaign.finished, contact.created, contact.opted_out, contact.opted_in. The subscription event catalogue is common, but delivery/receipt coverage varies by channel and provider. Meta/provider callbacks into PulseRelay are separate from these outgoing application webhooks; configure them using Settings/Channels, not this receiver secret.
Discovery, contacts, OTP and partner workflows
Discover senders/templates and upsert contacts
curl --silent --show-error --include -X GET "https://getpulserelay.com/api/public/v1/numbers" \
-H "Authorization: Bearer $PULSERELAY_API_KEY"
curl --silent --show-error --include -X GET "https://getpulserelay.com/api/public/v1/templates" \
-H "Authorization: Bearer $PULSERELAY_API_KEY"
curl --silent --show-error --include -X POST "https://getpulserelay.com/api/public/v1/contacts" \
-H "Authorization: Bearer $PULSERELAY_API_KEY" \
-H "Content-Type: application/json" \
--data '{
"phone": "+919876543210",
"name": "Customer",
"tags": [
"orders"
],
"attributes": {
"customer_id": "57"
}
}'Discovery data is grouped as data.whatsapp, data.sms/data.sms_dlt and data.email where supported. WhatsApp template records include the exact name, language, saved approval status, body and variable count. Verify current sender/account compatibility in the app.
Contacts match by phone in the selected workspace. Omitted fields keep their existing values on updates; supplied tags/attributes replace their respective fields, rather than appending. Upsert does not grant marketing consent or clear opt-outs. GET /contacts supports search and limit (default 50, max 200), newest first; it currently has no cursor/offset paging. Use Contacts → Export CSV for a full export.
Send and verify OTP codes
curl --silent --show-error --include -X POST "https://getpulserelay.com/api/public/v1/otp" \
-H "Authorization: Bearer $PULSERELAY_API_KEY" \
-H "Idempotency-Key: login-event-1042-recipient-57" \
-H "Content-Type: application/json" \
--data '{
"channel": "whatsapp",
"to": "+919876543210",
"template_name": "your_authentication_template",
"language": "en",
"code_length": 6,
"ttl_seconds": 600,
"max_attempts": 5
}'
curl --silent --show-error --include -X POST "https://getpulserelay.com/api/public/v1/otp/verify" \
-H "Authorization: Bearer $PULSERELAY_API_KEY" \
-H "Content-Type: application/json" \
--data '{
"id": "REPLACE_WITH_OTP_CHALLENGE_UUID",
"code": "123456"
}'For SMS use channel=sms and text containing {code}, plus the applicable registered DLT template. data.id is the OTP challenge; data.delivery.message_id is the dispatch job. Code length: 4–8, expiry: 60–1800 seconds, attempts: 1–10 (defaults 6 / 600 / 5). Delivery acceptance does not prove receipt. Verification reports already_verified (409), expired/superseded (410), invalid_code with attempts_remaining (422), or too_many_attempts (429). Never log the user's code.
Partner provisioning and child workspace access
Ask platform support to enable partner status. Use a wpp_ key with required scopes. Provision each customer with a stable external_ref and save data.id; repeat provisioning for that external_ref returns the existing child. Setup/connection readiness must still be completed in the child workspace.
curl --silent --show-error --include -X POST "https://getpulserelay.com/api/public/v1/partner/workspaces" \
-H "Authorization: Bearer $PULSERELAY_API_KEY" \
-H "Content-Type: application/json" \
--data '{
"name": "Customer workspace",
"external_ref": "customer-57",
"timezone": "Asia/Kolkata"
}'
curl --silent --show-error --include -X GET "https://getpulserelay.com/api/public/v1/partner/workspaces/CHILD_WORKSPACE_UUID" \
-H "Authorization: Bearer $PULSERELAY_API_KEY"For child calls (/messages, /numbers, /templates, /contacts, /otp, /webhooks), add X-PulseRelay-Workspace: CHILD_WORKSPACE_UUID. The child must belong to this partner and have API access. Workspace keys act only for their own workspace. GET/PATCH /partner/workspaces/{workspaceId} inspect/update customer setup; POST /partner/workspace-keys can issue a child key shown once.
Scopes: messages:send for sends; messages:read for status; templates:read for catalog/senders; otp for OTP; webhooks:manage for subscriptions; workspaces:read/workspaces:write for provisioning/read/update and keys:create for child keys. Contact operations use the authorised workspace context. Keep test and production keys separate; revoke an old key after moving its clients to the replacement.
Troubleshooting and getting help
Error bodies usually include error and code; older contact errors may provide only error. Inspect the HTTP status too. Example: {"error":"Template not found or not approved","code":"template_not_found"}
- 400 invalid_request / invalid_phone
- Fix JSON, required fields and recipient country code. RCS is not a v1 send channel.
- 401 invalid_key / unauthorized
- Use a current workspace or partner API key as a Bearer token. Never use a Meta token here.
- 403 plan_no_api / insufficient_scope
- Review workspace API access, partner scopes and sender permissions with the admin.
- 404 template_not_found / invalid_from / workspace_not_found
- Check the exact account, approved template/language, sender UUID and partner child workspace. invalid_from may instead be 422.
- 409 idempotency_in_progress
- Wait and retry the identical request with the same key. Do not generate a replacement key.
- 422 opted_out / recipient_suppressed / outside_window
- Respect the opt-out/suppression. For WhatsApp outside the service window, use an eligible approved template with permission.
- 422 variables_mismatch / email_not_ready / DLT errors
- Correct parameter count/order or channel/registered sender setup. See the returned error/code. Check Channels and Templates.
- 429 rate_limited
- Wait for Retry-After seconds. Limits are configured per key; partner traffic also has aggregate and per-child limits. OTP attempt limits require a new challenge, not a send retry.
- 451 residency blocked
- Ask the workspace admin/support to review the data-region contract; changing credentials does not fix it.
- 5xx / timeout / lost response
- Acceptance may be unknown. Retain the key/payload, inspect saved status/provider references and contact support if needed. Replayed responses are snapshots and can include an earlier error.
If a queued job stays waiting, check Channels, credits, sending hours and Delivery health. After provider acceptance, a failed receipt is a delivery failure, not proof the original request was rejected. RCS questions need the agent/provider reference and app outcome; a fabricated REST channel value will not enable RCS.
For support, share the workspace ID, endpoint/method, HTTP status, error code, message/job ID, provider reference if available, and timestamp/timezone. Exclude API keys, tokens, passwords and message content. Ask for integration help.
Still stuck? Open a support ticket.