Skip to main content

Qlara Platform API

Overview​

The Qlara Platform API is a unified REST interface that lets you:

  • Send campaigns on SMS, RCS and WhatsApp, to your contact lists or to phone numbers written in the request, at once or on a schedule
  • Send email campaigns from a verified sender, to your contact lists or to addresses written in the request, and read their opens and clicks
  • Manage contacts and lists used as campaign targets
  • Follow every delivery: the counters and statistics of a campaign, and the status of the messages sent one at a time, by polling or by webhook
  • Browse and export the history of the messages sent through the API (campaign messages are not part of it)
  • Handle two-way conversations through the inbox
  • Upload media (images, videos) reused across campaigns and conversations
  • Read connected social profiles (Facebook, Instagram, LinkedIn, Google Business Profile, TikTok, YouTube), connected in the web dashboard

Note: Campaigns send SMS, RCS and WhatsApp messages to many recipients. Sending one message per call is done by the single sends of the messaging API (/api/message-server): this API tracks their delivery.


Authentication​

Every request must include a valid API key in the X-API-Key HTTP header:

X-API-Key: <your-api-key>

API keys are scoped to your account. Use the API Keys section to create and manage them.


Request Identification​

Every response carries an X-Request-Id header with the identifier the platform assigned to the request:

X-Request-Id: 16d9b2a9ca97da0d8c4c4ea2ae689017

Quote it when contacting support about a specific call: it is the key our logs are searched by.


Supported Channels​

ChannelKeyAvailable Operations
SMSSMSSMS sender IDs (/sms)
RCSRCSRCS agents and per-message status (/rcs)
WhatsAppWHATSAPPWhatsApp numbers and per-message status (/whatsapp)
EmailEMAILEmail campaigns (/campaigns/email)

Each operation opens the endpoints under the path of the same name: the cross-channel delivery status and history under /messages need MESSAGES, the per-message status of RCS and WhatsApp under /rcs and /whatsapp needs RCS or WHATSAPP, and the delivery-status webhook needs WEBHOOKS. Campaigns need CAMPAIGNS, which opens all of them, or the operation of their channel: SMS, RCS and WHATSAPP open the campaigns of that channel (a combined sending mode such as RCS_SMS needs every channel in it), and EMAIL opens the email campaigns. Operations scope only this API: the messaging API (/api/message-server) accepts any key of your account, whatever its operations.


Delivery Statuses​

Every delivery-tracking endpoint reports the same normalised deliveryStatus, and the delivery-status webhook sends the matching numeric code. Both come from one table:

CodedeliveryStatusdeliveryStatusDescriptionChannelsMeaning
1ACCEPTEDacceptedSMSAccepted and handed to the carrier; no delivery receipt has come back yet. Not final.
2REJECTEDrejectedSMSThe carrier refused the message. Final.
3DELIVEREDdeliveredSMS, RCS, WhatsAppThe carrier confirmed the message reached the handset. Final.
4EXPIREDexpiredSMS, RCS, WhatsAppNot delivered within its validity window; the carrier discarded it. Final.
5DELETEDdeletedSMSThe message was cancelled before it could be delivered. Final.
6UNDELIVERABLEundeliverableSMSThe destination cannot receive the message (unreachable or invalid number). Final.
9ERRORgeneral errorRCS, WhatsAppDelivery failed. Final.
10DISABLEDdisabledRCS, WhatsAppThe recipient has the channel switched off. Final.
11UNSUPPORTEDunsupportedRCS, WhatsAppThe recipient's device or number does not support the channel. Final.
12CONVERSATION_CLOSEDconversation closedWhatsAppThe 24-hour customer-service window had closed. Final.
0UNKNOWNunknownSMS, RCS, WhatsAppThe platform holds no status for this message.

A message that has been sent but not yet confirmed reads ACCEPTED on SMS and UNKNOWN on RCS and WhatsApp, which have no intermediate code of their own. deliveryDate is set only once a receipt arrives, so a DELIVERED message carries one.

The delivery-status webhook carries the same numbers, so one table reads both the API and the callback. The callback registered through POST /api/partner-gateway/webhooks/delivery-status sends the code as statusCode and the third column as description; the SMS platform's own delivery callback sends the same number as DELIVERY_STATUS.

