Skip to main content
POST
Send a message
Send a Messenger message through a connected HookMyApp channel. Use the connected Page id in the path. Use the inbound sender.id as the outbound recipient.id. Supports:
  • text: Plain text replies
  • attachment: image, video, audio or file by public https URL
  • messaging_type: MESSAGE_TAG with tag: Send outside the 24-hour window
  • recipient.comment_id: Private reply to a comment, instead of recipient.id
  • sender_action: mark_seen, typing_on, typing_off

Authentication

Use the hmat_ channel token from GET /meta/channels/{id}/token or hookmyapp channels token <channel>. Do not use an hmok_ API key for this call.

Path parameters

string
required
The connected Page id.

Request body

string
Page-scoped id (PSID) from the inbound webhook sender.id. Required unless recipient.comment_id is set.
string
A comment id on one of the Page’s posts, for a private reply. One per comment, within 7 days of the comment.
object
The message payload: text or attachment. Omit when sending a sender_action.
string
MESSAGE_TAG when sending outside the 24-hour window. Requires tag.
string
CONFIRMED_EVENT_UPDATE, POST_PURCHASE_UPDATE, ACCOUNT_UPDATE or HUMAN_AGENT.
string
mark_seen, typing_on or typing_off. Free, not counted as a message.

Example

Successful response

Outside the 24-hour window

A free-form message to a person who last wrote more than 24 hours ago is rejected with HTTP 409: “This person last messaged you more than 24 hours ago. Send a message tag or wait for them to write again.” A person who cannot receive messages from your Page returns 409 too. Neither can succeed on retry. See Send messages for the guide.