TwitterAPIs Docs
API ReferenceDirect Messages

DM Inbox API

List the DM conversations (inbox) for the account behind your session. Returns each conversation's ID, type, and participant user IDs. Pass a conversation_id to GET /dm/conversation to read its messages. Authenticate with a registered session (POST /customer/session) or per-call x-auth-token and x-ct0 headers, so one API key can poll the inboxes of many accounts. Read-only: this does not send DMs. Cost: $0.0016 per call.

GET
/dm/list

Authorization

bearerAuth
AuthorizationBearer <token>

Pass your API key as a bearer token on every request: Authorization: Bearer <API_KEY>.

In: header

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/dm/list"
{  "count": 2,  "conversations": [    {      "conversation_id": "1749154312754794496-1972455697997824000",      "type": "ONE_TO_ONE",      "participants": [        "1749154312754794496",        "1972455697997824000"      ]    },    {      "conversation_id": "1796873533852692480-1972455697997824000",      "type": "ONE_TO_ONE",      "participants": [        "1796873533852692480",        "1972455697997824000"      ]    }  ]}
{  "error": "bad_request",  "message": "Missing or malformed parameter. Fix the request before retrying."}
{  "error": "unauthorized",  "message": "The API key is missing, malformed, or revoked. Check the Authorization header."}
{  "error": "insufficient_credits",  "message": "Your balance is exhausted. Top up your credits to continue."}
{  "error": "not_found",  "message": "The resource does not exist, for example a deleted tweet or a private account."}
{  "error": "rate_limited",  "message": "Too many requests. Back off and retry with exponential backoff."}
{  "error": "server_error",  "message": "Something failed on our side. Retry with backoff; if it persists, contact support."}

Pricing

UnitPrice
Per call$0.0016
Per 1,000 calls$1.60