Skip to content

Prudai Developer API: approvals

The operations of this part (Approvals).

Base URL https://api.prudai.com/v1. Logging in is in Login, scopes in Scopes and permissions, errors in Errors. Overview.

MethodPathWhat it doesState
GET/v1/approvalsList approval requestsIn production
GET/v1/approvals/{id}Read an approval requestIn production

List approval requests

GET /v1/approvals

  • State: in production.
  • Scope: none for your own data, account:approvals:read for the whole organisation’s; logging in with your key or token is required.
  • Approval: none, no extra step.

Parameters

  • organization_wide query · boolean
    Default false: only your requests. true requires account:approvals:read. default: false
  • status query · string
    One of: pending, approved, rejected, expired, used
  • limit query · integer
    default: 20 · min 1 · max 100
  • cursor query · string
    pattern ^apr_[A-Za-z0-9]{24}$

Responses

StatusMeaning
200A page of approval requests, ordered by id descending. Follow next_cursor.
401Missing, malformed, unknown, expired or revoked key, or a key used against the wrong environment.
403Authenticated, but not allowed (missing scope, product not on the key or organisation, organisation suspended, Developer API switched off for the organisation, IP not on the allowlist, depth not permitted, licence does not permit redistribution).
404Unknown model, source or document.
422Well-formed request with invalid values (for example an unknown reasoning_effort, empty messages, or an Idempotency-Key reused with a different body).
429Rate limit, concurrency limit, Ultra daily quota or fair-use limit of the free sources operations exceeded.
500Unexpected error on Prudai’s side. Not charged, except work that completed before the failure (reported in details.charged_credits).

Fields in data (200)

  • approvals array<ApprovalRequest>
  • approvals[].id string
    pattern ^apr_[A-Za-z0-9]{24}$
  • approvals[].level string
    One of: confirm, review
  • approvals[].operation string
  • approvals[].summary string
    Human-readable summary of a proposed chat action, when available.
  • approvals[].method string
  • approvals[].path string
    Resolved path relative to /v1.
  • approvals[].args_hash string
    pattern ^[a-f0-9]{64}$
  • approvals[].status string
    One of: pending, approved, rejected, expired, used
  • approvals[].created_at string (date-time)
  • approvals[].expires_at string (date-time)
  • approvals[].approval_url string (uri)
  • next_cursor string
    may be null
curl
curl -s "https://api.prudai.com/v1/approvals" \
-H "Authorization: Bearer $PRUDAI_TOKEN"
CLI (coming soon)
prudai leo approvals list
Response 200
{
"approvals": [
{
"id": "string",
"level": "confirm",
"operation": "string",
"summary": "string",
"method": "string",
"path": "string",
"args_hash": "string",
"status": "pending",
"created_at": "2026-11-05T09:30:00.000Z",
"expires_at": "2026-11-05T09:30:00.000Z",
"approval_url": "https://voorbeeld.nl"
}
],
"next_cursor": "string"
}

Read an approval request

GET /v1/approvals/{id}

  • State: in production.
  • Scope: none for your own data, account:approvals:read for the whole organisation’s; logging in with your key or token is required.
  • Approval: none, no extra step.

Parameters

  • id path · string required
    pattern ^apr_[A-Za-z0-9]{24}$
  • organization_wide query · boolean
    Default false: only your requests. true requires account:approvals:read. default: false

Responses

StatusMeaning
200Approval request metadata.
401Missing, malformed, unknown, expired or revoked key, or a key used against the wrong environment.
403Authenticated, but not allowed (missing scope, product not on the key or organisation, organisation suspended, Developer API switched off for the organisation, IP not on the allowlist, depth not permitted, licence does not permit redistribution).
404Unknown model, source or document.
422Well-formed request with invalid values (for example an unknown reasoning_effort, empty messages, or an Idempotency-Key reused with a different body).
429Rate limit, concurrency limit, Ultra daily quota or fair-use limit of the free sources operations exceeded.
500Unexpected error on Prudai’s side. Not charged, except work that completed before the failure (reported in details.charged_credits).

Fields in data (200)

  • approvalRequest ApprovalRequest
  • approvalRequest.id string
    pattern ^apr_[A-Za-z0-9]{24}$
  • approvalRequest.level string
    One of: confirm, review
  • approvalRequest.operation string
  • approvalRequest.summary string
    Human-readable summary of a proposed chat action, when available.
  • approvalRequest.method string
  • approvalRequest.path string
    Resolved path relative to /v1.
  • approvalRequest.args_hash string
    pattern ^[a-f0-9]{64}$
  • approvalRequest.status string
    One of: pending, approved, rejected, expired, used
  • approvalRequest.created_at string (date-time)
  • approvalRequest.expires_at string (date-time)
  • approvalRequest.approval_url string (uri)
curl
curl -s "https://api.prudai.com/v1/approvals/<id>" \
-H "Authorization: Bearer $PRUDAI_TOKEN"
CLI (coming soon)
prudai leo approvals get
Response 200
{
"approvalRequest": {
"id": "string",
"level": "confirm",
"operation": "string",
"summary": "string",
"method": "string",
"path": "string",
"args_hash": "string",
"status": "pending",
"created_at": "2026-11-05T09:30:00.000Z",
"expires_at": "2026-11-05T09:30:00.000Z",
"approval_url": "https://voorbeeld.nl"
}
}