Call it
curl https://api.peume.com/v1/call/send-a-discord-direct-message \
-H "Authorization: Bearer $PEUME_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"input": {
"accountId": "65a1b2c3d4e5f60718293a4b",
"userId": "1234567890123456789"
}
}'const res = await fetch("https://api.peume.com/v1/call/send-a-discord-direct-message", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.PEUME_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"input": {
"accountId": "65a1b2c3d4e5f60718293a4b",
"userId": "1234567890123456789"
}
}),
});
const { output, cost_usd } = await res.json();import os, requests
res = requests.post(
"https://api.peume.com/v1/call/send-a-discord-direct-message",
headers={"Authorization": f"Bearer {os.environ['PEUME_API_KEY']}"},
json={
"input": {
"accountId": "65a1b2c3d4e5f60718293a4b",
"userId": "1234567890123456789"
}
},
)
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: send-a-discord-direct-message.
Parameters
accountIdRequiredstringSocialAccount _id of the connected Discord account the bot speaks as. Caller must own the account (directly or via team membership).
Example: 65a1b2c3d4e5f60718293a4b
userIdRequiredstringDiscord snowflake ID of the recipient (15-21 digits).
Example: 1234567890123456789
contentstringMessage text, up to 2,000 characters.
embedsarrayUp to 10 Discord embeds. Same shape as channel-post embeds (title, description, color, fields, etc.). See DiscordPlatformData.embeds for the embed object schema.
attachmentsarrayUp to 10 media attachments. Each is `{ type: image|video|gif|document, url, filename?, mimeType?, size? }`.
ttsbooleanSend as text-to-speech message.
