TwitterAPIs Docs
API ReferenceDirect Messages

Twitter DM API | Read the Inbox and Send Messages

Direct Messages: Read your account's DM inbox and the message history of a single conversation, and send new messages, all acting as the account behind your registered session.

Read your account's DM inbox and the message history of a single conversation, and send new messages, all acting as the account behind your registered session.

The usual flow is /dm/list to page through conversation threads (each carries a conversation_id and participant list), then /dm/conversation with that id to pull the full message history for one thread. /dm/send posts as your account. All three act on behalf of one X account, so each call authenticates with either a registered session (POST /customer/session) or per-call x-auth-token and x-ct0 headers, which is what lets one API key poll or send from many different accounts. All three are flat $0.0016 per call regardless of message count, so paging a long conversation costs the same as reading a short one.

This category has 3 endpoints. Each is a pay-per-call REST endpoint with bearer auth, JSON in and out.

MethodPathCostDescription
POST/dm/send$0.0016Send a direct message from your authenticated account.
GET/dm/list$0.0016List the Direct Message conversations for your registered account.
GET/dm/conversation$0.0016Read the message history of one DM conversation by conversation_id.