rocket_launch

Getting Started

MSGTODAY provides access to the official Meta WhatsApp Business Cloud API. Integrate high-speed messaging into your sign-up flows, tracking mechanisms, alerts, or customer support workflows.

Integration Workflow

  1. Create your account and complete verification on our console.
  2. Claim test credits and configure your Sandbox phone number to test incoming and outgoing message loops.
  3. Link your official Meta WhatsApp Business account to move into Production and acquire dedicated API keys.
vpn_key

Authentication

Every API call must present credentials via the Authorization header using standard Bearer Token authorization. Secure your API key like you would a password.

# Include Bearer token in your HTTP requests
Authorization: Bearer msg_live_79a2bbd73c...
send

Send Message API

Send messages programmatically using the unified message sending endpoint. This API dynamically handles text, replies, location coordinates, contact cards, media files, and interactive templates.

POST/api/v1/messages
Content-Type: application/json

Request Body Fields

FieldTypeDescription
tostringRecipient phone number in E.164 format (e.g. "+919876543210").
typestringMessage category: text, image, video, document, location, contact, interactive, catalogue, or template.
textstringMessage body string (required for type text).
replyToMessageIdstringID of the message you want to reply to (optional).
mediaUrlstringStatic asset URL link (required for media types).
templateobjectTemplate configuration containing name, language, and parameters array.

Select Payload Schema Template

{
  "to": "+919876543210",
  "type": "text",
  "text": "Hello Aarav! Welcome to MSGTODAY."
}
forum

Fetch Messages API

Fetch workspace message records. You can filter the history logs using specific recipient phone numbers.

GET/api/v1/messages
Accept: application/json

Query Parameters

FieldTypeDescription
contactPhoneNumberstringFilter messages matching specific phone number (Optional).
limitintegerLimit records returned. Range: 1-100 (Default: 50).

Response Example

[
  {
    "messageId": "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d",
    "direction": "incoming",
    "type": "text",
    "content": { "text": "Hello support" },
    "status": "delivered",
    "timestamp": "2026-07-03T18:00:00.000Z",
    "recipientPhoneNumber": "+919876543210"
  }
]
upload_file

Media Upload API

Acquire secure presigned upload gateway links to host your images, documents, and videos directly prior to sending media messages.

GET/api/v1/media/upload-url
Accept: application/json

Query Parameters

FieldTypeDescription
fileNamestringName of the file to be uploaded (e.g. "invoice.pdf") (Required).
fileTypestringThe MIME type of the file (Optional).

Response Example

{
  "uploadUrl": "https://api.msgtoday.com/api/v1/media/upload-direct?path=media/ab12cd34_filename.png",
  "fileUrl": "https://gpdcodlvccdziwucfjdo.supabase.co/storage/v1/object/public/media/media/ab12cd34_filename.png",
  "headers": {
    "Content-Type": "image/png"
  }
}
sync_alt

Webhooks Integration

Configure Webhooks to listen for status reports (sent, delivered, read status updates) and customer-initiated message events. Register your webhook URL inside the console settings page.

All Webhook payload structures contain an action event key along with timestamps:

// Webhook POST JSON structure snippet
{ "event": "message.status_update", "message_id": "msg_99b0c27384a2", "status": "read", "timestamp": "2026-06-29T20:25:01Z" }
error

Error Codes

Standard error responses return an HTTP status code alongside a JSON body error payload containing diagnostic info.

CodeTitleReason / Fix
400Bad RequestMissing fields or invalid formatting (e.g. invalid phone format).
401UnauthorizedInvalid API credentials or token expired. Verify your token in Console.
429Rate LimitedAPI limits exceeded. Retry with exponential backoff configuration.
502Provider ErrorMeta servers could not receive routing request. Auto fallback will trigger.