Datagroup Messaging API (1.0.0)

Download OpenAPI specification:

Send WhatsApp messages from your own systems and check delivery status — the API behind Datagroup's WhatsApp automation. Authenticate with a per-tenant API key created in the Datagroup portal (Admin → API keys).

Phase 1 (current release): send approved WhatsApp templates, list your templates and numbers, and query delivery status/history. Free-text replies and WhatsApp Flows are planned for a later phase.

Channels: every request/response carries an explicit channel field. whatsapp is the only value this release accepts — sms is reserved for a future Clickatell-backed SMS channel and is rejected today with unsupported_channel, so integrating against channel now means no contract change when SMS ships.

Messages

Send templates and query delivery status.

Send a template message

Sends an approved WhatsApp template to a South African mobile number. Supply bodyParameters in order if the template has {{1}}, {{2}}, ... placeholders (see GET /templates for each template's expected count).

Pass an Idempotency-Key header to make retries safe — resending the same key returns the original result instead of sending a second message. Reusing a key always replays the first result; it is not re-validated against a changed request body, so treat each key as single-use per logical send.

Authorizations:
ApiKeyAuth
header Parameters
Idempotency-Key
string

An opaque string unique to this logical send. Retrying with the same key replays the original result.

Request Body schema: application/json
required
channel
string
Default: "whatsapp"
Value: "whatsapp"

Only whatsapp is available in this release; sms is reserved for a future phase.

to
required
string

South African mobile number, +27... or 0....

templateName
required
string
language
string

Meta language code. Defaults to the template's own language if omitted.

phoneNumberId
string <uuid>

Required only if you have more than one active WhatsApp number (see GET /phone-numbers).

bodyParameters
Array of strings

Positional values for the template's {{1}}, {{2}}, ... placeholders, in order. Omit or leave empty for a variable-free template.

headerImageUrl
string

Overrides the template's stored header image, if any.

Responses

Request samples

Content type
application/json
{
  • "channel": "whatsapp",
  • "to": "+27821234567",
  • "templateName": "order_ready",
  • "language": "en_US",
  • "bodyParameters": [
    ]
}

Response samples

Content type
application/json
{
  • "messageId": "8540d774-4863-4d2b-b788-4ecb19412e85",
  • "metaMessageId": "string",
  • "status": "Sent",
  • "conversationId": "ee6e55e8-45fe-4a3e-9bc8-4669f9fdf77a",
  • "channel": "whatsapp"
}

List messages (delivery reporting)

Keyset-paginated list of your outbound messages, newest first. Defaults to the last 30 days if from/to are omitted.

Authorizations:
ApiKeyAuth
query Parameters
channel
string
Value: "whatsapp"
status
string
Enum: "Queued" "Sent" "Delivered" "Read" "Failed"
templateName
string
phoneNumberId
string <uuid>
from
string <date-time>

ISO 8601 datetime; defaults to 30 days ago.

to
string <date-time>

ISO 8601 datetime; defaults to now.

limit
integer [ 1 .. 200 ]
Default: 50
cursor
string

Opaque token from a prior page's nextCursor. Omit for the first page.

Responses

Response samples

Content type
application/json
{
  • "items": [
    ],
  • "nextCursor": "string"
}

Get one message's delivery status

Authorizations:
ApiKeyAuth
path Parameters
messageId
required
string <uuid>

Responses

Response samples

Content type
application/json
{
  • "messageId": "8540d774-4863-4d2b-b788-4ecb19412e85",
  • "to": "string",
  • "direction": "Outbound",
  • "templateName": "string",
  • "status": "Queued",
  • "timestamp": "2019-08-24T14:15:22Z",
  • "errorDetail": "string",
  • "conversationId": "ee6e55e8-45fe-4a3e-9bc8-4669f9fdf77a",
  • "channel": "whatsapp"
}

Catalog

What you can send, and from which number.

List approved templates you can send

Includes the derived bodyParameterCount so you know how many bodyParameters a send needs.

Authorizations:
ApiKeyAuth

Responses

Response samples

Content type
application/json
{
  • "items": [
    ]
}

List your active WhatsApp numbers

Only relevant when you have more than one number — with exactly one, POST /messages uses it automatically and phoneNumberId can be omitted.

Authorizations:
ApiKeyAuth

Responses

Response samples

Content type
application/json
{
  • "items": [
    ]
}