App Logo
x.com

Send X DM

Send a direct message to an X user, addressed by handle. Returns the recipient, a sent flag and conversation_id. Delivery is confirmed by X's own send mutation returning HTTP 200, not by reading the DOM. conversation_id is null for a brand-new DM and for a DM to your own account (the compose dialog renders no existing-conversation cell to read the recipient id from) — a null there does not mean the send failed. A fresh session with no stored encryption keys may need the 4-digit E2E pin.

Input

handle required

Recipient's X handle without @

message required

Message text to send

pin optional

4-digit E2E passcode — required only if X shows the Enter Passcode screen (fresh session without stored encryption keys). Omit otherwise.

Output

sent required
recipient required
conversation_id optional

Derived as "<recipientId>-<ownId>", matching get_inbox's format. Null when the compose dialog offered no existing-conversation cell to read the recipient id from — the case for a brand-new DM and for a DM to your own account — so null here does not mean the send failed. Confirm delivery with get_messages if you need it.

FAQ

Send a direct message to an X user, addressed by handle. Returns the recipient, a sent flag and conversation_id. Delivery is confirmed by X's own send mutation returning HTTP 200, not by reading the DOM. conversation_id is null for a brand-new DM and for a DM to your own account (the compose dialog renders no existing-conversation cell to read the recipient id from) — a null there does not mean the send failed. A fresh session with no stored encryption keys may need the 4-digit E2E pin.
Required: handle, message. Optional: pin.
It returns sent, recipient, conversation_id.
Yes. It acts as you on x.com: on your own Chrome it reuses your session, and on a Reduck-hosted browser it loads the x.com cookies saved by the Reduck extension.
It makes changes on x.com, like sending, posting or booking something.
Ask an AI agent connected to Reduck to run reduck/x.com/send_dm, or run it from a terminal with the Reduck CLI: npx @reduck-ai/cli@latest run --script reduck/x.com/send_dm
It is part of Reduck's official curated catalogue.

Start building not clicking