Search for a command to run...
API reference
messages:sendSend through a connected client using a Meta-compatible payload. IntelliPortal resolves the channel from client_ref and normalizes authentication, errors, request logging, and test mode.
/messages/sendSend from your backend with a key that has messages:send. The property named by type is forwarded in Meta's shape.
curl -X POST https://api.intelliconcierge.dev/v1/messages/send \
-H "Authorization: Bearer $INTELLI_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"client_ref": "customer_42",
"to": "+254700000000",
"type": "text",
"text": { "body": "Your order is ready." }
}'| Property | Type | Description |
|---|---|---|
client_refrequired | string | Your stable identifier for the connected client and channel used to send. |
torequired | string | WhatsApp recipient phone number or Instagram-scoped user ID from a webhook. |
typerequired | enum | Selects the matching payload object: text, image, video, audio, document, sticker, location, contacts, interactive, or reaction. |
<type>required | object | The payload whose property name matches type. Its shape mirrors Meta's Cloud API. |
dry_run | boolean | Validate without delivery. Always treated as true for ik_test_ keys. |
Media can use a public HTTPS link or an uploaded Meta media id. Free-form sends require an open 24-hour customer-service window.
| type | Payload essentials |
|---|---|
| text | body; optional preview_url |
| image | link or id; optional caption |
| video | link or id; optional caption |
| audio | link or id |
| document | link or id; optional caption and filename |
| sticker | link or id |
| location | latitude, longitude; optional name and address |
| contacts | Array of Meta contact objects |
| interactive | button, list, cta_url, and other Meta interactive shapes |
| reaction | message_id and emoji; an empty emoji removes the reaction |
{
"client_ref": "customer_42",
"to": "+254700000000",
"type": "text",
"text": {
"body": "Your order is ready.",
"preview_url": false
}
}/messages/send-templateTemplates are WhatsApp-only and can open a conversation outside the 24-hour service window. The name, language, and components must match an approved template on the client's WhatsApp Business Account.
{
"client_ref": "customer_42",
"to": "+254700000000",
"template": {
"name": "order_ready",
"language": { "code": "en_US" },
"components": [
{
"type": "body",
"parameters": [
{ "type": "text", "text": "1842" }
]
}
]
}
}Do not send a separate channel parameter. IntelliPortal looks up the client and routes through its connected channel.
Instagram takes text and media
to to the Instagram-scoped sender ID from a webhook. Text is limited to 1,000 characters and must be sent inside Instagram's reply window.image, video, audio and document are supported and must carry link — Instagram fetches media from a public HTTPS URL and cannot use an uploaded media id, which returns media_link_required. A caption or filename has nowhere to go on an Instagram attachment, so the send succeeds and reports it under warnings; send the caption as its own text message if you need it.sticker, location, contacts, interactive and reaction have no Instagram equivalent and return channel_type_unsupported.Store message_id to correlate later delivery status webhooks. Also capture the X-Request-Id response header for operational tracing.
{
"success": true,
"message_id": "wamid.xxx"
}{
"success": true,
"message_id": "wamid.TEST_xxx",
"dry_run": true
}A warnings array appears when the message went out but the channel could not carry part of what you sent — a caption on an Instagram attachment, for instance. The send still succeeded; nothing needs retrying. Log these, because they mean content you supplied never reached the recipient.
{
"success": true,
"message_id": "mid.xxx",
"warnings": [
"caption is not supported on Instagram attachments and was not sent — send it as a separate text message if you need it."
]
}Retry-After on 429. Do not immediately repeat requests rejected by Meta without correcting the cause.402 trial_expired blocks live delivery after trial grace; dry-runs remain available for debugging.