POST /whatsapp/accounts/{id}/messages
Send a LIVE WhatsApp message to to (phone), recipient (BSUID) or the participant of conversationId. Free-form types need the person to have written within 24 hours; templates are always allowed (409 outside_messaging_window before calling Meta). 403 approval_required while approval applies. Emits message.sent; statuses follow as message.status
BearerAuthAuthorizationBearer <token>API key sk_...
id*stringWhatsApp account id
application/json- body
Exactly one of to, recipient or conversationId
to?stringPhone number in international format
recipient?stringBusiness-scoped user id (BSUID)
conversationId?stringWhatsApp conversation of this account
replyTo?stringwamid of the quoted message
type*stringtext*stringlength <= 4096previewUrl?boolean{message, conversation}
application/json- response
message?conversation?curl -X POST 'https://example.com/api/v1/whatsapp/accounts/string/messages' \ -H 'Content-Type: application/json' \ -d '{ "type": "text", "text": "string"}'{ "message": { "id": "string", "conversationId": "string", "platformMessageId": "string", "direction": "inbound", "type": "text", "text": "string", "attachments": [ { "type": "string", "url": "string" } ], "postback": { "title": "string", "payload": "string" }, "reactions": [ { "emoji": "string", "by": "participant" } ], "replyToMid": "string", "isEcho": true, "isDeleted": true, "status": "received", "tag": "HUMAN_AGENT", "sentAt": "2019-08-24T14:15:22Z", "deliveredAt": "2019-08-24T14:15:22Z", "readAt": "2019-08-24T14:15:22Z", "source": "webhook", "content": null, "pricing": null, "error": "string", "failedAt": "2019-08-24T14:15:22Z" }, "conversation": { "id": "string", "accountId": "string", "platform": "instagram", "platformConversationId": "string", "participant": { "id": "string", "username": "string", "name": "string", "pictureUrl": "string", "phone": "string", "userId": "string", "parentUserId": "string" }, "lastMessage": { "text": "string", "direction": "inbound", "at": "2019-08-24T14:15:22Z" }, "unreadCount": 0, "lastReadAt": "2019-08-24T14:15:22Z", "participantReadAt": "2019-08-24T14:15:22Z", "status": "active", "messagingWindow": { "open": true, "closesAt": "2019-08-24T14:15:22Z", "humanAgentClosesAt": "2019-08-24T14:15:22Z" }, "syncedAt": "2019-08-24T14:15:22Z", "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z" }}POST /whatsapp/accounts/{id}/register POST
Register (or re-register) the number for the Cloud API with pin, or a random 6-digit PIN (stored encrypted). Meta allows 10 attempts per 72 hours
POST /whatsapp/accounts/{id}/messages/{messageId}/read POST
Mark an inbound message (and the earlier ones) read on WhatsApp; typing also shows the typing indicator (25 seconds or until the next message)