Graph API Version

Page Messages

Reading

You can't perform this operation on this endpoint.

Creating

You can make a POST request to messages edge from the following paths:
When posting to this edge, no Graph object will be created.

Parameters

ParameterDescription
message
Object

Message data

Supports Emoji
text
UTF-8 string

Supports Emoji
dynamic_text
Object

Supports Emoji
text
UTF-8 string

RequiredSupports Emoji
fallback_text
UTF-8 string

Supports Emoji
attachment
Object

Supports Emoji
type
enum {IMAGE, VIDEO, AUDIO, FILE, LOCATION, TEMPLATE, FALLBACK, LIKE_HEART, MEDIA_SHARE}

Required
payload
string

Supports Emoji
quick_replies
list<Object>

Supports Emoji
title
UTF-8 string

Supports Emoji
content_type
enum {LOCATION, USER_PHONE_NUMBER, USER_EMAIL, USER_CITY, USER_BIRTHDAY, USER_STATE, USER_ZIP_CODE, OPEN_CAMERA, OPEN_GALLERY, RECORD_AUDIO, POLL, TEXT, OPEN_NATIVE, STICKER, OPEN_APP, P2P_PAYMENT, TRANSPORTATION, CREATE_EVENT, GIF}

Required
image_url
URL

data
Object

app
string

dest_address
string

sticker_id
numeric string or integer

payment_amount
integer

payment_currency
ISO 4217 Currency Code

payment_type
enum{pay, request}

poll_options
list<string>

provider_name
string

native_uri
string

payload
UTF-8 string

Supports Emoji
user_input
Object

Supports Emoji
type
enum {ADDRESS_AUTO_COMPLETE, CITY_AUTO_COMPLETE, REGION_AUTO_COMPLETE, POSTAL_CODE_AUTO_COMPLETE, COUNTRY_AUTO_COMPLETE, CUSTOM_AUTO_COMPLETE, LIST_PICKER}

Required
data
string

Supports Emoji
composer_settings
Object

Supports Emoji
mode
enum {FOCUS_MODE}

Required
payload
UTF-8 string

RequiredSupports Emoji
metadata
string

messaging_type
enum {RESPONSE, UPDATE, MESSAGE_TAG}

Messaging type of the message

notification_type
enum {REGULAR, SILENT_PUSH, NO_PUSH}
Default value: REGULAR

Push notification / buzz type

persona_id
persona ID

The ID of a Persona

recipient
Object

The recipient of the message

Required
id
numeric string

phone_number
string

name
Object

first_name
string

last_name
string

user_ref
string

comment_id

post_id
string

player_id
player ID

one_time_notif_token
string

sender_action
enum {MARK_SEEN, TYPING_ON, TYPING_OFF, REACT, UNREACT}

Actions such as setting / unsetting typing indicators

tag
Message tag

The use case tag of the message to bypass the subscriptions permission check

Return Type

This endpoint supports read-after-write and will read the node to which you POSTed.
Struct {
recipient_id: string,
message_id: string,
attachment_id: string,
}

Validation Rules

ErrorDescription
100Invalid parameter
551This person isn't available right now.
2022The ability to send commerce messages has been temporarily disabled for this application. You may appeal at https://www.facebook.com/help/contact/714309562042255
10903This user cant reply to this activity
105The number of parameters exceeded the maximum for this operation
10900Activity already replied to
200Permissions error
10901Activity replying time expired
10904The page has messages disabled in the settings
192Invalid phone number

Updating

You can't perform this operation on this endpoint.

Deleting

You can't perform this operation on this endpoint.