---
title: "Get AI agent thread pull request"
method: GET
path: "/api/v1/projects/{projectUuid}/aiAgents/{agentUuid}/threads/{threadUuid}/pull-request"
---

# Get AI agent thread pull request

`GET /api/v1/projects/{projectUuid}/aiAgents/{agentUuid}/threads/{threadUuid}/pull-request`

Get the writeback pull request associated with a thread — the PR the
agent opened in this thread, or the PR a verification thread verifies.

## Path parameters

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

## Response `200`

Success

- ApiAiAgentThreadPullRequestResponse
  - `results` AiAgentThreadPullRequest, required — Overview of the writeback PR a thread is associated with — either the PR the agent opened in this thread, or the PR a remediation verification thread is verifying. Live GitHub fields (state, counts) are null when the fetch fails; `summary` falls back to the PR title when no stored summary exists.
    - `commitSha` string, nullable, required
    - `changedFiles` number, double, nullable, required
    - `deletions` number, double, nullable, required
    - `additions` number, double, nullable, required
    - `state` 'open' | 'merged' | 'closed' | 'null', nullable, required
    - `summary` string, nullable, required
    - `title` string, nullable, required
    - `prNumber` number, double, nullable, required
    - `repo` string, nullable, required
    - `prUrl` string, required
  - `status` 'ok', required

## Other responses

- `default` — Error

---

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