Call it
curl https://api.peume.com/v1/call/create-conversation \
-H "Authorization: Bearer $PEUME_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"input": {
"accountId": "your accountId",
"skipDmCheck": false,
"linkPreview": true
}
}'const res = await fetch("https://api.peume.com/v1/call/create-conversation", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.PEUME_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"input": {
"accountId": "your accountId",
"skipDmCheck": false,
"linkPreview": true
}
}),
});
const { output, cost_usd } = await res.json();import os, requests
res = requests.post(
"https://api.peume.com/v1/call/create-conversation",
headers={"Authorization": f"Bearer {os.environ['PEUME_API_KEY']}"},
json={
"input": {
"accountId": "your accountId",
"skipDmCheck": False,
"linkPreview": True
}
},
)
print(res.json()["output"])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: create-conversation.
Parameters
accountIdRequiredstringThe account ID to send from
participantIdstringRecipient identifier. Provide either this or participantUsername. - X: the numeric user ID. - WhatsApp and SMS: the recipient phone number in international format (digits, country code included). - Slack: the workspace member id (e.g. U01ABCDEF). - iMessage: a phone number in international format with the leading +, or an iMessage email.
participantUsernamestringRecipient handle/username, an X or Bluesky handle (with or without @) or a Reddit username (with or without u/). Resolved via lookup. Provide either this or participantId.
messagestringText content of the message. At least one of message, attachment, or (for WhatsApp) templateName is required. Required when category is set (a Direct Send utility message is a text message). Required on email accounts.
subjectstringEmail accounts only (Google / Microsoft). Subject of the new thread.
ccarrayEmail accounts only (Google / Microsoft). Extra recipients copied on the opening mail.
skipDmCheckbooleanX only. Skip the receives_your_dm eligibility check before sending. Use if you have already verified the recipient accepts DMs.
Example: false
templateNamestringWhatsApp only. Name of the approved template to start the conversation with. Required for WhatsApp unless category is used instead (Direct Send). Cannot be combined with category.
categorystringWhatsApp only (Meta Direct Send). Combined with message and without templateName, starts the conversation with a business-initiated UTILITY message and no pre-approved template. Meta matches or auto-creates a template asynchronously. - The WhatsApp Business Account must be eligible for Direct Send; otherwise the send fails with an error telling you to use an approved message template instead. - Cannot be combined with templateName (templates are already categorized at creation). - Utility messages only: marketing content is not allowed under this category. - Accepted on the JSON body only, no
utility
linkPreviewbooleanWhatsApp only. Set false to send the Direct Send (category: 'utility') text message without a link-preview thumbnail for the first URL in the text. Defaults to true, which is how every WhatsApp text has been sent to date. Does not apply to template sends. Accepted on the JSON body only, not on multipart requests.
Example: true
templateLanguagestringWhatsApp only. Template language code (e.g. en_US).
templateParamsarrayWhatsApp only. Template variable values as one flat array, in order of appearance across the whole template: text-header variables, then body variables, then one value per dynamic URL button (in button order). Works with positional placeholders ({{1}}, {{2}},...) and named placeholders ({{name}}, {{company}}, as Meta Business Manager creates them); values fill named slots in order of appearance. Example: a body with {{1}}, {{2}} plus a URL button https://example.com/{{1}} takes three values: [body1, body2, buttonSuffix]. For positional templates the list must cover every slot. Fewer values
templateButtonParamsarrayWhatsApp only. Values for template buttons that take one at send time, each addressed by the button's position in the approved template. This is the only way to send a copy-code button's payload (a Pix payment code, a coupon) or a flow token, since templateParams is a flat array of text variables covering dynamic URL buttons only. - A button here overrides what templateParams would derive for that index, so no button is sent twice. - Repeating an index within this array is rejected with 400. - Each index must name a button of the matching kind on the approved template. This is checked before
templateCardsarrayWhatsApp only. Per-card overrides for a CAROUSEL template, each addressed by the card's card_index. Carousel card body variables restart at {{1}} per card, so they cannot be expressed in the flat templateParams slot order; use this instead. Rejected with 400 (INVALID_TEMPLATE_CARD_PARAM): a cardIndex naming a card the approved template lacks, a duplicate cardIndex, or a params count that does not match the card body's token count.
headerMediaobjectWhatsApp only. Overrides a media-header template's header asset for THIS send, so a template with an image/video/document header can carry a different asset per message (e.g. each recipient their own invoice PDF). Without it, the template's approved sample asset is sent. Provide exactly one of link or id.
headerLocationobjectWhatsApp only. Required to send a template whose approved header format is LOCATION: Meta only accepts the location's lat/long at send time, never at template creation, so there is nothing to fill in automatically. Cannot be combined with headerMedia (a template has exactly one header).
