ACME API Documentation logo

Send Message

Send a direct message to a recipient

POSThttps://api.acme.com/api/messages/:platform
Available on Business, Enterprise plans.

Send a new direct message to a recipient.

  • You can send an emoji as part of the message text.
  • Facebook and Instagram mediaUrls must end in a known extension. Including query parameters will cause the media url to fail.

Header Parameters

Authorizationstringrequired
API Key of the Primary Profile.

Format: Authorization: Bearer API_KEY
Profile-Keystring
Profile Key of a User Profile.

Format: Profile-Key: PROFILE_KEY

Path Parameters

platformstringrequired

The platform to send the message: facebook, instagram, twitter

Body Parameters

recipientIdstringrequired

The ID of the message recipient.

messagestringrequired

The message to send to the recipient.

  • Facebook and Instagram message may be an empty string or not included if a mediaUrls is provided.

  • X requires a message of at least one character even if a mediaUrls is provided.

mediaUrlsarray

Array of media URLS for attaching images, a video, or a voice message.

  • URLs of media items should end in the file extension without additional parameters appended.

  • Facebook and Instagram support multiple media URLs.
  • X only accepts a single media URL.
  • Voice messages are supported on Facebook and Instagram as an aac or wav file.
curl \
-H "Authorization: Bearer API_KEY" \
-H 'Content-Type: application/json' \
-d '{"message": "What's up!", "recipientId": "283j839222"} \
-X POST https://api.acme.com/api/messages/instagram
{ // single text message
    "status": "success",
    "recipientId": "72706337063589124",
    "messageId": "aWdfZAG1faXRlbToxOkl",
    "message": "What is up?"
}