Reference
Changelog
Changes to the API and to this documentation, newest first.
Corrections to the API reference
- The SMS and email send responses list one entry per recipient, but not in the order given once a request has more than ten recipients. These pages said the order was kept. Match each entry to its recipient by mobile_number or email_address, never by position.
- Delivery webhooks now describes webhook.test, the event sent when you press Send test event under Developer > Webhooks in the portal. Its data holds only a fixed message, and it is signed and retried like the WhatsApp callbacks.
- The message.received example now shows payload, which the callback has always carried: Meta's own object for a shared location, contact cards, a reaction, a sticker or an unsupported message, and null for text, media, interactive and button replies.
- The media object in message.received was documented with a caption it does not have. It carries id, mime_type and filename (the name a document was sent with, null for other media); a media message's caption arrives in text.
- An interactive or button reply arrives as message.received with the title of the chosen button or list row in text and payload null. The id you gave the button or row is not passed on, so tell choices apart by title.
Balance endpoints need only the API key
- POST /api/v1/json/balance and /balance/all no longer require username and password in the body. Both fields were placeholders that nothing checked: the API key has always been what authenticates the call. Integrations that still send them keep working, and the fields are no longer written to the request log.
WhatsApp on the API
- WhatsApp sending is open on the public API. POST /api/v1/json/whatsapp/template sends an approved template to up to 1,000 recipients, each with its own body, header, button and OTP parameters, and answers with a result per recipient. POST /api/v1/json/bulk/whatsapp, which used to refuse every request, is now an alias of it.
- POST /api/v1/json/whatsapp/session sends a free-form text or media message inside a customer's 24-hour window, free of charge. POST /api/v1/json/whatsapp/status reports where up to 100 messages are, and GET /api/v1/json/whatsapp/templates lists the templates you can send with the parameters each one takes.
- WhatsApp callbacks: message.status for every status change and message.received for inbound customer messages, POSTed to the request's callback_url or to the URL set under Developer > Webhooks in the portal. They are signed (X-Unicom360-Signature, HMAC-SHA256 with your webhook secret) and retried on any non-2xx answer: after 30s, 2m, 10m, 30m, 1h, 3h, 6h and 12h.
- WhatsApp messages are priced per Meta category: MARKETING, UTILITY, AUTHENTICATION and SERVICE. Session messages, and UTILITY templates sent while the window is open, are free; failed messages are refunded. The WhatsApp bundle balance can now carry two decimals, so /balance and /balance/all can report a fractional WHATSAPP value.
Documentation moved to unicom360.com/docs
- The API documentation now lives at unicom360.com/docs, rewritten against the current gateway behaviour. Every parameter, response and error on these pages was checked against the code that serves it.
- Old api.unicom360.com/docs links redirect (301) to the matching page here.
- Code samples are generated from one structured description of each endpoint, in curl, JavaScript, Python and PHP.