PeumeAPI

Social publishing & inbox

Send message

Send a message in a conversation. Supports text, attachments, quick replies, buttons, templates, and message tags. Attachment and interactive message support varies by platform.

$0.002 per callRuns on an account you connect

Call it

curl https://api.peume.com/v1/call/send-message \
  -H "Authorization: Bearer $PEUME_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "input": {
    "conversationId": "your conversationId",
    "accountId": "your accountId",
    "linkPreview": true,
    "sharedMediaId": "17895695668004550"
  }
}'

Answer: {"id": "run_…", "status": "completed", "cost_usd": …, "output": {…}}. Long jobs answer 202 with a run id to read later. From an AI agent, connect the MCP server and ask for this by name: send-message.

Parameters

conversationIdRequiredstring

Opaque conversation identifier, accepted verbatim from the list endpoint or from the conversationId on inbox webhooks. Format not to be assumed.

accountIdRequiredstring

Account ID

messagestring

Message text

attachmentUrlstring

URL of the attachment to send (image, video, audio, or file). Must be publicly accessible. For binary file uploads, use multipart/form-data instead. On WhatsApp, an image, video, or file combined with `buttons` renders as the header of one interactive reply-button message. Audio cannot be combined with buttons.

categorystring

WhatsApp only (Meta Direct Send). Sends a business-initiated UTILITY message without an approved template, e.g. outside the 24-hour customer service window. Meta matches or auto-creates a template asynchronously. - The WhatsApp Business Account must be eligible for Direct Send; otherwise the send fails, telling you to use an approved message template. - Supported only for text messages (link preview ok) and interactive messages (reply buttons, CTA URL buttons, voice-call button, header of text/image/video/document). - Cannot be combined with template, attachments, location, or contacts. - Uti

utility

linkPreviewboolean

WhatsApp and iMessage. Set false to send the message without a link-preview thumbnail. Ignored on other platforms. - WhatsApp: affects the first URL. - iMessage: every link renders as plain text. Defaults to true, which is how every WhatsApp text has been sent to date. Accepted on the JSON body only, not on multipart requests.

Example: true

attachmentTypestring

Type of attachment. Defaults to file if not specified.

image · video · audio · file

attachmentNamestring

WhatsApp only. Display name for a document sent via attachmentUrl with attachmentType: file (e.g. "Report.pdf"). Maps to the recipient's file name; without it WhatsApp derives the name from the URL and shows "Untitled". Ignored for image/video/audio and for binary uploads (which use the uploaded file's name).

voiceNoteboolean

WhatsApp only. When `true` on an audio attachment, the message is sent as a voice message (PTT): the recipient sees the waveform + voice-note UI instead of a basic audio attachment. Ignored for non-audio attachments. The audio file MUST be `.ogg` encoded with the OPUS codec (mono), per Meta's voice-message contract; other formats are rejected by WhatsApp.

subjectstring

iMessage only (JSON body only). Bold title line rendered above the message text. Rejected with 400 on other platforms; ignored on voice-message sends.

ccarray

Email threads only (Google / Microsoft accounts, JSON body only). Extra recipients copied on the reply.

effectstring

iMessage only (JSON body only). Apple screen/bubble animation played when the message arrives. Rejected with 400 on other platforms.

slam · loud · gentle · invisibleInk · echo · spotlight · balloons · confetti · love · lasers · fireworks · shootingStar …

contactCardboolean

iMessage only (JSON body only). When `true`, attaches the sender's contact card (vCard) so the recipient can save the sender. Counts as message content on its own, so `message` becomes optional.

channelstring

iMessage only (JSON body only). Overrides the delivery channel for this one send; the provider otherwise picks it automatically. The sender must carry the matching add-on (SMS, RCS or WhatsApp), or the send fails. Not a default to set on every request. Rejected with 400 on other platforms.

imessage · sms · rcs · whatsapp

sharedMediaIdstring

