Messages
Get Messages
Get Started
API Endpoints
- Ayrshare API Overview
- Ads
- Analytics
- Auto Schedule
- Brand
- Comments
- Feed
- Generate
- Hashtags
- History
- Links
- Media
- Messages
- Post
- Profiles
- Reviews
- User
- Utils
- Validate
- Webhooks
Multiple Users
Dashboard
- Overview
- Connect Social Accounts
- Publish a Post
- Revoke Access to Social Media
- RSS
Additional
- What's New At Ayrshare
- Errors
- Max Pack
- Media Guidelines
- Packages & Guides
- System Status
- Testing & Verification
- ISO Codes
Messages
Get Messages
Get messages or conversations for a messaging platform
GET
/
messages
/
:platform
curl \
-H "Authorization: Bearer API_KEY" \
-X GET https://api.ayrshare.com/api/messages/facebook
{
"status": "success",
"messages": [
{
"senderId": "106638148652444",
"senderDetails": {
"name": "Ayrshare"
},
"conversationId": "t_10161117434308444",
"created": "2024-06-06T00:54:32.455Z",
"action": "sent",
"recipientId": "7101149746568444",
"id": "m_JH6o-yS83JoxWmQaLrmgSaHwGtfTgQ",
"message": "Howdy!",
"platform": "facebook",
"reactions": {
"7101149746568522": "😆". // Reaction by the customer on the Howdy! message
}
},
{
"recipientDetails": {
"name": "Sara Smith",
"id": "736532028017333",
"picture": "https://img.ayrshare.com/333/messages/facebook-eTZzhE2b.jpeg"
},
"senderId": "106638148652329",
"attachments": [
{
"type": "image",
"url": "https://scontent.xx.fbcdn.net/v/t1.15752-9/490986808_1193328359195158"
}
],
"conversationId": "t_3567590438533",
"created": "2024-06-06T00:54:32.455Z",
"action": "sent",
"recipientId": "736532028017333",
"id": "m_WJlfgzopxfdRM1wFTKYHKv7zh75P",
"updated": "2024-06-06T00:54:32.455Z",
"platform": "facebook",
"senderDetails": {
"name": "Ayrshare"
}
},
{
"senderId": "7101149746568444",
"senderDetails": {
"name": "John Smith",
"profileImage": "https://platform-lookaside.fbsbx.com/platform/profilepic/"
},
"conversationId": "t_10161117434308444",
"created": "2024-06-06T00:54:28.102Z",
"action": "received",
"recipientId": "106638148652329",
"id": "m_HGbotYJUmf4AzyPlJ-2uZqHwGtfTgQihX",
"message": "Look up!",
"platform": "facebook"
},
{
"senderId": "7101149746568444",
"senderDetails": {
"name": "John Smith",
"profileImage": "https://platform-lookaside.fbsbx.com/platform/profilepic/"
},
"conversationId": "t_10161117434308444",
"created": "2024-06-06T00:49:11.679Z",
"action": "received",
"recipientId": "106638148652444",
"id": "m_jXoYQIwTXaq2u06PG6Z8vaHwGtfTgQ",
"message": "How is the weather?",
"platform": "facebook"
}
],
"lastUpdated": "2024-06-09T21:46:04.233Z",
"nextUpdate": "2024-06-09T21:47:04.233Z"
}
Available on Business, Enterprise plans.
Get messages or conversations for a messaging platform.
Retrieval times differ on each social network. On Facebook and Instagram, messages are available via Ayrshare in real time. On X/Twitter, there is a delay of up to 3 minutes to see the messages. Please contact support to learn more about Enterprise Plans if you need real-time X/Twitter message access.
Header Parameters
Path Parameters
The platform to get the message: facebook
, instagram
, twitter
Query Parameters
Return active conversations or archived conversations. Values: active
or archived
.
Only return the specific conversation.
Return all the conversations. If true
then conversationId field ignored.
curl \
-H "Authorization: Bearer API_KEY" \
-X GET https://api.ayrshare.com/api/messages/facebook
{
"status": "success",
"messages": [
{
"senderId": "106638148652444",
"senderDetails": {
"name": "Ayrshare"
},
"conversationId": "t_10161117434308444",
"created": "2024-06-06T00:54:32.455Z",
"action": "sent",
"recipientId": "7101149746568444",
"id": "m_JH6o-yS83JoxWmQaLrmgSaHwGtfTgQ",
"message": "Howdy!",
"platform": "facebook",
"reactions": {
"7101149746568522": "😆". // Reaction by the customer on the Howdy! message
}
},
{
"recipientDetails": {
"name": "Sara Smith",
"id": "736532028017333",
"picture": "https://img.ayrshare.com/333/messages/facebook-eTZzhE2b.jpeg"
},
"senderId": "106638148652329",
"attachments": [
{
"type": "image",
"url": "https://scontent.xx.fbcdn.net/v/t1.15752-9/490986808_1193328359195158"
}
],
"conversationId": "t_3567590438533",
"created": "2024-06-06T00:54:32.455Z",
"action": "sent",
"recipientId": "736532028017333",
"id": "m_WJlfgzopxfdRM1wFTKYHKv7zh75P",
"updated": "2024-06-06T00:54:32.455Z",
"platform": "facebook",
"senderDetails": {
"name": "Ayrshare"
}
},
{
"senderId": "7101149746568444",
"senderDetails": {
"name": "John Smith",
"profileImage": "https://platform-lookaside.fbsbx.com/platform/profilepic/"
},
"conversationId": "t_10161117434308444",
"created": "2024-06-06T00:54:28.102Z",
"action": "received",
"recipientId": "106638148652329",
"id": "m_HGbotYJUmf4AzyPlJ-2uZqHwGtfTgQihX",
"message": "Look up!",
"platform": "facebook"
},
{
"senderId": "7101149746568444",
"senderDetails": {
"name": "John Smith",
"profileImage": "https://platform-lookaside.fbsbx.com/platform/profilepic/"
},
"conversationId": "t_10161117434308444",
"created": "2024-06-06T00:49:11.679Z",
"action": "received",
"recipientId": "106638148652444",
"id": "m_jXoYQIwTXaq2u06PG6Z8vaHwGtfTgQ",
"message": "How is the weather?",
"platform": "facebook"
}
],
"lastUpdated": "2024-06-09T21:46:04.233Z",
"nextUpdate": "2024-06-09T21:47:04.233Z"
}
curl \
-H "Authorization: Bearer API_KEY" \
-X GET https://api.ayrshare.com/api/messages/facebook
{
"status": "success",
"messages": [
{
"senderId": "106638148652444",
"senderDetails": {
"name": "Ayrshare"
},
"conversationId": "t_10161117434308444",
"created": "2024-06-06T00:54:32.455Z",
"action": "sent",
"recipientId": "7101149746568444",
"id": "m_JH6o-yS83JoxWmQaLrmgSaHwGtfTgQ",
"message": "Howdy!",
"platform": "facebook",
"reactions": {
"7101149746568522": "😆". // Reaction by the customer on the Howdy! message
}
},
{
"recipientDetails": {
"name": "Sara Smith",
"id": "736532028017333",
"picture": "https://img.ayrshare.com/333/messages/facebook-eTZzhE2b.jpeg"
},
"senderId": "106638148652329",
"attachments": [
{
"type": "image",
"url": "https://scontent.xx.fbcdn.net/v/t1.15752-9/490986808_1193328359195158"
}
],
"conversationId": "t_3567590438533",
"created": "2024-06-06T00:54:32.455Z",
"action": "sent",
"recipientId": "736532028017333",
"id": "m_WJlfgzopxfdRM1wFTKYHKv7zh75P",
"updated": "2024-06-06T00:54:32.455Z",
"platform": "facebook",
"senderDetails": {
"name": "Ayrshare"
}
},
{
"senderId": "7101149746568444",
"senderDetails": {
"name": "John Smith",
"profileImage": "https://platform-lookaside.fbsbx.com/platform/profilepic/"
},
"conversationId": "t_10161117434308444",
"created": "2024-06-06T00:54:28.102Z",
"action": "received",
"recipientId": "106638148652329",
"id": "m_HGbotYJUmf4AzyPlJ-2uZqHwGtfTgQihX",
"message": "Look up!",
"platform": "facebook"
},
{
"senderId": "7101149746568444",
"senderDetails": {
"name": "John Smith",
"profileImage": "https://platform-lookaside.fbsbx.com/platform/profilepic/"
},
"conversationId": "t_10161117434308444",
"created": "2024-06-06T00:49:11.679Z",
"action": "received",
"recipientId": "106638148652444",
"id": "m_jXoYQIwTXaq2u06PG6Z8vaHwGtfTgQ",
"message": "How is the weather?",
"platform": "facebook"
}
],
"lastUpdated": "2024-06-09T21:46:04.233Z",
"nextUpdate": "2024-06-09T21:47:04.233Z"
}