Send messages, pull conversations into your CRM, raise tickets from your helpdesk. Everything below is scoped to your organisation — a key can never read another tenant's data.
delivered: false, test_mode: true, but nothing leaves IkoniaCX.Send the key as a bearer token. Treat it like a password: server-side only, never in browser code, a mobile app, or a git repository.
curl https://cx.ikonia.co.za/api/v1/ping \
-H "Authorization: Bearer ikx_live_your_key_here"If your HTTP client cannot set Authorization, X-API-Key is accepted as an alternative.
/ping confirms which organisation the key resolved to — the first thing to check when something is not behaving:
{
"ok": true,
"organization": { "id": "…", "name": "Acme Ltd" },
"environment": "live",
"scopes": ["conversations:read", "messages:send"]
}Deny by default: a key can do only what it was granted. Sending scopes are separated from writing scopes on purpose — they cost money and reach real people, so a read-mostly integration cannot message anyone even if it is compromised.
conversations:readList and read conversationsconversations:writeClose, reopen and assign conversationsmessages:readRead messages in a conversationmessages:sendSend a message to a customercontacts:readList and read contactscontacts:writeCreate and update contacts, manage groupstickets:readList and read ticketstickets:writeCreate and update ticketsbroadcasts:sendSend a WhatsApp broadcastwebhooks:manageRegister and remove webhook endpointsAll read endpoints are live. Every list is cursor paginated and returns data, has_more and next_cursor.
/v1/ping—Which organisation this key belongs to, and its scopes
/v1/conversationsconversations:readList conversations across every channel
/v1/conversations/{id}conversations:readOne conversation with its contact and channel
/v1/conversations/{id}/messagesmessages:readThe transcript, oldest first, with the files on each message
/v1/messages/{id}/attachments/{n}messages:readDownload one file of a message
/v1/contactscontacts:readList and search contacts
/v1/contacts/{id}contacts:readOne contact, including the groups it belongs to
/v1/contact-groupscontacts:readAudiences, with member counts
/v1/ticketstickets:readList tickets
/v1/tickets/{id}tickets:readOne ticket
/v1/contacts/{id}/conversationsconversations:readEvery conversation with one person, across all channels
/v1/messagesmessages:sendSend email or WhatsApp to a person — creates the contact and thread if needed
/v1/conversations/{id}/messagesmessages:sendReply in an existing thread, with files if you like
/v1/conversations/{id}conversations:writeClose, reopen, or set the topic
/v1/contactscontacts:writeCreate a contact, or return the existing match
/v1/contacts/{id}contacts:writeUpdate a contact
/v1/ticketstickets:writeRaise a ticket, optionally against a conversation
/v1/tickets/{id}tickets:writeUpdate status, priority or subject
/v1/contact-groupscontacts:writeCreate a sending list (idempotent on name)
/v1/contact-groups/{id}/memberscontacts:readWho is on the list, and how many have no phone
/v1/contact-groups/{id}/memberscontacts:writeAdd members by id, email address or phone
/v1/contact-groups/{id}/memberscontacts:writeRemove members
/v1/whatsapp/templatesbroadcasts:sendApproved templates and how many variables each takes
/v1/whatsapp/templatesbroadcasts:sendSubmit a template for WhatsApp approval
/v1/broadcastsbroadcasts:sendBroadcast history
/v1/broadcastsbroadcasts:sendSend an approved template to an audience
/v1/broadcasts/{id}broadcasts:sendProgress and failures
/v1/webhookswebhooks:manageRegistered endpoints and the events available
/v1/webhookswebhooks:manageRegister an endpoint — returns the signing secret once
/v1/webhooks/{id}webhooks:manageOne endpoint, with its last 20 delivery attempts
/v1/webhooks/{id}webhooks:manageChange events, pause, or re-enable after failures
/v1/webhooks/{id}webhooks:manageRemove an endpoint
Common query parameters:
limitRows per page, 1–100. Default 25.cursorPass next_cursor from the previous response.statusconversations: open, closed · tickets: open, pending, resolved, closedchannelconversations: gmail, facebook, instagram, whatsappsearchcontacts: matches name, email, phone or companygroup_idcontacts: only members of that groupcurl "https://cx.ikonia.co.za/api/v1/conversations?status=open&limit=25" \
-H "Authorization: Bearer $IKONIACX_KEY"Filters: status (open/closed), channel(gmail, facebook, instagram, whatsapp), limit (max 100),cursor.
{
"data": [
{
"id": "…",
"subject": "Where is my order?",
"status": "open",
"last_message_at": "2026-08-06T09:12:00Z",
"contacts": { "name": "Jane Smith", "email": "jane@example.com" },
"channels": { "provider": "gmail" }
}
],
"has_more": true,
"next_cursor": "2026-08-06T09:12:00Z"
}Rather than polling, register an endpoint and we will POST to it when something happens.
curl -X POST https://cx.ikonia.co.za/api/v1/webhooks -H "Authorization: Bearer $IKONIACX_KEY" -H "Content-Type: application/json" -d '{
"url": "https://your-app.example.com/hooks/ikoniacx",
"events": ["message.received", "ticket.created"]
}'The response includes a secret shown once. Store it — every delivery is signed with it.
message.receivedA customer sent you something, on any channelmessage.sentA message went out — from your API calls or from the appconversation.closedA thread was closedticket.createdA ticket was raisedticket.status_changedA ticket moved statusEvery request carries X-IkoniaCX-Signature: t=<unix>,v1=<hex>. The signature covers "<t>.<raw body>", so you must hash the body exactly as received — parse it only after verifying.
const crypto = require('crypto')
function verify(rawBody, header, secret) {
const parts = Object.fromEntries(header.split(',').map(p => p.split('=')))
const t = Number(parts.t)
// Reject anything older than five minutes. The timestamp is INSIDE the
// signed string, so a captured request cannot be re-stamped and replayed.
if (Math.abs(Date.now() / 1000 - t) > 300) return false
const expected = crypto.createHmac('sha256', secret)
.update(t + '.' + rawBody).digest('hex')
return crypto.timingSafeEqual(Buffer.from(expected), Buffer.from(parts.v1))
}PATCH …{id} {"active": true}.X-IkoniaCX-Delivery. A retry after a response we never saw will arrive twice.Cursor-based, not offset. New messages arrive constantly, so an offset page shifts under you between requests and rows are silently skipped or repeated. Pass next_cursor back as cursor until has_more is false.
# page through every contact
cursor=""
while :; do
page=$(curl -s "https://cx.ikonia.co.za/api/v1/contacts?limit=100&cursor=$cursor" -H "Authorization: Bearer $IKONIACX_KEY")
echo "$page" | jq -r '.data[].id'
[ "$(echo "$page" | jq -r .has_more)" = "true" ] || break
cursor=$(echo "$page" | jq -r .next_cursor)
doneThe cursor is opaque — do not construct or parse one. It encodes both the sort value and the row id, which is what stops rows being skipped when several share a timestamp (common in imported data). An invalid cursor returns 400 invalid_cursor.
Required on every request that sends something. The header is any unique string you generate — one per message, reused unchanged on every retry of that message.
curl -X POST https://cx.ikonia.co.za/api/v1/conversations/{id}/messages \
-H "Authorization: Bearer $IKONIACX_KEY" \
-H "Idempotency-Key: 7f3a9c2e-4b1d-4e8a-9f2c-1a2b3c4d5e6f" \
-H "Content-Type: application/json" \
-d '{"content": "Your order ships today."}'Reuse the same key when you retry. If a request times out you cannot tell whether it arrived — retrying with the same key returns the original result instead of sending a second message. Generating a fresh key per attempt defeats the mechanism entirely, and your customer receives duplicates.
WhatsApp only delivers free text within 24 hours of the customer's last message to you. To message someone first, or someone who has gone quiet, send an approved template: pass template in place of content.
curl -X POST https://cx.ikonia.co.za/api/v1/messages \
-H "Authorization: Bearer $IKONIACX_KEY" \
-H "Idempotency-Key: 5b1e0c9a-2d3f-4a6b-8c7d-9e0f1a2b3c4d" \
-H "Content-Type: application/json" \
-d '{
"channel": "whatsapp",
"to": "+27821234567",
"template": { "name": "new_enquiry", "variables": ["Thandi"] }
}'variables fills {{1}}, {{2}} and so on, in order. The count must match the template. GET /v1/whatsapp/templates lists what is approved.message.received webhook, and for the next 24 hours content works, here or as a reply in the thread.409 outside_messaging_window and nothing is sent. WhatsApp itself would accept such a message and then drop it, so a success from us always means it was handed over for delivery.27821234567), whatever spelling you send. Include the country code.Both send endpoints take attachments, on WhatsApp and email. On WhatsApp each file arrives as its own message, and content becomes the caption of the first file that can carry one. A file on its own is a message, so content is optional when you attach something.
curl -X POST https://cx.ikonia.co.za/api/v1/conversations/{id}/messages \
-H "Authorization: Bearer $IKONIACX_KEY" \
-H "Idempotency-Key: 3c9e1f2a-6b7d-4e8f-a1b2-c3d4e5f6a7b8" \
-H "Content-Type: application/json" \
-d '{
"content": "Your invoice is attached.",
"attachments": [
{ "filename": "invoice.pdf", "content_type": "application/pdf", "data": "JVBERi0xLjQK..." },
{ "url": "https://files.example.com/brochure.pdf" }
]
}'Or upload files directly as multipart/form-data, which avoids base64:
curl -X POST https://cx.ikonia.co.za/api/v1/conversations/{id}/messages \
-H "Authorization: Bearer $IKONIACX_KEY" \
-H "Idempotency-Key: 8d2f4a6c-1e3b-4c5d-9f7a-0b1c2d3e4f5a" \
-F "content=Photos from today's visit" \
-F "attachments=@site-1.jpg" \
-F "attachments=@site-2.jpg"data (base64) with a filename, or a public https url that WhatsApp fetches itself (WhatsApp only). content_type is optional; the file extension decides when it is absent.422 invalid_attachment before anything is sent, and the Idempotency-Key stays unspent, so fix the file and retry with it.url, or split them across requests.message_ids, one per WhatsApp message in send order, beside id (the first).Every message carries an attachments list: in message.received and message.sent webhooks, and on each message from GET /v1/conversations/{id}/messages. It is empty when there are no files. Each entry has a url that downloads the file with your API key (scope messages:read).
"attachments": [
{
"type": "image",
"filename": null,
"mime_type": "image/jpeg",
"size_bytes": 134501,
"url": "https://cx.ikonia.co.za/api/v1/messages/wamid.HBgL...%3D/attachments/0"
}
]curl -L "https://cx.ikonia.co.za/api/v1/messages/wamid.HBgL...%3D/attachments/0" \
-H "Authorization: Bearer $IKONIACX_KEY" -o photo.jpgtype is image, video, audio or file. filename, mime_type and size_bytes are null when the channel does not say.url as given; the message id in it is URL-encoded. The download answers with the file's own Content-Type and a filename.410 attachment_expired), so save those when the webhook arrives.content holds the caption, or [Image] when there is none. It is a description only when the organisation has image analysis switched on.Every response carries X-RateLimit-Remaining. A 429 includes Retry-After in seconds — wait that long rather than retrying immediately.
RFC 7807 application/problem+json. Branch on code, show detail to a human.
{
"type": "https://cx.ikonia.co.za/docs/api/errors#insufficient_scope",
"title": "insufficient scope",
"status": 403,
"code": "insufficient_scope",
"detail": "This key is missing the \"messages:send\" scope."
}missing_api_keyNo key was sent. Use the Authorization header.invalid_api_keyUnknown, revoked or expired key. The same message is returned for all three deliberately.insufficient_scopeThe key is valid but lacks the scope this endpoint needs.not_foundNo such record — or it belongs to another organisation. Identical response for both, by design.invalid_parameterA query parameter is out of range or not a recognised value.invalid_cursorThe cursor was altered or is from a different endpoint. Pass next_cursor back unchanged.outside_messaging_windowWhatsApp free text needs a customer message in the last 24 hours. Send a template instead. Nothing was sent.template_not_approvedWhatsApp has not approved that template (or has paused it), so it cannot be sent.variable_mismatchThe number of template variables supplied does not match the template.invalid_attachmentAn attachment is malformed: not base64, no filename, or both data and url.invalid_attachmentThe channel cannot carry that file (type, size or count). The detail names the file. Nothing was sent.attachments_unsupportedFiles can be sent on email and WhatsApp only. Nothing was sent.attachment_not_foundThe message has no file at that position.attachment_expiredA Facebook or Instagram file whose link Meta no longer serves. Fetch files when the webhook arrives.attachment_unavailableThe mailbox did not return an email attachment. Try again later.partially_deliveredSome WhatsApp messages of a multi-file send went out before one failed. They are recorded. Do not retry with the same key.rate_limitedBudget exhausted. Honour Retry-After.internal_errorOur fault. The request did not complete.ikx_live_ prefix is recognised by GitHub's secret scanning, so a committed key is likely to be flagged — do not rely on that.Reading, writing, sending, broadcasting and outbound webhooks are all live. Google Business reviews are the one deliberate omission — see above. Google Business reviews are not available over the API. They are managed in IkoniaCX itself, where replying to one is a judgement call rather than something a third-party system should automate.