Discord

Send a Discord Direct Message

Send a 1:1 Direct Message from the bot to a Discord user (by snowflake ID). Supports the same payload shape as channel posts: content, embeds, media attachments, and TTS.

Constraints (Discord platform limits):

  • The bot can only DM users it shares at least one guild with.
  • If the recipient has DMs disabled for non-friends, Discord returns 403 (surfaces as a 502 platform error).
  • content capped at 2,000 chars.
  • At least one of content, embeds, or attachments is required.
  • The recipient must be identified by Discord snowflake ID (not username).

This is a dedicated endpoint rather than a POST /v1/posts variant because DMs are 1:1 operational messages (onboarding, billing reminders, support pings) with a different lifecycle than scheduled channel posts. DMs are not persisted to Post / ExternalPost and are always sent immediately.

Billing: Request; paid actions are priced in credits (see GET /v1/messaging/prices) · Rate limit: 60/min

post/v1/messaging/discord/dms

Request

  • Base URL: https://apihub.co.il
  • URL: https://apihub.co.il/v1/messaging/discord/dms
  • Auth: HTTP bearer

Headers

Idempotency-Keystring

Replay-safe: the same execution is returned instead of charging twice

X-Tagstring

Group calls into one job (e.g. one video) — see GET /v1/usage?tag=…

Request body

ttsboolean

Send as text-to-speech message.

embedsobject[]

Up to 10 Discord embeds. Same shape as channel-post embeds (title, description, color, fields, etc.). See DiscordPlatformData.embeds for the embed object schema.

userIdstring required

Discord snowflake ID of the recipient (15-21 digits).

contentstring

Message text, up to 2,000 characters.

accountIdstring required

SocialAccount _id of the connected Discord account the bot speaks as. Caller must own the account (directly or via team membership).

Response

Completed

idstring

Execution id — stable across internal retries; use it with GET /v1/executions/{id}

status'pending' | 'processing' | 'completed' | 'partial' | 'failed' | 'cancelled' | 'timeout'
operationstring
tagstring nullable

Your X-Tag, if sent

created_atstring date-time
completed_atstring date-time nullable
errorstring nullable

Changes

No recorded changes to this operation across all 2 revisions of this API.