/api/v1/user/* router powers the in-app conversation list, individual
threads, and lifecycle actions such as pinning, archiving, restoring, or
deleting chats. All endpoints support both Auth0 JWT and device-based authentication,
enabling seamless access for both registered users and guest users during trial flows.
Authentication Methods
All conversation endpoints support two authentication options:-
Auth0 JWT (Registered users)
- Header:
Authorization: Bearer <token> - Standard authenticated flow for logged-in users
- Header:
-
Device-based (Guest users)
- Headers:
x-device-id,x-user-id(optional),x-platform - Same authentication as chat API
- Enables conversation management during free trial/guest sessions
- Headers:
Conversation Metadata
Each conversation now includes rich metadata to support analytics and better UX:type:'chat'or'second_opinion'- Differentiates main chat from second opinion featureinputType:'text','file', or'voice'- How the conversation was initiated (tracks user engagement patterns)prepromptKey: The pre-prompt used when creating the conversation (enables pre-prompt analytics)
Quick facts
- Base path:
/api/v1/user - All responses use the shared
{ success, data, meta }envelope - Pagination follows
limit/offsetsemantics with ahasMorecursor hint where applicable - Conversation IDs are MongoDB ObjectIds (24 hex characters)
- Both authentication methods work identically - choose based on your use case
Using the API Playground
In the “Try it” section on each endpoint page:- Select your authentication method from the security dropdown
- For Auth0 JWT: Enter your bearer token in the Authorization field
- For Device-based: The playground will show fields for
x-device-id,x-user-id, andx-platform