PgBeam Docs
Approvals

Approve a held statement

POST
/v1/projects/{project_id}/approvals/{approval_id}/approve

Approves a pending approval request, releasing the held statement.

Authorization

AuthorizationBearer <token>

JWT issued by Better Auth. Verified via JWKS.

In: header

Path Parameters

project_id*string

Unique project identifier (prefixed, e.g. prj_xxx).

approval_id*string

Unique approval request identifier (prefixed, e.g. apr_xxx).

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Optional note attached to an approve/reject decision.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/v1/projects/string/approvals/string/approve" \  -H "Content-Type: application/json" \  -d '{}'
{  "id": "apr_01h455vb4pex5vsknk084sn02q",  "project_id": "string",  "credential_id": "string",  "policy_profile_id": "string",  "region": "string",  "session_id": "string",  "sql": "string",  "normalized_sql": "string",  "statement_kind": "string",  "status": "pending",  "reason": "string",  "requested_at": "2019-08-24T14:15:22Z",  "decided_at": "2019-08-24T14:15:22Z",  "decided_by": "string",  "expires_at": "2019-08-24T14:15:22Z"}
{  "error": {    "code": "string",    "message": "string"  }}
{  "error": {    "code": "string",    "message": "string"  }}
{  "error": {    "code": "string",    "message": "string"  }}
{  "error": {    "code": "string",    "message": "string"  }}
{  "error": {    "code": "string",    "message": "string"  }}