v11

latestOpenAPI 3.1.0raw.githubusercontent.com2026-08-0112893437.0 KB
Users

Get DM conversation history

get/x/dm/{userId}/history

Path parameters

userIdstring required

Target user ID

Query parameters

accountstring required

X handle (without the @ prefix) of the connected X account used to read the conversation. The account must be a participant in the conversation.

cursorstring

Pagination cursor for DM history

maxIdstring

Legacy pagination cursor (backward compat)

Response

List of DM messages

has_next_pageboolean required
next_cursorstring required

Example response

{
  "messages": [
    {
      "id": "1234567890123456789",
      "text": "Hey, how are you?",
      "senderId": "9876543210",
      "receiverId": "1234567890"
    }
  ],
  "has_next_page": true,
  "next_cursor": "DAACCgACGRElMJcAAA"
}