Instagram only (JSON body only; 400 on other platforms). Shares one of the account's own published posts in the DM, by its Instagram media id (the `id` returned by the media endpoints, not a permalink). Meta only accepts media the account owns. Sent on its own: cannot be combined with `message`, attachments, `quickReplies`, `buttons`, `template` or `sticker` (400). `messageTag: HUMAN_AGENT` is allowed. Works on accounts connected with Instagram Login and with Facebook Login.

Example: 17895695668004550

stickerstring

Instagram only (JSON body only). Sends a sticker instead of text; `like_heart` is the heart sticker. Sent on its own: cannot be combined with `message`, attachments, `quickReplies`, `buttons`, `template` or `sharedMediaId` (400). `messageTag: HUMAN_AGENT` is allowed. Rejected with 400 on other platforms.

like_heart

quickRepliesarray

Quick reply buttons. Mutually exclusive with buttons. Max 13 items.

buttonsarray

Action buttons. Max 3 items. Mutually exclusive with quickReplies. **Instagram / Facebook.** Also mutually exclusive with `template`: a Meta message carries one body shape, so sending both is a 400 rather than a silent drop of the buttons. The buttons and `message` render as Meta's button_template (one bubble with the text and the buttons below it), so `message` must be 640 characters or less when buttons are attached (400 otherwise). **WhatsApp.** Buttons always render as interactive reply buttons. Only `title` and `payload` are used; `type`, `url`, and `phone` are ignored. WhatsApp has no

templateobject

Platform-dependent template payload. Ignored on Telegram. **Instagram / Facebook:** a generic template (carousel). Set `type: generic` and provide up to 10 `elements`, each with a `title` (required) and optional `subtitle`, `imageUrl`, and `buttons`. - Mutually exclusive with the top-level `buttons` field (sending both is a 400); put card buttons on its `elements`. - On Facebook, `imageAspectRatio` (`horizontal`, the default, or `square`) sets how Messenger renders element images. Instagram has no such setting and rejects it. **WhatsApp:** sends an approved template message, the only type W

interactiveobject

WhatsApp only. Rich interactive payload for list messages, CTA URL buttons, Flow prompts, location requests, voice-call buttons and commerce messages (single product, product list, catalog, carousel). The shape mirrors Meta's Cloud API `interactive` object for the types in the enum below. When set, it takes priority over `buttons` and `quickReplies`. For simple button replies (WhatsApp's `interactive.type: "button"`) use `buttons` / `quickReplies` instead: that abstraction caps at 3 buttons and handles the auto-conversion for you. Use this field only for the enum types. All interactive messa

replyMarkupobject

Telegram-native keyboard markup. Ignored on other platforms.

messagingTypestring

Facebook messaging type. Send MESSAGE_TAG with messageTag on Facebook. Instagram ignores it and needs only messageTag.

RESPONSE · UPDATE · MESSAGE_TAG

messageTagstring

Facebook and Instagram. To reply after the 24h window, send HUMAN_AGENT with messagingType MESSAGE_TAG: it works up to 7 days after the person's last message, for replies typed by a person only (Meta does not allow it on automated messages). Meta retired the other tags, so they fail.

CONFIRMED_EVENT_UPDATE · POST_PURCHASE_UPDATE · ACCOUNT_UPDATE · HUMAN_AGENT

replyTostring

Platform message ID to quote-reply to. - WhatsApp: the wamid. - Telegram: the Telegram message ID (message.platformMessageId on webhooks, and `id` on each entry of the list-messages endpoint). - Slack: threads the reply (thread_ts) instead of quoting. - Instagram and Facebook Messenger: no send-side quote replies. The message is sent without a quote and the successful response includes a warnings entry with code ignored_field and param replyTo. - Other platforms without send-side reply support ignore this field.

locationobject

WhatsApp and iMessage. Send a location pin (on iMessage it renders as a native map bubble).

contactsarray

WhatsApp-only. Send one or more contact cards.

Start free · $1 of calls included

Every API your product needs. One key.

7,267 endpoints, one bill, and you only pay for calls that work.