Conversations

List conversations.

Changed on

Returns all conversations for an agent. Each conversation represents a chat session with a user and contains the full message history. Results are paginated and sorted by most recent activity.

get/api/v1/projects/{projectId}/conversations

Request

Path parameters

projectIdinteger required
Example:1

The ID of the agent to get the conversations for

Query parameters

pageinteger

Page number to retrieve. Page numbering starts at 1.

Increment until the response's last_page value is reached to paginate through all results. Default: 1.

order'asc' | 'desc'
Example:desc

Sort direction for results.

orderBy'id' | 'created_at'
Example:id

Field to sort results by.

userFilter'all' | 'anonymous' | 'team_member' | 'me'
Example:all

Filter conversations by user type.

namestring
Example:Ask me anything

Filter the results by conversation name

lastUpdatedAfterstring date-time nullable
Example:2025-01-09T18:30:00Z

Only conversations that received message(s) after this date will be returned in results. If not set, the parameter is ignored.

Response

List of conversations for an agent

status'error' | 'success'

The status of the response

Example response

{
  "status": "success",
  "data": {
    "current_page": 1,
    "data": [
      {
        "created_at": "2023-04-30 16:43:53",
        "updated_at": "2023-04-30 16:43:53",
        "deleted_at": "2023-04-30 16:43:53",
        "id": 1,
        "name": "Conversation 1",
        "session_id": "f1b9aaf0-5e4e-11eb-ae93-0242ac130002"
      }
    ],
    "first_page_url": "https://app.customgpt.ai/api/v1/users?page=1",
    "from": 1,
    "last_page": 1,
    "last_page_url": "https://app.customgpt.ai/api/v1/users?page=1",
    "next_page_url": "https://app.customgpt.ai/api/v1/users?page=1",
    "path": "https://app.customgpt.ai/api/v1/users?page=1",
    "per_page": 10,
    "prev_page_url": "https://app.customgpt.ai/api/v1/users?page=1",
    "to": 1,
    "total": 1
  }
}

Changes

    • warning

      added the new 422.00 enum value to the / response property for the response status

    • warning

      added the new 422.00 enum value to the / response property for the response status

    • warning

      added the new 422.00 enum value to the / response property for the response status

    • warning

      added the new 422.00 enum value to the / response property for the response status

    • info

      added the new optional query request parameter lastUpdatedAfter

    • info

      added the non-success response with the status

    • warning

      added the new Agent id is required enum value to the / response property for the response status

    • warning

      added the new Agent with id {projectId} not found enum value to the / response property for the response status

    • info

      added the new optional query request parameter name

    • info

      added the new optional query request parameter orderBy

    • info

      added the new enum value me to the query request parameter userFilter

    • info

      removed the Project id is required enum value from the / response property for the response status

    • info

      removed the Project with id {projectId} not found enum value from the / response property for the response status