v1

latestOpenAPI 3.0.22026-07-174617345.8 KB
Conversations

List all conversations for an agent (formerly known as project).

Retrieve all conversations associated with an agent based on its unique projectId. This endpoint allows you to fetch a collection of conversations related to a specific agent.

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

Path parameters

projectIdinteger required
Example:1

The ID of the agent to get the conversations for

Query parameters

pageinteger

Page number to return

order'asc' | 'desc'
Example:desc

The order to sort the results in given direction

orderBy'id' | 'created_at'
Example:id

The orderBy to sort the results by given field

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

Filter the results by the user that created the conversation

namestring
Example:Ask me anything

Filter the results by conversation name

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
  }
}