Skip to main content
GET
/
v2
/
patches
/
{id}
Get Patch
curl --request GET \
  --url https://app.textql.com/v2/patches/{id} \
  --header 'Authorization: Bearer <token>'
{
  "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
  }
}
The git_ref returned here is required as expected_git_ref when approving, denying, or restoring — it makes review optimistic-concurrency safe: if the patch changed since you read it, the action returns 409 instead of acting on a stale view. An unknown or foreign-org id returns 404.

Authorizations

Authorization
string
header
required

API key or JWT token

Path Parameters

id
string
required

Patch ID

Query Parameters

revision
integer<int32>

Fetch a historical revision (1-based); defaults to latest.

Response

The patch

A reviewable Context Library patch.

id
string
number
integer<int32>
author_id
string
author_email
string
author_name
string
title
string
description
string
status
enum<string>
Available options:
reserved,
draft,
open,
approved,
denied
git_ref
string

Echo this as expected_git_ref when approving/denying/restoring.

revision
integer<int32>
ai_generated
boolean
chat_id
string
approval_count
integer<int32>
required_approvals
integer<int32>
created_at
string<date-time>
updated_at
string<date-time>
diffs
object[]
capabilities
object

Actions the calling member may take on a patch.