API Response Guide

Possible responses for Sending/Delivery API endpoint.

Send Message API Responses

Back to API Guide

This document lists every possible JSON response returned by our Sending/Delivery API, including success and error cases, along with the conditions that trigger each response.

Response Condition
{
  "success": false,
  "error": "Missing API key"
}
No API key provided via GET, headers, or server variables.
{
  "success": false,
  "error": "Invalid API key"
}
API key is provided but not found in either user_appkey_meta or user_appkey tables.
{
  "success": false,
  "error": "Account not found"
}
API key is valid but user_accounts.id does not exist.
{
  "success": false,
  "error": "Account is disabled"
}
is_enabled = 0 for the user account, regardless of expiry date.
{
  "success": false,
  "error": "Account subscription expired",
  "expired_on": "YYYY-MM-DD"
}
expiry_date is set and earlier than today.
{
  "success": false,
  "error": "Invalid template"
}
A template_id is provided but:
  • Template does not exist.
  • Template belongs to another user.
  • Template status is not 'active'.
{
  "success": false,
  "error": "Message or template_id is required"
}
No message and no template_id provided.
{
  "success": false,
  "error": "Insufficient credits"
}
User's credits are less than the required cost per message (currently 1).
{
  "success": true,
  "message": "Message queued successfully",
  "platform": "meta|baileys",
  "cost": 1,
  "message_type": "text|media"
}
All checks pass, message successfully queued, credits deducted, and log recorded.
Notes: