Skip to main content
GET
/
api
/
v1
/
user
/
conversations
List user conversations
curl --request GET \
  --url https://handauncle-backend-prod-205012263523.asia-south1.run.app/api/v1/user/conversations \
  --header 'Authorization: Bearer <token>'
{
  "success": true,
  "data": {
    "conversations": [
      {
        "id": "<string>",
        "lastMessageAt": "2023-11-07T05:31:56Z",
        "status": "active",
        "messageCount": 123,
        "title": "<string>",
        "type": "chat",
        "inputType": "text",
        "prepromptKey": "<string>",
        "preview": "<string>",
        "pinned": true,
        "tags": [
          "<string>"
        ]
      }
    ],
    "pagination": {
      "total": 123,
      "limit": 123,
      "offset": 123,
      "hasMore": true
    }
  },
  "meta": {
    "timestamp": "2023-11-07T05:31:56Z",
    "requestId": "<string>"
  }
}
Returns the authenticated user’s conversations ordered by lastMessageAt. Use status, limit, offset, sortBy, and sortOrder to replicate the in-app sidebar view while keeping pagination metadata in sync. Use the optional q parameter to perform a lightweight title/preview search across conversations. When q is provided, the endpoint filters results by matching the query string against conversation titles and preview text.

Response Fields

Each conversation in the list includes:
  • type: 'chat' or 'second_opinion' - Conversation type
  • inputType: 'text', 'file', or 'voice' - How the conversation was initiated
  • prepromptKey: The pre-prompt used (if any) when creating the conversation
These metadata fields enable you to:
  • Display appropriate icons based on input type (e.g., file icon for file uploads)
  • Show pre-prompt badges in the UI
  • Filter/group conversations by type or input method
  • Track analytics on user engagement patterns

Authentication

Supports both authentication methods:
  • Auth0 JWT: Authorization: Bearer <token> (registered users)
  • Device-based: x-device-id, x-user-id, x-platform headers (guest users)
In the playground above, select your preferred authentication method from the security dropdown.

Authorizations

Authorization
string
header
required

Auth0 access token for registered users.

Query Parameters

limit
integer
default:50

Number of conversations to return (1-100).

Required range: 1 <= x <= 100
offset
integer
default:0

Offset to start listing from.

Required range: x >= 0
status
enum<string>

Filter conversations by lifecycle status.

Available options:
active,
archived,
deleted
sortBy
enum<string>
default:lastMessageAt

Field used for ordering results.

Available options:
lastMessageAt,
createdAt
sortOrder
enum<string>
default:desc

Sort order.

Available options:
asc,
desc
q
string

Search query string for filtering by title or preview (case-insensitive).

Required string length: 1 - 200

Response

Conversation list returned.

success
enum<boolean>
required
Available options:
true
data
object
required
meta
object
required