Skip to main content
GET
/
v1
/
conversations
/
:id
Get Conversation
curl --request GET \
  --url https://api.example.com/v1/conversations/:id

Documentation Index

Fetch the complete documentation index at: https://astralform.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

Endpoint

GET https://api.astralform.ai/v1/conversations/{conversation_id}

Request

Headers

X-API-Key: af_live_xxxxxxxxxxxx

Path Parameters

ParameterTypeDescription
conversation_idstringThe conversation ID

Response

{
  "data": {
    "id": "conv_abc123",
    "created_at": "2024-01-15T10:30:00Z",
    "updated_at": "2024-01-15T10:35:00Z",
    "messages": [
      {
        "id": "msg_001",
        "role": "user",
        "content": "What's the weather like today?",
        "created_at": "2024-01-15T10:30:00Z"
      },
      {
        "id": "msg_002",
        "role": "assistant",
        "content": "Based on your location, it's currently 65°F and sunny in San Francisco.",
        "created_at": "2024-01-15T10:30:05Z"
      }
    ]
  }
}

Message Object

FieldTypeDescription
idstringUnique message identifier
rolestring”user” or “assistant”
contentstringMessage content
created_atstringISO 8601 timestamp

Example

cURL

curl -X GET https://api.astralform.ai/v1/conversations/conv_abc123 \
  -H "X-API-Key: af_live_xxxxxxxxxxxx"

Swift

let conversation = try await client.getConversation(id: "conv_abc123")

for message in conversation.messages {
    print("[\(message.role)]: \(message.content)")
}

Error Responses

404 Not Found
{
  "error": {
    "code": "conversation_not_found",
    "message": "Conversation conv_abc123 was not found"
  }
}
401 Unauthorized
{
  "error": {
    "code": "invalid_api_key",
    "message": "The API key provided is invalid"
  }
}