---
title: "List task messages."
method: GET
path: "/api/v1/projects/{projectId}/tasks/{taskId}/messages"
tags: ["Task Messages"]
---

# List task messages.

`GET /api/v1/projects/{projectId}/tasks/{taskId}/messages`

## Request

- Base URL: `https://app.customgpt.ai`
- URL: `https://app.customgpt.ai/api/v1/projects/{projectId}/tasks/{taskId}/messages`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/poll-the-people/apis/customgpt-ai/docs/api/v1/projects/:projectId/tasks/:taskId/messages/get.ts> (a function with typed inputs; its response is checked against the schema)

Returns all messages in a task, including user prompts, agent responses, timestamps, and citations. Use this to display task history or analyze past interactions. Results are paginated and ordered by most recent first.

## Path parameters

- `projectId` integer, required
- `taskId` string, required

## Query parameters

- `page` integer
- `order` 'asc' | 'desc'

## Response `200`

Paginated list of messages for the task.

- object
  - `status` 'error' | 'success': The status of the response
  - `messages` object
    - `current_page` integer: The page number of this response. The first page is 1.
    - `data` TaskMessage[]
      - `id` integer: The unique identifier of the prompt history.
      - `conversation_id` integer: The unique identifier of the conversation.
      - `user_id` integer: The unique identifier of the user.
      - `user_query` string: The user prompt query.
      - `openai_response` string: The OpenAI response to the user prompt query.
      - `citations` integer[]: The citations for the prompt history.
      - `citations_external` object[]: External (web/agentic) source citations referenced in the response. Empty when the response cited no external sources.
        - `source_id` string: Opaque per-type identifier of the external source.
        - `type` string: External source type (e.g. web, mcp, file, sharepoint).
        - `action` string, nullable: The agentic action that produced the citation.
        - `title` string: Title of the external source.
        - `url` string: Absolute http(s) URL of the external source.
        - `description` string: Short snippet/description of the external source.
      - `citations_hidden` integer[]: Page ids the response drew on that were hidden from the citations shown to the user, either by the agent-level sources setting or per page. Debugging aid, never rendered in the chat UI.
      - `tools` string[]: Array of tools invoked during response generation (e.g., web search, document retrieval). Returns an empty array if no tools were used.
      - `metadata` object: Additional metadata associated with this message, such as custom session attributes passed via the API. Returns null if no metadata was set.
        - `user_ip` string: The IP address of the user.
        - `user_agent` string: The user agent of the user.
        - `external_id` string: The external ID of the prompt history.
        - `request_source` string: The source of the request.
      - `response_feedback` object, nullable: User feedback submitted for this response. Includes the reaction rating and any text feedback. Returns null if the user has not provided feedback.
        - `created_at` string, date-time: The timestamp when the feedback was created
        - `updated_at` string, date-time: The timestamp when the feedback was last updated
        - `user_id` integer, nullable: The ID of the user who provided the feedback
        - `reaction` 'neutral' | 'disliked' | 'liked': User reaction to this response.
      - `customer_intelligence` CustomerIntelligence: Customer intelligence data captured for this conversation turn, populated when the lead capture feature is enabled. Contains contact information and intent signals. Returns null if lead capture is disabled.
        - `prompt_id` integer: Unique identifier for the prompt
        - `conversation_id` integer: Unique identifier for the conversation
        - `project_id` integer: Unique identifier for the project
        - `user_query` string: The user's original query
        - `ai_response` string: The AI's response to the query
        - `created_at` string: Timestamp when the interaction occurred
        - `content_source` string: Detected content source
        - `user_emotion` string: Detected user emotion
        - `user_intent` string: Detected user intent
        - `language` string: Detected language
        - `human_request` 'true' | 'false' | 'unclear': Whether the user requested a human
        - `user_id` integer: Sent-by user identifier. -2 indicates SSO Guest, -1 indicates Guest, and positive values indicate team member user IDs.
        - `feedback` string, nullable: User feedback on the response
        - `user_location` string: User's location (country code)
        - `chatbot_deployment` string: Chatbot deployment source
        - `risk_fidelity` string: Risk fidelity level
        - `risk_jailbreak` string: Jailbreak risk assessment
        - `risk_prompt_leakage` string: Prompt leakage risk assessment
        - `risk_profanity` string: Profanity risk assessment
        - `accuracy` string: Response accuracy assessment
        - `stakeholder_status` string: Stakeholder status classification
        - `browser` string: User's browser information
      - `created_at` string, date-time: The date and time the prompt history was created.
      - `updated_at` string, date-time: The date and time the prompt history was last updated.
      - `files` TaskFile[]: Files attached to this message. Includes user-uploaded sources (`upload`) and agent-generated artifacts (`artifact`). Empty array if no files.
        - `id` string: File ID. UUID for agent-generated artifacts; integer string for user uploads.
        - `type` 'artifact' | 'upload': File origin. `artifact` = generated by the agent. `upload` = uploaded by the user.
        - `filename` string: Original filename
        - `content_type` string, nullable: MIME type of the file
        - `file_size` integer, nullable: File size in bytes
        - `created_at` string, date-time, nullable: When the file was created
        - `expires_at` string, date-time, nullable: When the file expires and will no longer be downloadable. Null if no expiry.
        - `download_url` string, nullable: The download endpoint for an agent-generated artifact; call it with your API token and it redirects to a pre-signed S3 URL valid for 1 hour. Null for user uploads.
    - `first_page_url` string: The first page url
    - `from` integer: The first item number of the current page
    - `last_page` integer: Total number of pages available. Pagination is complete when the requested `page` equals `last_page`.
    - `last_page_url` string: The last page url
    - `next_page_url` string: The next page url
    - `path` string: The current page url
    - `per_page` integer: Number of results returned per page.
    - `prev_page_url` string: The previous page url
    - `to` integer: The last item number of the current page
    - `total` integer: The total number of items

## Other responses

- `400`: Bad Argument
- `401`: API Token is either missing or invalid
- `404`: Agent not found
- `429`: Too many requests. You have exceeded your API rate limit.
- `500`: Internal Server Error

## Changes

- **2026-11-03** `77aab4354382`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/poll-the-people/apis/customgpt-ai/changes/api/v1/projects/:projectId/tasks/:taskId/messages/get.md)

---

[API](https://skmtc.dev/poll-the-people/apis/customgpt-ai.md) - [All operations](https://skmtc.dev/poll-the-people/apis/customgpt-ai/llms.txt) - [OpenAPI document](https://skmtc.dev/poll-the-people/apis/customgpt-ai/revisions/77aab4354382?raw)
