Zernio
APIFor you
Zernio
APIFor you
Platforms

Discord

Overview

Set up

Connect

Publish

PublishPlatform Fields & Media

Engage

Inbox

Manage

Server Management

Reference

Limits & Errors
Dashboard
OverviewPlatformsAPI ReferenceResources
Discord

Inbox

Send 1:1 Discord direct messages from the bot.


Discord supports outbound DMs from the bot and nothing inbound. Replies do not arrive, because reading DMs needs a Gateway connection. There are no comments.

Channels, roles, members, pins and scheduled events are in Server management.

Direct messages

POST /v1/discord/dms (Send Discord DM) sends a 1:1 message from the bot to a user: onboarding, billing reminders, password resets, support pings.

Each DM counts as one outbound message.

curl -X POST https://zernio.com/api/v1/discord/dms \
  -H "Authorization: Bearer $ZERNIO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "accountId": "66b2e19d8c3f5a7e9d0b1c2d",
    "userId": "2233445566778899001",
    "content": "Welcome to Acme. Reply STOP to opt out."
  }'

Response (200):

{
  "messageId": "4455667788990011223",
  "channelId": "5566778899001122334",
  "url": "https://discord.com/channels/@me/5566778899001122334/4455667788990011223",
  "timestamp": "2027-01-01T12:00:00.000Z",
  "recipient": { "userId": "2233445566778899001", "platform": "discord" }
}

The body has the same shape as a channel post and also accepts embeds, attachments and tts. At least one of content, embeds or attachments is required.

userId is the recipient's snowflake id, not a username. Resolve a username with GET /v1/discord/guilds/{guildId}/members/search, which prefix-matches usernames and nicknames.

Who you can DM. The bot can only DM users who share at least one server with it.

A recipient who has DMs turned off for non-friends makes Discord return 403, which surfaces as a 502 platform error.

Was this page helpful?

Platform Fields & Media

Every Discord platformSpecificData field and the attachment requirements.

Server Management

Manage channels, roles, members, pinned messages and scheduled events in the bot's Discord server.

On this page

Direct messages