messaging

Post a Message

POST https://app.ayrshare.com/api/message

Available for Twitter, Facebook, and Instagram

Headers

Name
Type
Description

Authorization*

string

Format: Authorization: Bearer API_KEY. See Overview for more information. Please use the Primary API Key.

message*

string

platform*

string

Values: twitter, facebook, or instagram

id

string

The ID of an existing conversation.

userName

string

If conversation ID is not present, provide a username to begin a conversation.

mediaUrls

array

Array of media URLs. Must begin with https://

{
    "status": "success",
    "message": "What a great day.",
    "id": "93ks982ojksd",
    "platform": "twitter",
    "conversationId": "93ks923ksd"
}

Get Messages

GET https://app.ayrshare.com/api/message

Pull conversation messages in realtime.

Headers

Name
Type
Description

Authorization*

string

Format: Authorization: Bearer API_KEY. See Overview for more information. Please use the Primary API Key.

id*

string

Conversation ID

platform*

string

Values: twitter, facebook, or instagram

{
  "id": "aWdGGiblWZ",
  "created": "2022-07-12T19:11:07Z",
  "platform": "facebook",
  "receivers": [
      {
        "username": "joesmith",
        "id": "d93kdfj93kdf"
      }
  ],
  "sender": {
    "username": "suesmith",
    "id": "d903jkd893kdfdf"
  },
  "message": "Hi There!"
}

Get Conversations

GET https://app.ayrshare.com/api/message/conversation

Get the list of conversations for a given platform

Headers

Name
Type
Description

Authorization*

string

Format: Authorization: Bearer API_KEY. See Overview for more information. Please use the Primary API Key.

Request Body

Name
Type
Description

platform*

string

Values: twitter, facebook, instagram

{
  "status": "success",
  "platform": "facebook",
  "conversations": 
    {
      "id": "CONVERSATION-ID-1",  
      "updated": "2022-07-12T19:11:07Z"
    },
    {
      "id": "CONVERSATION-ID-2",   
      "updated": "2022-07-12T19:11:07Z"
    }
  ]
} 

Last updated