Two exceptions. The webhook never sends 1 (ACCEPTED): an SMS event is sent only once its final receipt arrives. And it sends 4 (EXPIRED) only for SMS: an RCS or WhatsApp message that expires produces no event, and shows as EXPIRED only when polled, through GET /api/partner-gateway/messages/status, GET /api/partner-gateway/rcs/messages/{messageId}, GET /api/partner-gateway/whatsapp/messages/{messageId} or GET /api/partner-gateway/messages/history.


Core Workflows​

1 — Send a campaign​

POST /api/partner-gateway/campaigns -> create campaign (draft)
GET /api/partner-gateway/campaigns/{id}/price -> recipients and price, nothing reserved
PUT /api/partner-gateway/campaigns/{id}/confirm -> schedule & send
GET /api/partner-gateway/campaigns/{id} -> status and delivery counters
GET /api/partner-gateway/campaigns/stats -> delivery statistics

Recipients are the contact lists in contactListIds (destinationType 0), the phone numbers in destinations (1) or both (2).

2 — Send an email campaign​

POST /api/partner-gateway/campaigns/email -> create campaign (draft)
GET /api/partner-gateway/campaigns/email/{id}/price -> recipients and price, nothing reserved
PUT /api/partner-gateway/campaigns/email/{id}/confirm -> reserve the price, check the content & send
GET /api/partner-gateway/campaigns/email/{id} -> status and counters, opens and clicks included

Email campaigns have endpoints of their own. The sender is a VERIFIED one from GET /api/partner-gateway/campaigns/email/senders; recipients are the contact lists in contactListIds (destinationType 0) or the addresses in destinations (1).

3 — Track the delivery status of a message​

GET /api/partner-gateway/messages/status/{customerMessageId}?channel=SMS
-> 200 { deliveryStatus: "DELIVERED" }

This covers the messages sent one at a time through the send APIs: a campaign reports its deliveries on the campaign itself. You can also query RCS and WhatsApp message statuses through their dedicated endpoints.

4 — Receive delivery events via webhook (no polling)​

POST /api/partner-gateway/webhooks/delivery-status
{ "callbackUrl": "https://your-server.example.com/webhook" }

The platform will POST delivery events to that URL automatically for the messages sent through the SMS, RCS and WhatsApp send APIs, conversation replies included. Messages of campaigns produce no DELIVERY or READ event: follow a campaign with GET /api/partner-gateway/campaigns/{id} and GET /api/partner-gateway/campaigns/stats.

5 — Export message history​

POST /api/partner-gateway/messages/history/export -> 202 Accepted
GET /api/partner-gateway/exports -> poll until a new entry for your request appears
GET /api/partner-gateway/exports/{exportId} -> retrieve download URL

An export is listed only once its file is ready, already downloadable: recognize the new entry by its createdAt and detail. An export that fails is never listed.


Asynchronous Operations​

Operations that may take a long time (campaign sending, data exports) return 202 Accepted immediately and process in the background. Use the corresponding list or status endpoint to monitor progress.


Common HTTP Status Codes​

CodeMeaning
200OK — request succeeded
201Created — resource created successfully
202Accepted — asynchronous job queued
204No Content — operation succeeded with no response body
400Bad Request — validation error; inspect the response body for details
401Unauthorized — missing or invalid X-API-Key, or a key that does not include the operation you called
402Payment Required — your wallet does not cover the price of the email campaign you are confirming
403Forbidden — the call is not allowed for your key or account (e.g. POST /api/partner-gateway/authentication asking for operations the calling key does not hold)
404Not Found — the requested resource does not exist
409Conflict — the request conflicts with the current state of the resource (e.g. a webhook is already configured, or a media item is public or still in use)
500Internal Server Error
502Bad Gateway — an upstream service or channel provider returned an error, refused the request, or could not be reached
504Gateway Timeout — an upstream service did not answer in time. On a send, the message may have been accepted anyway: check its status before sending it again

Any other status an upstream service answers with (e.g. 422, 503, 504) is passed on unchanged, except 401 and 403, which become 502: your key was already accepted, so they describe a problem on our side. A 400 from an upstream service carries its reason in the response body when the service gives one.

Authentication​

Authentication

Security Scheme Type:

apiKey

Header parameter name:

X-API-Key