---
title: "Get DM conversation history"
method: GET
path: "/api/v1/x/dm/{userId}/history"
tags: ["Users"]
---

# Get DM conversation history

`GET /api/v1/x/dm/{userId}/history`

Returns message history with one user for the connected X account.

## Path parameters

- `userId` string, required

## Query parameters

- `account` string, required
- `cursor` string
- `maxId` string

## Response `200`

List of DM messages

- object
  - `messages` object[], required
    - `id` string, required
    - `text` string
    - `senderId` string, required
    - `receiverId` string, required
    - `createdAt` string
    - `mediaUrl` string — URL of attached media (image, GIF, or video). Omitted when the message has no media attachment.
  - `has_next_page` boolean, required
  - `next_cursor` string, required

## Other responses

- `400` — Invalid input. Either `invalid_user_id` (path user ID is empty or invalid) or `account_required` (the `account` query parameter was missing or empty).
- `401` — Unauthenticated
- `402` — Payment required. MPP reads include `WWW-Authenticate`. Authenticated reads include balances and checkout; a failed request never creates checkout. Guest keys offer top-up.
- `403` — DM read forbidden. The connected account may not be in the conversation, or it may be restricted or need reauthentication. Check the error code, then fix the account.
- `404` — Connected X account not found for the authenticated user.
- `424` — Dependency unavailable, unauthorized, or limited. Default v1 uses 502; best-practice responses use 424 for transparent dependency failures. Search answers 424 `search_unavailable` when X fails the query itself.
- `429` — Xquik tier rate limit exceeded. Wait `Retry-After` seconds before retrying.
- `502` — Dependency unavailable, unauthorized, or limited. Default v1 uses 502; best-practice responses use 424 for transparent dependency failures. Search answers 424 `search_unavailable` when X fails the query itself.
- `default` — Unexpected error.

## Changes

- **2026-09-27** `c33250258fdf` — 36 warning
  - added the new `draw_too_large` enum value to the `allOf[#/components/schemas/Error]/error/oneOf[subschema #1: LegacyErrorCode]/` response property for the response status `429`
  - added the new `draw_too_large` enum value to the `allOf[#/components/schemas/Error]/error/oneOf[subschema #2: StructuredError]/code` response property for the response status `429`
  - added the new `draw_too_large` enum value to the `error/oneOf[subschema #1: LegacyErrorCode]/` response property for the response status `400`
  - added the new `draw_too_large` enum value to the `error/oneOf[subschema #1: LegacyErrorCode]/` response property for the response status `401`
  - …32 more
- **2026-09-26** `9ae77b3e4fdc` — 18 warning
  - added the new `bookmark_folders_unavailable` enum value to the `allOf[#/components/schemas/Error]/error/oneOf[subschema #1: LegacyErrorCode]/` response property for the response status `429`
  - added the new `bookmark_folders_unavailable` enum value to the `allOf[#/components/schemas/Error]/error/oneOf[subschema #2: StructuredError]/code` response property for the response status `429`
  - added the new `bookmark_folders_unavailable` enum value to the `error/oneOf[subschema #1: LegacyErrorCode]/` response property for the response status `400`
  - added the new `bookmark_folders_unavailable` enum value to the `error/oneOf[subschema #1: LegacyErrorCode]/` response property for the response status `401`
  - …14 more
- …earlier changes not shown

[Full history](https://skmtc.dev/xquik-dev/apis/xquik-api-2/changes/api/v1/x/dm/:userId/history/get.md)

---

[API](https://skmtc.dev/xquik-dev/apis/xquik-api-2.md) · [All operations](https://skmtc.dev/xquik-dev/apis/xquik-api-2/llms.txt) · [OpenAPI document](https://skmtc.dev/xquik-dev/apis/xquik-api-2/revisions/c33250258fdf?raw)
