Skip to main content
POST
Send a new direct message to a recipient.
Pricing & Limits: Each User Profile can have up to 1,000 active conversations per billing cycle across all social networks. Pricing depends on your plan: Premium plans pay a flat 49permonthaddon,whileLaunchandBusinessplansarebilledat49 per month** add-on, while **Launch** and **Business** plans are billed at **0.09 per active conversation. A conversation is counted as active when you send a message to a recipient during the billing cycle; inbound messages alone do not count. The number of messages within an active conversation is unlimited.
  • 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.
WhatsApp 24-hour customer service window. WhatsApp Business only permits free-form outbound messages within 24 hours of the most recent message from the correspondent. After that window, message sends will be rejected by Meta until the correspondent messages again. Templated messages outside the 24-hour window are not currently supported through this endpoint.

Header Parameters

Path Parameters

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

Body Parameters

string
required
The ID of the message recipient.
  • For Facebook, Instagram, and X/Twitter this is the platform-specific user ID (PSID, IGSID, or user ID).
  • For WhatsApp this is the recipient’s phone number in E.164 digits-only format (for example 14155551234, not +1 (415) 555-1234).
string
required
The message to send to the recipient.
  • Facebook, Instagram, and WhatsApp message may be an empty string or omitted entirely when mediaUrls is provided.
  • X requires a message of at least one character even if a mediaUrls is provided.
array
Array of media URLs for attaching images, video, audio (including voice messages), or documents.
  • 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.
  • WhatsApp accepts multiple media URLs. Ayrshare fetches each URL and uses its response Content-Type to select the WhatsApp media category. Meta accepts:
    • Image: .jpg, .jpeg, .png
    • Video: .mp4, .3gp
    • Audio: .aac, .amr, .mp3, .m4a, .ogg
    • Document: .txt, .pdf, .ppt, .pptx, .doc, .docx, .xls, .xlsx