Skip to main content
GET
/
v1
/
conversations
List Conversations
curl --request GET \
  --url https://api.example.com/v1/conversations

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

Request

Headers

X-API-Key: af_live_xxxxxxxxxxxx

Query Parameters

ParameterTypeDefaultDescription
limitinteger20Number of results (1-100)
offsetinteger0Pagination offset
orderstring”desc”Sort order: “asc” or “desc”

Response

{
  "data": [
    {
      "id": "conv_abc123",
      "created_at": "2024-01-15T10:30:00Z",
      "updated_at": "2024-01-15T10:35:00Z",
      "message_count": 5
    },
    {
      "id": "conv_def456",
      "created_at": "2024-01-14T09:00:00Z",
      "updated_at": "2024-01-14T09:15:00Z",
      "message_count": 12
    }
  ],
  "meta": {
    "total": 42,
    "limit": 20,
    "offset": 0
  }
}

Conversation Object

FieldTypeDescription
idstringUnique conversation identifier
created_atstringISO 8601 creation timestamp
updated_atstringISO 8601 last update timestamp
message_countintegerNumber of messages in conversation

Example

cURL

curl -X GET "https://api.astralform.ai/v1/conversations?limit=10" \
  -H "X-API-Key: af_live_xxxxxxxxxxxx"

Swift

let conversations = try await client.listConversations(
    limit: 10,
    offset: 0
)

for conv in conversations {
    print("\(conv.id): \(conv.messageCount) messages")
}

Pagination

Use limit and offset for pagination:
# First page
GET /v1/conversations?limit=20&offset=0

# Second page
GET /v1/conversations?limit=20&offset=20

# Third page
GET /v1/conversations?limit=20&offset=40
The meta.total field indicates the total number of conversations.