# Conversation & Pagination > Reference for Conversation, Conversation.Status and Page, the types used for conversation history `listConversations` returns `Conversation` values, and both list methods wrap their results in a `Page`. This page lists every field. ## Conversation `struct Conversation: Sendable, Equatable, Identifiable, Decodable` What [`listConversations`](/docs/ios-sdk/conversations) returns. ```swift public struct Conversation: Sendable, Equatable, Identifiable, Decodable { public enum Status: String, Sendable, Codable { case ongoing, ended, takenOver = "taken_over" } public let id: String public let title: String? public let createdAt: Date public let updatedAt: Date public let userId: String? public let status: Status } ``` | Property | Type | Description | | - | - | - | | `id` | `String` | The conversation ID. Pass it to `listMessages` or `send`. | | `title` | `String?` | A short summary QwryAI writes for the conversation. `nil` until there is one, so show something like "New conversation" instead. | | `createdAt` | `Date` | When the conversation started. | | `updatedAt` | `Date` | When it was last active. Lists come sorted on this, newest first. | | `userId` | `String?` | The signed-in user the conversation belongs to, or `nil` if it belongs to a device. | | `status` | `Status` | See [Conversation.Status](#conversationstatus). | > [!NOTE] > > `createdAt` and `updatedAt` arrive from the server as seconds since 1970. The SDK turns them into `Date` values, so there's nothing to convert. `Conversation` is `Identifiable`, so it works with `ForEach` and `List` as it is: ```swift List(conversations) { conversation in NavigationLink { ChatScreen(client: client, conversationId: conversation.id) } label: { VStack(alignment: .leading) { Text(conversation.title ?? "New conversation") Text(conversation.updatedAt, style: .relative) .font(.caption) .foregroundStyle(.secondary) } } } ``` ## Conversation.Status ```swift public enum Status: String, Sendable, Codable { case ongoing // "ongoing" open, answered by your agent case ended // "ended" closed case takenOver = "taken_over" // a person on your team took over } ``` Only `.ongoing` conversations take new messages. Sending to any other fails with `403` `CHAT_CONVERSATION_NOT_ONGOING`. See [Error Handling](/docs/ios-sdk/error-handling). ```swift if conversation.status == .ongoing { showComposer() } else { showReadOnlyBanner() } ``` ## Message `Message` is used for both answers and history. See [ChatResponse](/docs/ios-sdk/chat-response) for the full reference, along with `MessagePart`, `Message.Role` and `Message.Feedback`. ## Page `struct Page: Sendable, Decodable` What `listConversations()` and `listMessages(conversationId:)` return. ```swift public struct Page: Sendable, Decodable { public let items: [Item] public let cursor: String? public let hasMore: Bool public let total: Int } ``` | Property | Type | Description | | - | - | - | | `items` | `[Item]` | The items on this page. | | `cursor` | `String?` | Where the next page starts. Pass it back as `cursor`. `nil` on the last page. | | `hasMore` | `Bool` | Whether there are more pages. | | `total` | `Int` | How many items there are in all. | ### Next page There's no helper on the page itself: pass `cursor` back to the same method. Keep the same `limit` so pages stay the same size. > [!WARNING] > > Each page holds **only its own items**. It doesn't build up a full list. Add `page.items` to your own array yourself. ```swift var page = try await client.listConversations(limit: 20) var all = page.items while page.hasMore, let cursor = page.cursor { page = try await client.listConversations(cursor: cursor, limit: 20) all.append(contentsOf: page.items) } ``` > [!NOTE] > > Pass a cursor back to the same list it came from, unchanged. A cursor the server can't read fails with `400` `VALIDATION_INVALID_BODY`. ## Related > [card] Conversations & History | /docs/ios-sdk/conversations | Listing conversations and loading history. > [card] ChatResponse | /docs/ios-sdk/chat-response | Message, MessagePart and answer types. > [card] SwiftUI | /docs/ios-sdk/swiftui | ConversationListState pages for you. > [card] User Identity | /docs/ios-sdk/user-identity | How sign-in changes what you see.