---
title: "POST /api/v1/projects/{projectUuid}/aiAgents/{agentUuid}/threads/{threadUuid}/messages"
method: POST
path: "/api/v1/projects/{projectUuid}/aiAgents/{agentUuid}/threads/{threadUuid}/messages"
---

# POST /api/v1/projects/{projectUuid}/aiAgents/{agentUuid}/threads/{threadUuid}/messages

`POST /api/v1/projects/{projectUuid}/aiAgents/{agentUuid}/threads/{threadUuid}/messages`

## Path parameters

- `projectUuid` string, required
- `agentUuid` string, required
- `threadUuid` string, required

## Request body

- ApiAiAgentThreadMessageCreateRequest
  - `hidden` boolean — Inject the prompt as a hidden turn — the agent responds to it, but the UI does not render the user bubble. Used by the post-merge content-migration prompt sent from the writeback PR card.
  - `modelConfig` AiAgentModelConfig
    - `reasoning` boolean
    - `modelProvider` string, required
    - `modelName` string, required
  - `context` AiPromptContextItemInput[]
    - union
      - object
        - `runtimeOverrides` AiChartRuntimeOverrides — Runtime state captured at pin time for a chart context. When a user pins a chart from a dashboard view, these are the dashboard-level overrides that were applied to the chart on screen at that moment.
          - `dateZoom` DateZoom
            - `xAxisFieldId` string
            - `granularity` union
              - …
          - `dashboardParameters` ParametersValuesMap — Construct a type with a set of properties K of type T
          - `dashboardFilters` DashboardFilters
            - `tableCalculations` DashboardFilterRule[], required
              - …
            - `metrics` DashboardFilterRule[], required
              - …
            - `dimensions` DashboardFilterRule[], required
              - …
        - `chartSlug` string, nullable
        - `chartUuid` string, required
        - `type` 'chart', required
      - object
        - `runtimeOverrides` AiDashboardRuntimeOverrides
          - `dateZoom` DateZoom
            - `xAxisFieldId` string
            - `granularity` union
              - …
          - `dashboardParameters` ParametersValuesMap — Construct a type with a set of properties K of type T
          - `dashboardFilters` AiDashboardFilters
            - `tableCalculations` AiDashboardFilterRule[], required
              - …
            - `metrics` AiDashboardFilterRule[], required
              - …
            - `dimensions` AiDashboardFilterRule[], required
              - …
          - `activeTab` AiDashboardActiveTab
            - `name` string, required
            - `uuid` string, required
        - `dashboardSlug` string, nullable
        - `dashboardUuid` string, required
        - `type` 'dashboard', required
      - object
        - `promptUuid` string, nullable
        - `threadUuid` string, required
        - `type` 'thread', required
      - object
        - `path` string, required
        - `type` 'file', required
      - object
        - `fullName` string, required
        - `type` 'repository', required
      - object
        - `prUrl` string, required
        - `type` 'pull_request', required
      - object
        - `fingerprint` string, required
        - `type` 'proposed_change', required
      - object
        - `fingerprint` string, required
        - `type` 'review_finding', required
      - object
        - `previewProjectUuid` string, required
        - `type` 'preview_environment', required
  - `prompt` string, required

## Response `200`

Success

- ApiAiAgentThreadMessageCreateResponse
  - `results` AiAgentMessageUserAiAgentUser, required
    - `hidden` boolean, required — Hidden turn: the agent received and responded to this prompt, but the UI should not render its user bubble (e.g. the post-merge migration prompt injected from the writeback PR card).
    - `steers` AiPromptSteer[], required
      - `consumedStep` number, double, nullable, required
      - `consumedAt` string, nullable, required
      - `createdAt` string, required
      - `message` string, required
      - `promptUuid` string, required
      - `uuid` string, required
    - `context` AiPromptContextItem[], required
      - union
        - object
          - `chartKind` 'line' | 'horizontal_bar' | 'vertical_bar' | 'scatter' | 'area' | 'mixed' | 'pie' | 'table' | 'big_number' | 'funnel' | 'custom' | 'treemap' | 'gauge' | 'map' | 'sankey' | 'data_app_viz', required
          - `runtimeOverrides` AiChartRuntimeOverrides, required — Runtime state captured at pin time for a chart context. When a user pins a chart from a dashboard view, these are the dashboard-level overrides that were applied to the chart on screen at that moment.
            - `dateZoom` DateZoom
              - …
            - `dashboardParameters` ParametersValuesMap — Construct a type with a set of properties K of type T
            - `dashboardFilters` DashboardFilters
              - …
          - `displayName` string, nullable, required
          - `pinnedVersionUuid` string, nullable, required
          - `chartSlug` string, nullable, required
          - `chartUuid` string, required
          - `type` 'chart', required
        - object
          - `runtimeOverrides` AiDashboardRuntimeOverrides, required
            - `dateZoom` DateZoom
              - …
            - `dashboardParameters` ParametersValuesMap — Construct a type with a set of properties K of type T
            - `dashboardFilters` AiDashboardFilters
              - …
            - `activeTab` AiDashboardActiveTab
              - …
          - `displayName` string, nullable, required
          - `pinnedVersionUuid` string, nullable, required
          - `dashboardSlug` string, nullable, required
          - `dashboardUuid` string, required
          - `type` 'dashboard', required
        - object
          - `displayName` string, nullable, required
          - `promptUuid` string, nullable, required
          - `threadUuid` string, required
          - `type` 'thread', required
        - object
          - `path` string, required
          - `type` 'file', required
        - object
          - `fullName` string, required
          - `type` 'repository', required
        - object
          - `title` string, nullable, required
          - `status` 'open' | 'merged' | 'closed', required
          - `provider` 'github' | 'gitlab', required
          - `prNumber` number, double, nullable, required
          - `prUrl` string, required
          - `type` 'pull_request', required
        - object
          - `payload` union, required
            - object
              - …
            - object
              - …
          - `fingerprint` string, required
          - `type` 'proposed_change', required
        - object
          - `evidenceExcerpts` AiAgentEvidenceExcerpt[], required
            - `redacted` boolean, required
            - `text` string, required
            - `source` 'user_prompt' | 'assistant_answer' | 'next_user_prompt' | 'conversation_context' | 'tool_call' | 'tool_result' | 'agent_config', required
          - `findingCount` number, double, required
          - `rootCause` 'semantic_layer' | 'project_context' | 'agent_configuration' | 'product_capability' | 'runtime_reliability' | 'feedback_quality' | 'not_a_failure' | 'ambiguous', required
          - `title` string, required
          - `fingerprint` string, required
          - `type` 'review_finding', required
        - object
          - `projectName` string, nullable, required
          - `status` 'queued' | 'running' | 'pr_open' | 'preview_ready' | 'resolved' | 'failed', required
          - `previewThreadUuid` string, nullable, required
          - `previewProjectUuid` string, required
          - `type` 'preview_environment', required
    - `user` AiAgentUser, required
      - `name` string, required
      - `uuid` string, required
    - `createdAt` string, required
    - `message` string, required
    - `threadUuid` string, required
    - `uuid` string, required
    - `role` 'user', required
  - `status` 'ok', required

## Other responses

- `default` — Error

---

[API](https://skmtc.net/lightdash/apis/lightdash-api.md) · [All operations](https://skmtc.net/lightdash/apis/lightdash-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/lightdash/lightdash-api/versions/40c933755c9a/schema)
