Send a unified message
Single send path for all channels: local/international SMS, official WhatsApp, WhatsApp Web (including native groups and images), Telegram bots, and email. `to` is a string for one recipient or an array of up to 100 (official batch). Official WhatsApp template headers accept a file or URL in the same request. HTTP 200 when every item succeeds, 207 on partial batch failure. Use Idempotency-Key for safe retries.
When to use it. Any operational send from your system. For OTP send/resend/verify lifecycle use /api/v2/verification/*.
Code example
Correct: Correct local SMS
curl --location 'https://raselsms.com/api/v2/messages/send' \--header 'X-API-Key: YOUR_API_KEY' \--header 'Content-Type: application/json' \--data '{"to":"+963912345678","channel":"local_sms","messageType":"free_text","content":{"text":"Hello, this is a test message from Rasel."}}'Correct: OTP with automatic channel
curl --location 'https://raselsms.com/api/v2/messages/send' \--header 'X-API-Key: YOUR_API_KEY' \--header 'Content-Type: application/json' \--header 'Idempotency-Key: otp-login-user-42-attempt-1' \--data '{"to":"+963912345678","channel":"auto","messageType":"otp","content":{"otpCode":"482193"}}'Correct: Official WhatsApp template with variables and URL button
curl --location 'https://raselsms.com/api/v2/messages/send' \--header 'X-API-Key: YOUR_API_KEY' \--header 'Content-Type: application/json' \--data '{"to":"+963911111111","messageType":"utility","channel":"official_whatsapp","template":{"key":"order_ready_notice","variablesIndexed":["أحمد","A-1042","25000"],"buttonVariables":[{"index":0,"subType":"url","text":"A-1042"}],"headerMediaUrl":"https://cdn.example.com/order-ready.jpg","headerMediaType":"image"}}'Correct: Official WhatsApp template with header file in the same request
curl --location 'https://raselsms.com/api/v2/messages/send' \--header 'X-API-Key: YOUR_API_KEY' \--header 'Content-Type: multipart/form-data' \--data '{"to":"+963912345678","channel":"official_whatsapp","messageType":"marketing","template":"{\"key\":\"bookingconfirmation6\",\"language\":\"ar\",\"variablesIndexed\":[\"أحمد\"]}","mediaType":"document","headerMedia":"<multipart binary PDF>","note":"Content-Type: multipart/form-data"}'Correct: WhatsApp Web image
curl --location 'https://raselsms.com/api/v2/messages/send' \--header 'X-API-Key: YOUR_API_KEY' \--header 'Content-Type: application/json' \--data '{"to":"+963912345678","channel":"user_whatsapp_session","messageType":"free_text","content":{"text":"Product photo"},"attachment":{"type":"image","publicUrl":"https://cdn.example.com/catalog/sku-100.png","mimetype":"image/png","fileName":"sku-100.png"}}'Correct: Native WhatsApp Web group
curl --location 'https://raselsms.com/api/v2/messages/send' \--header 'X-API-Key: YOUR_API_KEY' \--header 'Content-Type: application/json' \--data '{"to":"120363012345678901@g.us","channel":"user_whatsapp_session","messageType":"free_text","content":{"text":"Hello group"},"conversationContext":{"moduleType":"whatsapp_web","accountId":"session-user-whatsapp-1","chatId":"120363012345678901@g.us"}}'Correct: Telegram bot subscriber
curl --location 'https://raselsms.com/api/v2/messages/send' \--header 'X-API-Key: YOUR_API_KEY' \--header 'Content-Type: application/json' \--data '{"to":"123456789","channel":"telegram_bot","messageType":"free_text","content":{"text":"Hello from the bot"},"conversationContext":{"moduleType":"telegram_bot","accountId":"6800abc123def4567890fedc","chatId":"123456789"}}'Correct: Official batch to two recipients
curl --location 'https://raselsms.com/api/v2/messages/send' \--header 'X-API-Key: YOUR_API_KEY' \--header 'Content-Type: application/json' \--data '{"to":["+963912345678","+963987654321"],"channel":"local_sms","messageType":"free_text","content":{"text":"Batch notice from Rasel."}}'Incorrect: Incorrect: missing to
curl --location 'https://raselsms.com/api/v2/messages/send' \--header 'X-API-Key: YOUR_API_KEY' \--header 'Content-Type: application/json' \--data '{"channel":"local_sms","content":{"text":"hi"}}'to is required as a string or an array.
Incorrect: Incorrect: missing API key
curl --location 'https://raselsms.com/api/v2/messages/send' \--header 'Content-Type: application/json' \--data '{"to":"+963912345678","channel":"local_sms","messageType":"free_text","content":{"text":"Hello, this is a test message from Rasel."}}'The route rejects the request immediately without X-API-Key.
Incorrect: Incorrect: Telegram without conversationContext
curl --location 'https://raselsms.com/api/v2/messages/send' \--header 'X-API-Key: YOUR_API_KEY' \--header 'Content-Type: application/json' \--data '{"to":"123456789","channel":"telegram_bot","messageType":"free_text","content":{"text":"hi"}}'telegram_bot requires moduleType, accountId, and chatId of a user who pressed /start.
Incorrect: Incorrect: number not on WhatsApp
curl --location 'https://raselsms.com/api/v2/messages/send' \--header 'X-API-Key: YOUR_API_KEY' \--header 'Content-Type: application/json' \--data '{"to":"+963900000000","channel":"official_whatsapp","messageType":"utility","template":{"key":"order_ready_notice","variablesIndexed":["أحمد"]}}'Pre-send validation blocks billing for an unregistered number.
WhatsApp Web image
curl --location 'https://raselsms.com/api/v2/messages/send' \--header 'X-API-Key: YOUR_API_KEY' \--header 'Content-Type: application/json' \--data '{"to":"+963912345678","channel":"user_whatsapp_session","messageType":"free_text","content":{"text":"Product photo"},"attachment":{"type":"image","publicUrl":"https://cdn.example.com/catalog/sku-100.png","mimetype":"image/png","fileName":"sku-100.png"}}'WhatsApp Web native group
curl --location 'https://raselsms.com/api/v2/messages/send' \--header 'X-API-Key: YOUR_API_KEY' \--header 'Content-Type: application/json' \--data '{"to":"120363012345678901@g.us","channel":"user_whatsapp_session","messageType":"free_text","content":{"text":"Hello group"},"conversationContext":{"moduleType":"whatsapp_web","accountId":"session-user-whatsapp-1","chatId":"120363012345678901@g.us"}}'WhatsApp Web group and image
curl --location 'https://raselsms.com/api/v2/messages/send' \--header 'X-API-Key: YOUR_API_KEY' \--header 'Content-Type: application/json' \--data '{"to":"120363012345678901@g.us","channel":"user_whatsapp_session","messageType":"free_text","content":{"text":"Catalog image"},"attachment":{"type":"image","publicUrl":"https://cdn.example.com/catalog/sku-100.png","mimetype":"image/png","fileName":"sku-100.png"},"conversationContext":{"moduleType":"whatsapp_web","accountId":"session-user-whatsapp-1","chatId":"120363012345678901@g.us"}}'Telegram bot subscriber
curl --location 'https://raselsms.com/api/v2/messages/send' \--header 'X-API-Key: YOUR_API_KEY' \--header 'Content-Type: application/json' \--data '{"to":"123456789","channel":"telegram_bot","messageType":"free_text","content":{"text":"Hello from the bot"},"conversationContext":{"moduleType":"telegram_bot","accountId":"6800abc123def4567890fedc","chatId":"123456789"}}'Telegram bot subscriber and image
curl --location 'https://raselsms.com/api/v2/messages/send' \--header 'X-API-Key: YOUR_API_KEY' \--header 'Content-Type: application/json' \--data '{"to":"123456789","channel":"telegram_bot","messageType":"free_text","content":{"text":"Offer image"},"attachment":{"type":"image","publicUrl":"https://cdn.example.com/offers/banner.jpg","mimetype":"image/jpeg","fileName":"banner.jpg"},"conversationContext":{"moduleType":"telegram_bot","accountId":"6800abc123def4567890fedc","chatId":"123456789"}}'WhatsApp utility template with header, variables, and URL button
curl --location 'https://raselsms.com/api/v2/messages/send' \--header 'X-API-Key: YOUR_API_KEY' \--header 'Content-Type: application/json' \--data '{"to":"+963911111111","messageType":"utility","channel":"official_whatsapp","template":{"key":"order_ready_notice","variablesIndexed":["أحمد","A-1042","25000"],"buttonVariables":[{"index":0,"subType":"url","text":"A-1042"}],"headerMediaUrl":"https://cdn.example.com/order-ready.jpg","headerMediaType":"image"}}'Matches POST /api/v2/templates order_ready_notice. variablesIndexed fills body {{1}} {{2}} {{3}}. buttonVariables[0].text is the URL-button suffix only.
Quick local SMS send
curl --location 'https://raselsms.com/api/v2/messages/send' \--header 'X-API-Key: YOUR_API_KEY' \--header 'Content-Type: application/json' \--data '{"to":"+963912345678","channel":"local_sms","messageType":"free_text","content":{"text":"Hello, this is a test message from Rasel."}}'Official WhatsApp template with header URL
curl --location 'https://raselsms.com/api/v2/messages/send' \--header 'X-API-Key: YOUR_API_KEY' \--header 'Content-Type: application/json' \--data '{"to":"+963912345678","channel":"official_whatsapp","messageType":"marketing","template":{"key":"bookingconfirmation6","language":"ar","variablesIndexed":["أحمد"],"headerMediaUrl":"https://cdn.example.com/booking.pdf","headerMediaType":"document"}}'OTP with automatic channel
curl --location 'https://raselsms.com/api/v2/messages/send' \--header 'X-API-Key: YOUR_API_KEY' \--header 'Content-Type: application/json' \--data '{"to":"+963912345678","messageType":"otp","channel":"auto","content":{"otpCode":"123456"},"sender":{"id":"6800abc123def4567890fedc"}}'OTP from a template
curl --location 'https://raselsms.com/api/v2/messages/send' \--header 'X-API-Key: YOUR_API_KEY' \--header 'Content-Type: application/json' \--data '{"to":"+963912345678","messageType":"otp","template":{"key":"verification_code","variablesIndexed":["123456"]}}'Shorthand text send
curl --location 'https://raselsms.com/api/v2/messages/send' \--header 'X-API-Key: YOUR_API_KEY' \--header 'Content-Type: application/json' \--data '{"to":"+963912345678","text":"Hello"}'Local SMS free text
curl --location 'https://raselsms.com/api/v2/messages/send' \--header 'X-API-Key: YOUR_API_KEY' \--header 'Content-Type: application/json' \--data '{"to":"+963912345678","messageType":"free_text","channel":"local_sms","content":{"text":"Hello, this is a sample API message"}}'Utility template with named variables
curl --location 'https://raselsms.com/api/v2/messages/send' \--header 'X-API-Key: YOUR_API_KEY' \--header 'Content-Type: application/json' \--data '{"to":"+963912345678","messageType":"utility","template":{"id":"64abc123...","variablesNamed":{"1":"Ahmed","2":"Order #456"}}}'Official WhatsApp marketing template
curl --location 'https://raselsms.com/api/v2/messages/send' \--header 'X-API-Key: YOUR_API_KEY' \--header 'Content-Type: application/json' \--data '{"to":"+963912345678","messageType":"marketing","channel":"official_whatsapp","template":{"key":"promo_offer","variablesIndexed":["50%","End of month"]}}'Telegram bot subscriber
curl --location 'https://raselsms.com/api/v2/messages/send' \--header 'X-API-Key: YOUR_API_KEY' \--header 'Content-Type: application/json' \--data '{"to":"123456789","channel":"telegram_bot","messageType":"free_text","content":{"text":"Hello from the bot"},"conversationContext":{"moduleType":"telegram_bot","accountId":"6800abc123def4567890fedc","chatId":"123456789"}}'Telegram bot subscriber and image
curl --location 'https://raselsms.com/api/v2/messages/send' \--header 'X-API-Key: YOUR_API_KEY' \--header 'Content-Type: application/json' \--data '{"to":"123456789","channel":"telegram_bot","messageType":"free_text","content":{"text":"Offer image"},"attachment":{"type":"image","publicUrl":"https://cdn.example.com/offers/banner.jpg","mimetype":"image/jpeg","fileName":"banner.jpg"},"conversationContext":{"moduleType":"telegram_bot","accountId":"6800abc123def4567890fedc","chatId":"123456789"}}'Official WhatsApp utility template with header media
curl --location 'https://raselsms.com/api/v2/messages/send' \--header 'X-API-Key: YOUR_API_KEY' \--header 'Content-Type: application/json' \--data '{"to":"+963911111111","messageType":"utility","channel":"official_whatsapp","template":{"key":"order_ready_notice","variablesIndexed":["أحمد","A-1042","25000"],"buttonVariables":[{"index":0,"subType":"url","text":"A-1042"}],"headerMediaUrl":"https://cdn.example.com/order-ready.jpg","headerMediaType":"image"}}'Response example
200 — Correct local SMS
{ "success": true, "requestId": "msgreq_1739012345678_abc123", "status": "sent", "resolved": { "channel": "local_sms", "provider": "sms_mtn", "senderSource": "account_default" }, "billing": { "estimatedCost": 0.02, "currency": "USD" }, "tracking": { "messageId": "6800msg123def4567890aaaa", "usageId": "6800use123def4567890bbbb", "queueId": null }}200 — OTP with automatic channel
{ "success": true, "requestId": "msgreq_1739012345678_abc123", "status": "sent", "resolved": { "channel": "int_sms", "provider": "sms_taqnyat", "senderSource": "account_default" }, "billing": { "estimatedCost": 0.02, "currency": "USD" }, "tracking": { "messageId": "6800msg123def4567890aaaa", "usageId": "6800use123def4567890bbbb", "queueId": null }}200 — Official WhatsApp template with variables and URL button
{ "success": true, "requestId": "msgreq_1739012345678_abc123", "status": "sent", "resolved": { "channel": "official_whatsapp", "provider": "meta", "senderSource": "official_default" }, "billing": { "estimatedCost": 0.02, "currency": "USD" }, "tracking": { "messageId": "6800msg123def4567890aaaa", "usageId": "6800use123def4567890bbbb", "queueId": null }}200 — WhatsApp Web image
{ "success": true, "requestId": "msgreq_1739012345678_abc123", "status": "sent", "resolved": { "channel": "user_whatsapp_session", "provider": "user_whatsapp_session", "senderSource": "session" }, "billing": { "estimatedCost": 0.02, "currency": "USD" }, "tracking": { "messageId": "6800msg123def4567890aaaa", "usageId": "6800use123def4567890bbbb", "queueId": null }}200 — Telegram bot subscriber
{ "success": true, "requestId": "msgreq_1739012345678_abc123", "status": "sent", "resolved": { "channel": "telegram_bot", "provider": "telegram_bot", "senderSource": "bot" }, "billing": { "estimatedCost": 0.02, "currency": "USD" }, "tracking": { "messageId": "6800msg123def4567890aaaa", "usageId": "6800use123def4567890bbbb", "queueId": null }}200 — Official batch to two recipients
{ "success": true, "batch": true, "summary": { "total": 2, "sent": 2, "queued": 0, "failed": 0 }, "results": [ { "to": "+963912345678", "success": true, "requestId": "msgreq_1739012345678_abc123", "status": "sent" }, { "to": "+963987654321", "success": true, "requestId": "msgreq_1739012345678_def456", "status": "sent" } ]}400 — Incorrect: missing to
{ "success": false, "requestId": "msgreq_1739012345678_abc123", "code": "VALIDATION_ERROR", "error": "to is required"}to is required as a string or an array.
401 — Incorrect: missing API key
{ "success": false, "requestId": "msgreq_1739012345678_abc123", "code": "UNAUTHORIZED", "error": "Missing or invalid API key"}The route rejects the request immediately without X-API-Key.
400 — Incorrect: Telegram without conversationContext
{ "success": false, "code": "VALIDATION_ERROR", "error": "conversationContext is required for telegram_bot"}telegram_bot requires moduleType, accountId, and chatId of a user who pressed /start.
400 — Incorrect: number not on WhatsApp
{ "success": false, "requestId": "msgreq_1739012345678_abc123", "code": "WHATSAPP_NOT_REGISTERED", "error": "الرقم غير مسجل في واتساب"}Pre-send validation blocks billing for an unregistered number.
402 — Wallet or plan pool is insufficient.
{ "success": false, "requestId": "msgreq_1739012345678_abc123", "code": "INSUFFICIENT_BALANCE", "error": "Insufficient wallet or pool balance"}409 — Idempotency-Key conflict or the key is still in progress.
{ "success": false, "requestId": "msgreq_1739012345678_abc123", "code": "IDEMPOTENCY_KEY_CONFLICT", "error": "The same Idempotency-Key was reused with a different body"}403 — Phone is not verified or the key lacks permission (usually messages:create or api_keys:read).
{ "success": false, "requestId": "msgreq_1739012345678_abc123", "code": "FORBIDDEN", "error": "Phone not verified or missing permission"}429 — Rate limit exceeded. Honor Retry-After when present.
{ "success": false, "requestId": "msgreq_1739012345678_abc123", "code": "RATE_LIMITED", "error": "Rate limit exceeded", "retryAfterSeconds": 30}HTTP request
POST /api/v2/messages/send
Request Headers
| Header | Type | Description |
|---|---|---|
| X-API-Key | string | Your Rasel API key. Send it on every documented request except inbound webhooks. * |
| Idempotency-Key | string | Optional unique key for safe retries. Takes precedence over a body idempotencyKey. Successful and failed responses can be replayed for 24 hours when send idempotency is enabled. |
Request body
| Field | Type | Description | Example |
|---|---|---|---|
| to | string | Recipient: E.164 phone, email when channel is email, WhatsApp group JID, Telegram chat id, or a string array of up to 100 recipients for an official batch. * | |
| text | string | Convenience shortcut that maps to free_text with automatic channel selection when content.text is omitted. | |
| channel | enum | Delivery channel. For unified send prefer auto, local_sms, int_sms, official_whatsapp, WhatsApp Web sessions, telegram_bot, or email_user. For verification omit the field for automatic selection; do not send bare sms, whatsapp, or auto. | |
| messageType | enum | Message classification: otp, utility, marketing, or free_text. | |
| content | object | On unified send: message content object (text, otpCode, or email subject). On templates: SMS or message body, or email HTML/text. | |
| content.text | string | Message text. On WhatsApp media this is the caption. | |
| content.otpCode | string | Verification code when messageType is otp and you are not sending a template. | |
| content.subject | string | Email subject when the channel is email. | |
| attachment | object | Outbound media for WhatsApp Web and Telegram bots. Telegram requires a public HTTPS publicUrl. | |
| attachment.type | enum | Media kind: image, video, audio, or document. * | |
| attachment.publicUrl | string | Public HTTPS URL the provider can download. Required for Telegram bot media. | |
| attachment.base64 | string | Raw base64 without a data: prefix. WhatsApp Web only. Telegram ignores it. | |
| attachment.mimetype | string | File MIME type, for example image/png. | |
| attachment.fileName | string | File name shown to the recipient, for example sku-100.png. | |
| attachment.assetId | string | Id of a media file already uploaded for this account. | |
| conversationContext | object | Required for telegram_bot. For WhatsApp Web groups set chatId to the native group JID. accountId is the session name or Telegram bot id. | |
| conversationContext.moduleType | enum | whatsapp_web, whatsapp_official, or telegram_bot. * | |
| conversationContext.accountId | string | WhatsApp Web session name, or the Telegram bot id. * | |
| conversationContext.chatId | string | WhatsApp JID, including groupId@g.us, or the Telegram chat id of a user who started the bot. * | |
| conversationContext.contactId | string | Optional contact id in Rasel. | |
| conversationContext.conversationKey | string | Optional conversation key when you already have one. | |
| template | object | Template reference (id or key), language, variables, and optional per-send header media. | |
| template.id | string | Internal template id from the templates list. | |
| template.key | string | Template name or key, such as order_ready_notice. | |
| template.language | string | Meta template language, such as ar or en. Not used for SMS. | |
| template.variablesIndexed | string-list | Body variables in order: the first value fills {{1}}. | |
| template.buttonVariables | json | URL button suffixes, separate from body variables. index is the button position starting at 0. | |
| template.variablesNamed | json | Named variables as an object of string values. | |
| template.headerAssetId | string | Previously uploaded header media id. Prefer headerMediaUrl in the same request. | |
| template.headerMediaUrl | string | Public URL of the header image, video, or document for this send only. | |
| template.headerMediaType | enum | image, video, or document. Send it with headerMediaUrl when the type is not obvious. | |
| template.header | string | String URL alias of headerMediaUrl. Never send an object. | |
| options | object | Optional send options such as scheduleAt, idempotencyKey, and client metadata. | |
| options.priority | enum | Deprecated and ignored. Sends are already high priority. | |
| options.idempotencyKey | string | Optional retry key. Prefer the Idempotency-Key header. | |
| options.scheduleAt | string | Future ISO 8601 time. Requires a plan that allows scheduled messages. | |
| options.metadata | json | Your own key-value data stored with the message. | |
| sender | object | Optional sender override. If omitted, Rasel uses the default approved sender, then the platform sender. | |
| sender.id | string | Approved SMS sender id. Leave it out to use the default sender. | |
| sender.name | string | Approved SMS sender name. Alternative to sender.id. | |
| sender.officialId | string | Official WhatsApp sender id. Same as officialSenderId. | |
| officialSenderId | string | Official WhatsApp sender id from /api/v2/official-senders. Alias of sender.officialId. Use platform for the default Meta number when listing templates. |
Response Fields
| Field | Type | Description | Example |
|---|---|---|---|
| success | enum | True when the operation succeeded, or when at least one batch recipient succeeded. | |
| requestId | string | Server-generated request identifier for tracing and support. | |
| status | enum | Delivery or record status. On send: sent, queued, or scheduled. On other resources it is the row status filter or value. | |
| scheduledAt | string | Present when status is scheduled; the deferred delivery time. | |
| resolved | object | Resolved channel, provider, and sender source after routing. | |
| resolved.channel | string | Delivery channel. For unified send prefer auto, local_sms, int_sms, official_whatsapp, WhatsApp Web sessions, telegram_bot, or email_user. For verification omit the field for automatic selection; do not send bare sms, whatsapp, or auto. | |
| resolved.provider | string | Template provider filter or value: user_session, meta, or internal. | |
| resolved.senderSource | string | How the sender was chosen: the id you sent, the account default, or the platform sender. | |
| resolved.channels | string-list | Public channel names when send-on-all-compatible-channels fan-out succeeded on more than one channel. | |
| billing | object | Estimated cost and currency for the send. | |
| billing.estimatedCost | number | Estimated price for this send before final settlement. | |
| billing.currency | string | ISO currency code for estimatedCost, such as USD. | |
| tracking | object | Provider and internal tracking identifiers, including per-channel deliveries on fan-out. | |
| tracking.messageId | string | Rasel message id for this send. | |
| tracking.usageId | string | Usage row id for this charge. | |
| tracking.queueId | string | Queue job id when the send is queued or scheduled. | |
| tracking.deliveries | json | Per-channel tracking when fan-out is enabled. |
Status Codes
| Status | Description |
|---|---|
| 200 | Success. |
| 202 | Accepted and queued. |
| 207 | Batch completed with mixed success and failure. |
| 400 | Invalid request, validation error, or the resource cannot be used in this state. |
| 401 | Missing or invalid API key. |
| 402 | Insufficient wallet balance or plan quota. |
| 403 | Phone not verified, missing permission, or the account cannot perform this action. |
| 409 | Conflict, such as an idempotency key reuse with a different body, or a session that is not ready. |
| 429 | Rate limit exceeded, or the maximum number of verification attempts was reached. |
| 502 | The external provider failed to process the request. |
| 503 | The provider is unavailable or timed out. |
Cases to handle
- Batch max is 100 recipients. Shared fields (channel, type, content/template, sender) apply to every item.
- Deprecated compat: batchRequests[] is still accepted; document and send to[].
- List accountId and chatId from conversation-context APIs before WhatsApp Web or Telegram sends.
- For official WhatsApp template headers send the file or URL in the same /messages/send request. Template create accepts headerMedia on the same POST /api/v2/templates.
Try it
This request may consume wallet balance or plan quota.
You are not signed in, or the server rejected this session. Lists stay empty until you sign in or enter a valid API key. Someone else's account is not shown.
Optional unique key for safe retries. Takes precedence over a body idempotencyKey. Successful and failed responses can be replayed for 24 hours when send idempotency is enabled.
Choose the channel, the recipient, then the message or one of your templates. Sender names, numbers, and templates come from your signed-in account when the key field is empty, or from the key owner when a key is entered.
Recipient in international format, for example +963912345678. For email, enter the address.
Where the message is delivered. The fields below change with the channel.
Approved SMS sender. Leave empty to use your default sender.
Free text is a normal message. Utility and marketing use a template. OTP can send a code or a template.
The text the recipient sees. With WhatsApp media, this is the caption.
Request
{ "to": "+963912345678", "channel": "user_whatsapp_session", "messageType": "free_text", "content": { "text": "Product photo" }, "attachment": { "type": "image", "publicUrl": "https://cdn.example.com/catalog/sku-100.png", "mimetype": "image/png", "fileName": "sku-100.png" }}Response
Send a request to see the response.