Skip to main content
GET
/
v2
/
patches
List Patches
curl --request GET \
  --url https://app.textql.com/v2/patches \
  --header 'Authorization: Bearer <token>'
{
  "patches": [
    {
      "id": "<string>",
      "number": 123,
      "author_id": "<string>",
      "author_email": "<string>",
      "author_name": "<string>",
      "title": "<string>",
      "description": "<string>",
      "git_ref": "<string>",
      "revision": 123,
      "ai_generated": true,
      "chat_id": "<string>",
      "approval_count": 123,
      "required_approvals": 123,
      "created_at": "2023-11-07T05:31:56Z",
      "updated_at": "2023-11-07T05:31:56Z",
      "diffs": [
        {
          "name": "<string>",
          "old_path": "<string>",
          "new_path": "<string>",
          "additions": 123,
          "deletions": 123,
          "is_new": true,
          "is_delete": true,
          "is_rename": true,
          "is_binary": true
        }
      ],
      "capabilities": {
        "can_approve": true,
        "can_deny": true,
        "can_restore": true,
        "caller_approved": true
      }
    }
  ],
  "next_page_token": "<string>",
  "counts": {}
}
Results are scoped to your OWNERS permissions — patches touching only paths you cannot read are omitted. Filter with one or more status query params (reserved, draft, open, approved, denied). Each actionable patch carries a capabilities object (can_approve / can_deny / can_restore) so you only attempt actions you are allowed to take — identical to the in-product review UI.

Authorizations

Authorization
string
header
required

API key or JWT token

Query Parameters

status
enum<string>[]

Filter by patch status. Repeatable.

Available options:
reserved,
draft,
open,
approved,
denied
page_size
integer<int32>
page_token
string
include_auto_approved
boolean

Response

A page of patches

patches
object[]
next_page_token
string
counts
object