Skip to main content
GET
Get messages or conversations for a messaging platform. Retrieval times differ on each social network. On Facebook, Instagram, and WhatsApp, messages are available via Ayrshare in real time. On X/Twitter, there is a delay of up to 3 minutes to see new message updates. Please contact support to learn more about the Enterprise Plan if you need real-time X/Twitter message access.
Response caching: For Facebook and Instagram, responses are cached for 60 seconds. For X/Twitter, responses are cached for 15 seconds to better support polling. WhatsApp reads messages already received through Meta webhooks, so a newly received message can appear as soon as Ayrshare processes its webhook. The response still includes lastUpdated and nextUpdate metadata.
Initial message history retrieval for Facebook and Instagram is limited to the last 20 messages. Please see the Message History Retrieval for Facebook and Instagram section for more information.
WhatsApp conversations are identified by the correspondent’s phone number (digits only, E.164 without the leading +). A stored outbound message may include a status value of sent, delivered, read, or failed.
WhatsApp messages sent through Send Message are not currently added to Get Messages history. Incoming WhatsApp messages received through webhooks are stored and returned here.

Header Parameters

Path Parameters

string
required
The platform to get the message: facebook, instagram, twitter, whatsapp

Query Parameters

string
default:"active"
required
Return active conversations or archived conversations. Values: active or archived.
string
Only return the specific conversation.
boolean
default:false
Return all the conversations. If true then conversationId field ignored.
When conversationsOnly=true, conversation details are returned in converstationsDetails. This spelling is part of the current API response.
integer
X/Twitter only. Limit the number of messages returned per request (1–100). Enables efficient polling without a full history sync. Use with next for pagination. If omitted, the default behavior (full message retrieval) is used.
string
X/Twitter only. Encrypted pagination cursor returned from a previous request’s meta.pagination.next field. Use with limit to fetch the next page of results.