Skip to main content
POST
/
v2
/
patches
/
{id}
/
approve
Approve Patch
curl --request POST \
  --url https://app.textql.com/v2/patches/{id}/approve \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "expected_git_ref": "<string>"
}
'
{
  "merged": true,
  "approval_count": 123,
  "required_approvals": 123,
  "already_approved": true
}
You must have OWNERS write authority on every path the patch touches. Self-approval is rejected when a folder rule requires distinct approvers. The patch merges to the Context Library only once the required approvals are met; until then the response reports merged: false with the running approval_count / required_approvals.

Authorizations

Authorization
string
header
required

API key or JWT token

Path Parameters

id
string
required

Patch ID

Body

application/json
expected_git_ref
string
required

The patch git_ref the caller reviewed; a stale value returns 409.

Response

Approval recorded (and merged when the rule is satisfied)

merged
boolean
approval_count
integer<int32>
required_approvals
integer<int32>
already_approved
boolean