Msgeradocs

Send a message

POST /v1/developer/messages — send text, media, or voice via a connected device.

Outbound messages are sent through a connected WhatsApp device. Every request needs a deviceUid (from GET /v1/developer/devices) and a recipient phone number in E.164-ish format (matching ^\+?[0-9]{7,15}$).

Send text

POST https://api.msgera.com/v1/developer/messages/send
X-API-Key: <MSGERA_KEY>
Content-Type: application/json

Request body

FieldTypeDescription
deviceUidrequiredstringUID of the WhatsApp device sending the message.
torequiredstringRecipient phone number, matching ^\+?[0-9]{7,15}$.
textrequiredstringMessage body (min 1 character). Supports spintax.
curl -X POST https://api.msgera.com/v1/developer/messages/send \
  -H "X-API-Key: $MSGERA_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "deviceUid": "dev_4f8c2a1e",
    "to": "+201001234567",
    "text": "Hello from Msgera"
  }'

Send media

Upload an image, video, or document first with POST /v1/developer/media/upload, then reference its mediaId:

POST https://api.msgera.com/v1/developer/messages/send-media
X-API-Key: <MSGERA_KEY>
Content-Type: application/json
FieldTypeDescription
deviceUidrequiredstringUID of the WhatsApp device.
torequiredstringRecipient phone number.
mediaIdrequiredstringId returned by /v1/developer/media/upload.
captionstringOptional caption shown below the media.
clientMessageIdstringYour own idempotency key — duplicate values are deduped.

Send voice

Same flow as media, but the upload should be an audio file. The recipient sees it as a voice note in WhatsApp.

POST https://api.msgera.com/v1/developer/messages/send-voice
X-API-Key: <MSGERA_KEY>
Content-Type: application/json
FieldTypeDescription
deviceUidrequiredstringUID of the WhatsApp device.
torequiredstringRecipient phone number.
mediaIdrequiredstringId of the uploaded audio asset.
clientMessageIdstringYour own idempotency key.

Check WhatsApp availability

Before broadcasting, you can verify whether a list of numbers is on WhatsApp. Available on Baileys-backed devices only.

POST https://api.msgera.com/v1/developer/messages/check-whatsapp
X-API-Key: <MSGERA_KEY>
Content-Type: application/json
FieldTypeDescription
deviceUidrequiredstringUID of the WhatsApp device.
numbersrequiredstring[]1–50 phone numbers to check.

Idempotency for media & voice

Pass a stable clientMessageId to safely retry on network errors. Msgera deduplicates by this value per device.

Sending while delivery confirmations stream in? See Webhooksfor the inbound-reply payload, and the dashboard's real-time view for delivered/read status.