List conversations

conversations(projectReference: String, limit: Int, cursor: String, type: String, participantIds: [ID!], agentId: String, userId: ID, search: String, sortBy: String, sortOrder: String): ConversationConnection!

Arguments

ArgumentTypeRequiredDescription
projectReferenceStringNo
limitIntNo
cursorStringNo
typeStringNoOnly conversations of this type, e.g. chat.
participantIds[ID!]NoOnly conversations that include every listed participant id (at most 20 UUIDs).
agentIdStringNoOnly conversations with this agent participant (public agent id).
userIdIDNoOnly conversations with this user participant (user UUID).
searchStringNoCase-insensitive title substring (1-200 characters).
sortByStringNoSort key, as on REST: updated_at (default), created_at, title or message_count.
sortOrderStringNoSort direction, as on REST: desc (default) or asc.

Response

Returns ConversationConnection!. Open the type for its fields and nested types.

FieldType
data[Conversation!]!
pageInfoPageInfo!

Types marked with ! cannot be null. Lists use [Type] notation. The type index lists all published input and response types.

Example

graphql
query Conversations($projectReference: String, $limit: Int, $cursor: String, $type: String, $participantIds: [ID!], $agentId: String, $userId: ID, $search: String, $sortBy: String, $sortOrder: String) {
  conversations(projectReference: $projectReference, limit: $limit, cursor: $cursor, type: $type, participantIds: $participantIds, agentId: $agentId, userId: $userId, search: $search, sortBy: $sortBy, sortOrder: $sortOrder) {
    data {
      id
      projectId
      status
      createdAt
      updatedAt
    }
    pageInfo {
      hasNextPage
      endCursor
      hasPreviousPage
      startCursor
    }
  }
}
json
{}