Skip to main content
GET
/
getConversation
Get a conversation with messages
curl --request GET \
  --url https://asteragents.com/api/getConversation \
  --header 'Authorization: Bearer <token>'
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"agentId": 123,
"userId": "user_2ABC123DEF",
"organizationId": "org_xxx",
"name": "Help with quarterly report",
"upstreamConversationId": null,
"renderedSystemPrompt": "You are a helpful assistant...",
"streamStatus": "completed",
"createdAt": "2024-01-15T10:30:00.000Z",
"updatedAt": "2024-01-15T10:35:00.000Z",
"deletedAt": null,
"messages": [
{
"id": "660e8400-e29b-41d4-a716-446655440001",
"role": "user",
"parts": [
{
"type": "text",
"text": "Can you help me analyze this data?"
}
]
},
{
"id": "660e8400-e29b-41d4-a716-446655440002",
"role": "assistant",
"parts": [
{
"type": "text",
"text": "Of course! I'd be happy to help you analyze the data."
}
]
}
]
}

Authorizations

Authorization
string
header
required

JWT token from Clerk authentication.

Must be from a user with org:admin role.

Query Parameters

threadId
string<uuid>
required

The UUID of the conversation thread

Example:

"550e8400-e29b-41d4-a716-446655440000"

Response

Successfully retrieved conversation

id
string<uuid>
required

Unique conversation identifier

Example:

"550e8400-e29b-41d4-a716-446655440000"

agentId
integer
required

ID of the agent this conversation is with

Example:

123

userId
string
required

Clerk user ID of the conversation owner

Example:

"user_2ABC123DEF"

createdAt
string<date-time>
required

When the conversation was created

Example:

"2024-01-15T10:30:00.000Z"

updatedAt
string<date-time>
required

When the conversation was last updated

Example:

"2024-01-15T10:35:00.000Z"

messages
object[]
required

All messages in the conversation, ordered by creation time

organizationId
string | null

Organization the conversation belongs to

Example:

"org_xxx"

name
string | null

Conversation name/title (auto-generated or user-defined)

Example:

"Help with quarterly report"

upstreamConversationId
string<uuid> | null

Parent conversation ID for branched conversations

Example:

null

renderedSystemPrompt
string | null

The system prompt used for this conversation (for audit)

Example:

"You are a helpful assistant..."

streamStatus
enum<string> | null

Current streaming status

Available options:
in_progress,
completed,
stopped,
error,
timeout
Example:

"completed"

deletedAt
string<date-time> | null

When the conversation was soft-deleted (null if active)

Example:

null

isDeleted
boolean

Present and true if conversation was soft-deleted

Example:

false