Key
Is this key alive, and what may it do.
get/me
Any valid key
Needs no scope. A quick check that the key works, and which scopes it holds.
curl "https://api.dm.diginetacademy.in/api/v1/public/me" \
-H "Authorization: Bearer $INBOX_KEY"
{ "key_id": "…", "scopes": ["contacts:read", "messages:send"] }
Conversations
Threads and their messages.
get/conversations
Scope conversations:read
Query
statusstring
open, pending, closed or all (default all).
assigneestring
A member id, or unassigned.
qstring
A name or phone fragment.
limitinteger
1 to 500, default 100.
Response 200
Errors: 400 invalid_status
curl "https://api.dm.diginetacademy.in/api/v1/public/conversations" \
-H "Authorization: Bearer $INBOX_KEY"
{
"conversations": [
{
"phone": "919876543210", "name": "Asha Menon", "contact_id": "6f1c…",
"status": "open", "assigned_user_id": 3, "assigned_name": "Rahul",
"unread": 2, "needs_reply": true,
"last_at": "2026-11-14T08:00:00.000Z", "last_direction": "in",
"last_inbound_at": "2026-11-14T08:00:00.000Z",
"preview": "How much are the fees?", "tags": ["hot-lead"]
}
]
}
get/conversations/{phone}/messages
Scope conversations:read
Oldest first. origin says who sent an outbound message: agent, flow, campaign, api, ai or router.
Query
limitinteger
1 to 500, default 100.
Response 200
curl "https://api.dm.diginetacademy.in/api/v1/public/conversations/919876543210/messages" \
-H "Authorization: Bearer $INBOX_KEY"
{
"phone": "919876543210",
"messages": [
{
"id": "b2…", "direction": "in", "status": "received", "kind": "text",
"text": "How much are the fees?", "template_name": null,
"attachment_url": null, "attachment_type": null,
"origin": null, "user_id": null, "wa_message_id": "wamid.HBg…",
"error": null, "sent_at": null, "created_at": "2026-11-14T08:00:00.000Z"
}
]
}
Messages
Send on WhatsApp.
post/messages
Scope messages:send
text works only inside WhatsApp’s 24-hour customer-service window, which starts at the contact’s last message to you. Outside it the answer is 409 window_closed (with last_inbound_at), and a template is the only thing WhatsApp will carry.
template sends a template Meta has approved, at any time. name_param: true fills {{1}} with the contact’s name as the inbox knows it (or “there” when there is none); a string fills it with that string.
A sent message appears in the inbox with origin api and raises a message.sent webhook with by: "api". Sending through the API does not assign the conversation to anyone and does not pause the flows.
When Meta refuses, the answer is 502 send_failed with Meta’s meta_code, whether it is transient, and the message_id; the attempt is kept in the thread, marked failed.
Body
phonestringrequired
Digits with the country code.
kindstringrequired
text or template.
textstring
For text.
template_namestring
For template: an approved template.
template_languagestring
For template, e.g. en.
name_paramboolean | string
For template: what fills {{1}}.
Response 201
Errors: 409 window_closed; 502 send_failed
curl -X POST "https://api.dm.diginetacademy.in/api/v1/public/messages" \
-H "Authorization: Bearer $INBOX_KEY" \
-H "Content-Type: application/json" \
-d '{"phone": "919876543210", "kind": "template", "template_name": "welcome_msg", "template_language": "en", "name_param": true}'
{ "message": { "id": "b4…", "phone": "919876543210", "kind": "template", "status": "sent", "wa_message_id": "wamid.HBj…", "created_at": "…" } }
Campaigns and flows
Broadcasts and automations, read-only.
get/campaigns
Scope campaigns:read
status is draft, scheduled, sending, paused, done or cancelled.
curl "https://api.dm.diginetacademy.in/api/v1/public/campaigns" \
-H "Authorization: Bearer $INBOX_KEY"
{
"campaigns": [
{
"id": "c9…", "name": "November webinar", "template_name": "webinar_invite", "template_language": "en",
"status": "sending", "scheduled_at": "2026-11-14T04:30:00.000Z", "started_at": "2026-11-14T04:30:02.000Z", "finished_at": null,
"rate_per_minute": 20, "total": 1200,
"counts": { "sent": 400, "delivered": 380, "read": 122, "failed": 3, "pending": 800 },
"created_at": "…", "updated_at": "…"
}
]
}
get/campaigns/{id}
Scope campaigns:read
The same fields as the list, as { "campaign": { … } }.
Path
idstringrequired
Campaign id.
Response 200
Errors: 404 not_found
curl "https://api.dm.diginetacademy.in/api/v1/public/campaigns/c9…" \
-H "Authorization: Bearer $INBOX_KEY"
{ "campaign": { "id": "c9…", "…": "…" } }
get/flows
Scope flows:read
kind is lead (started by a lead), reply (answers keywords), contact (on a new contact) or tag (when a tag is added; trigger.tag).
channels says where the flow runs: any of whatsapp, instagram, web (the website chat) and messenger (waiting on Meta’s review). A lead flow runs on WhatsApp only.
curl "https://api.dm.diginetacademy.in/api/v1/public/flows" \
-H "Authorization: Bearer $INBOX_KEY"
{
"flows": [
{ "id": "f1…", "key": "welcome", "name": "Welcome flow", "kind": "lead", "description": null,
"is_active": true, "archived_at": null, "trigger": {}, "channels": ["whatsapp"], "steps": 6, "updated_at": "…" }
]
}
Webhook events
What a webhook endpoint receives in data. Every delivery is { id, event, created_at, data }; see Webhooks for signatures and retries.
message.received
{ phone, wamid, text, kind, contact: { id, name } }. kind is text, image, button, interactive, audio, document and so on; text is what a person would read (the text, a button’s label, a caption).
message.sent
{ phone, message_id, wa_message_id, kind, by, user_id }. by is agent, api or ai; user_id is the teammate for agent, else null.
conversation.assigned
{ phone, assigned_user_id, by }. assigned_user_id is null when unassigned.
conversation.closed
{ phone, by }
contact.created
{ contact: { … } }, with tags as { id, name, color }. phone is null for someone who first wrote on Instagram or the website chat.
contact.tagged
{ contact_id, phone, tag }. One delivery per tag, only for tags that were not on the contact before.
contact.stage_changed
{ contact, from_stage_id, to_stage_id, by }. by is person, flow, source, api or ai; to_stage_id is null when they were taken out of the pipeline.