Skip to main content
GET
/
v1
/
admin
/
conversations
/
:conversationId
Get Conversation
curl --request GET \
  --url https://api.example.com/v1/admin/conversations/:conversationId \
  --header 'x-admin-api-key: <x-admin-api-key>'
{
  "conversation": {
    "_id": "<string>",
    "_creationTime": 123,
    "sessionId": "<string>",
    "createdAt": 123,
    "updatedAt": 123,
    "lastMessage": "<string>"
  },
  "messages": [
    {
      "_id": "<string>",
      "role": {},
      "content": "<string>",
      "createdAt": 123
    }
  ],
  "error": "<string>"
}
Retrieves a complete conversation thread including all messages.

Authentication

This endpoint requires admin authentication via the x-admin-api-key header.
x-admin-api-key
string
required
Admin API key for authentication

Path Parameters

conversationId
string
required
The unique identifier of the conversation to retrieve. Must be 1-128 characters.

Response

Returns a ConversationThread object containing the conversation summary and all messages.
conversation
ConversationSummary
Summary information about the conversation
messages
ConversationMessage[]
Array of all messages in the conversation thread

Example Request

curl -X GET "https://your-domain.com/v1/admin/conversations/jd7s8dk2ls8dk3ks9d" \
  -H "x-admin-api-key: your-admin-api-key"

Example Response

{
  "conversation": {
    "_id": "jd7s8dk2ls8dk3ks9d",
    "_creationTime": 1709481600000,
    "sessionId": "user-session-123",
    "createdAt": 1709481600000,
    "updatedAt": 1709481650000,
    "lastMessage": "Thank you for your help!"
  },
  "messages": [
    {
      "_id": "msg_001",
      "role": "user",
      "content": "How do I reset my password?",
      "createdAt": 1709481600000
    },
    {
      "_id": "msg_002",
      "role": "assistant",
      "content": "I can help you reset your password. Please click on the 'Forgot Password' link on the login page.",
      "createdAt": 1709481620000
    },
    {
      "_id": "msg_003",
      "role": "user",
      "content": "Thank you for your help!",
      "createdAt": 1709481650000
    }
  ]
}

Error Responses

error
string
Error message

400 Bad Request

{
  "error": "Invalid conversationId"
}

401 Unauthorized

{
  "error": "Unauthorized"
}

404 Not Found

{
  "error": "Conversation not found"
}

503 Service Unavailable

{
  "error": "ADMIN_API_KEY is not configured on this deployment"
}

Build docs developers (and LLMs) love