For the complete documentation index, see llms.txt. This page is also available as Markdown.

Programmable Messenger

Sending Facebook Messenger and Instagram messages with Bird, and how the Human Agent messaging window works

Summary

Facebook Messenger and Instagram are asynchronous messaging channels that let businesses reply to people who message your Facebook Page or Instagram account. Both run on Meta's Messenger Platform and share the same messaging-window rules — including the Human Agent window described below. Everything on this page applies identically to Facebook Messenger and Instagram.

The messaging window

Meta only lets you message a contact within a limited window after their last message to you:

  • Standard window — 24 hours. Normal replies must be sent within 24 hours of the contact's most recent message.

  • Human Agent window — 7 days. A reply sent by a human agent may be delivered up to 7 days after the contact's last message. Meta calls this the HUMAN_AGENT tag.

Bird applies the HUMAN_AGENT tag for you, based on the message's use case — you never pass a Meta tag directly.

Sending via the Channels API

On the Channels API you set the use case with the meta.extraInformation.useCase field. Set it to conversation (or transactional) and Bird delivers the message as a Human Agent message (the 7-day window).

Send a message

post

Send a message to a channel

Authorizations
HTTPRequired

Uses the Authorization header: 'AccessKey ' followed by your access key token

Path parameters
workspaceIdstring · uuidRequired

The unique identifier of the workspace.

channelIdstring · uuidRequired

The ID for a channel

Body
and
anyOptional
object · ChannelMessageCreateWithTemplateOptional
or
object · ChannelMessageCreateWithBodyOptional
Responses
202

Message was accepted for processing

application/json
bodyone ofOptional
or
or
or
or
or
or
or
or
or
or
bodyIdstring · uuidOptional
channelIdstring · uuidRequired
chargeableUnitsinteger · uint32Optional
createdAtstring · date-timeRequired
detailsstringOptional

This field is used to store additional information related to the message status.

directionstring · enumOptionalPossible values:
idstring · uuidRequired
ignorePersistedEventhooksbooleanOptional
lastStatusAtstring · date-timeRequired
platformIdstringOptional
platformReferenceIdstringOptional
reasonstringOptional
referencestringOptional

A reference to the message. This can be used to identify the message in the channel.

scheduledForstring · date-timeOptional

Scheduled message send time (RFC3339). Messages scheduled within 10 minutes may be sent immediately; messages scheduled more than 35 days out will be rejected.

sendAtstring · date-timeOptional
statusstring · enumRequiredPossible values:
tagIdsstring · uuid[]Optional
tagsstring[]Optional

Tags to associate with the message. Tags are converted to lower case and automatically created if they don't exist. Up to 10 tags per message.

updatedAtstring · date-timeRequired
post/workspaces/{workspaceId}/channels/{channelId}/messages

Example Request Body

The useCase value maps to Meta's messaging type as follows:

conversation or transactional

MESSAGE_TAG + HUMAN_AGENT

7 days (human agent)

marketing, otp, or omitted

UPDATE

24 hours (standard)

The Human Agent window is controlled by useCase only — not by which participant sends the message. To reply outside the 24-hour window, set useCase to conversation or transactional.

Sending via the Conversations API

Messages sent through the Conversations API are automatically classified with the conversation use case, so Messenger and Instagram messages are always delivered with the HUMAN_AGENT tag — you don't need to set anything.

Create message in conversation

post

Sends a message in a conversation. The message content can be comprised of either body or template. Attempting to send as a participant that hasn't been added to the conversation results in an error unless the option addMissingParticipants is set to true. Attempting to send messages in a closed conversation results in an error.

Authorizations
HTTPRequired

Uses the Authorization header: 'AccessKey ' followed by your access key token

Path parameters
workspaceIdstring · uuidRequired

The unique identifier of the workspace.

conversationIdstringRequired

The conversation ID

Example: 67e4d358-ca94-421e-98b7-448860df9d33
Body
or
Responses
201

OK

application/json
bodyone ofOptional
or
or
or
or
or
or
or
or
or
or
channelIdstring · uuidOptional
conversationCreatedAtstring · date-timeOptional
conversationIdstring · uuidRequired
createdAtstring · date-timeRequired
draftbooleanRequired

Whether this message is a draft.

idstring · uuidRequired

A unique identifier for this message.

reasonstringOptional

Failure reason. Populated when status is sending_failed or delivery_failed.

referencestringRequired

A customizable ID assigned to messages you send. Can be used to correlate messages with data from your own services. Must be globally unique within a workspace.

resourceUristringOptional
sourcestring · enumRequiredPossible values:
statusstring · enumRequiredPossible values:
typestring · enumOptionalPossible values:
updatedAtstring · date-timeRequired
post/workspaces/{workspaceId}/conversations/{conversationId}/messages

Example Request Body

Any useCase you set in meta.extraInformation on the Conversations API is overridden with conversation, so the Human Agent window always applies.

Last updated

Was this helpful?