Conversations

Get conversation messages.

Changed on

Returns all messages in a conversation, including user prompts, agent responses, timestamps, and citations. Use this to display conversation history or analyze past interactions.

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

Request

Path parameters

projectIdinteger required
Example:1

The ID of the agent to get the messages for

sessionIdstring required
Example:1

The session ID of the converstaions to get the messages for

Query parameters

pageinteger

Page number to return

order'asc' | 'desc'
Example:desc

Sort direction for messages.

includeInsightsboolean
Example:true

When true, includes customer_intelligence data in the response.

Response

List all messages in a conversation

status'error' | 'success'

The status of the response

Example response

{
  "status": "success",
  "data": {
    "conversation": {
      "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"
    },
    "messages": {
      "current_page": 1,
      "data": [
        {
          "id": 101,
          "conversation_id": 42,
          "user_id": 1,
          "user_query": "What file formats does CustomGPT support?",
          "openai_response": "CustomGPT supports PDF, DOCX, TXT, and more. You can also ingest content via sitemap, URL, or file upload.",
          "citations": [
            3,
            7
          ],
          "citations_external": [
            {
              "source_id": "1-1",
              "type": "web",
              "action": "web_search",
              "title": "Paris - Wikipedia",
              "url": "https://en.wikipedia.org/wiki/Paris",
              "description": "Paris is the capital of France."
            }
          ],
          "citations_hidden": [
            12
          ],
          "tools": [],
          "metadata": {
            "user_ip": "203.0.113.12",
            "user_agent": "Mozilla/5.0",
            "external_id": "ext_id_abc123",
            "request_source": "web"
          },
          "response_feedback": {
            "created_at": "2024-08-27T21:07:20.000000Z",
            "updated_at": "2024-08-27T21:07:20.000000Z",
            "user_id": 1,
            "reaction": "liked"
          },
          "customer_intelligence": {
            "prompt_id": 101,
            "conversation_id": 42,
            "project_id": 7,
            "user_query": "What file formats does CustomGPT support?",
            "ai_response": "CustomGPT supports PDF, DOCX, TXT, and more.",
            "created_at": "2026-02-01T09:20:00.000000Z",
            "content_source": "in-context",
            "user_emotion": "neutral",
            "user_intent": "informational",
            "language": "en",
            "human_request": "false",
            "user_id": -2,
            "user_location": "US",
            "chatbot_deployment": "web",
            "risk_fidelity": "Good",
            "risk_jailbreak": "no_event",
            "risk_prompt_leakage": "no_event",
            "risk_profanity": "no_event",
            "accuracy": "-",
            "stakeholder_status": "UNKNOWN",
            "browser": "Chrome 121"
          },
          "created_at": "2026-02-01T09:20:00.000000Z",
          "updated_at": "2026-02-01T09:20:05.000000Z"
        }
      ],
      "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

    • breaking

      the response property //// became nullable for the 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

    • warning

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

    • warning

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

    • warning

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

    • warning

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

    • info

      added the new optional query request parameter includeInsights

    • info

      added the non-success response with the status

    • info

      added the optional property //// to the response with the status

    • info

      added the optional property //// to the response with the status

    • info

      added the optional property //// to the response with the status

    • info

      added the optional property //// to the response with the status

    • info

      removed the neutral disliked liked enum value from the ///// response property for the response 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 optional property ///// to the response with the status

    • info

      added the optional property ///// to the response with the status

    • info

      added the optional property //// to the response with the status

    • 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