x.com
Send X DM
Input
handle requiredRecipient's X handle without @
message requiredMessage text to send
pin optional4-digit E2E passcode — required only if X shows the Enter Passcode screen (fresh session without stored encryption keys). Omit otherwise.
Output
sent requiredrecipient requiredconversation_id optionalDerived 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.
