Sending API v1 + Legacy Compatibility

WebWMS2U Messaging API

One integration for Meta Cloud API, WhatsApp Coexistence and connected personal devices.

Recommended: Existing integrations may continue unchanged. New integrations should add X-API-Version: 1, use POST JSON and include a unique Idempotency-Key for every logical message.

Endpoint

POST https://www.webwms2u.com/api/send-message.php

Authorization: Bearer YOUR_API_KEY
X-API-Version: 1
Idempotency-Key: order-10082-confirmation
Content-Type: application/json
Accept: application/json

X-API-KEY remains supported. Bearer authentication is recommended for new integrations.

Automatic routing

  • Meta key: official Cloud API, including coexistence numbers.
  • Personal key: the connected device assigned to the API key.
  • The key determines the channel; clients should not submit a channel value.
  • Each accepted outbound message uses one WebWMS2U credit.

Request fields

v1 fieldLegacy aliasRequirementDescription
todirect_numberRequiredInternational recipient number, normally 8–15 digits. A leading + is accepted.
typemessage_typeOptionaltext, media, document, location or interactive.
text.bodymessageText messagesText or media caption, up to 4,096 characters.
template.idtemplate_idTemplatesYour WebWMS2U template ID. Meta templates must be active and approved.
template.parameterscustom_fieldsOptionalObject keyed from 1, matching placeholders such as {{1}}.
payloadmessage_payloadNon-textMedia, location or interactive message data.
scheduled_atsend_timeOptionalUTC ISO 8601 or YYYY-MM-DD HH:MM:SS; up to one year ahead.

Examples

Text message

{
  "to": "+60123456789",
  "type": "text",
  "text": { "body": "Hello from WebWMS2U!" }
}

Approved Meta or personal template

{
  "to": "60121234567",
  "template": {
    "id": 261,
    "parameters": { "1": "John", "2": "INV-10082" }
  },
  "scheduled_at": "2026-08-12T06:30:00Z"
}

Image or document

{
  "to": "60123456789",
  "type": "media",
  "text": { "body": "Please see the attached brochure." },
  "payload": {
    "type": "document",
    "url": "https://example.com/brochure.pdf",
    "filename": "brochure.pdf"
  }
}

Location

{
  "to": "60123456789",
  "type": "location",
  "payload": {
    "latitude": 3.130219,
    "longitude": 101.683756,
    "name": "Our office",
    "address": "Kuala Lumpur, Malaysia"
  }
}

cURL example

curl --request POST 'https://www.webwms2u.com/api/send-message.php' \
  --header 'Authorization: Bearer YOUR_API_KEY' \
  --header 'X-API-Version: 1' \
  --header 'Idempotency-Key: order-10082-confirmation' \
  --header 'Content-Type: application/json' \
  --data '{"to":"60123456789","type":"text","text":{"body":"Hello!"}}'

Accepted response

HTTP/1.1 202 Accepted
{
  "success": true,
  "message": "Message queued successfully",
  "platform": "meta",
  "cost": 1,
  "message_type": "text",
  "message_id": 81234,
  "status": "queued",
  "scheduled_at": "2026-08-11T17:30:00+00:00",
  "idempotent_replay": false,
  "request_id": "..."
}
Queued does not mean delivered. It confirms validation, credit reservation and queue insertion. Final delivery remains subject to Meta/device availability, recipient status and WhatsApp policies.

Track message progress

Use the authenticated Message Status API to retrieve the latest known status, or configure signed delivery-status webhooks to receive updates automatically.

Meta and coexistence rules

Backward compatibility