Ga naar inhoud

Prudai Developer API: goedkeuringen

Read all approval requests in the organisation. Own requests remain accessible with account:organizations:read.

Basis-URL https://api.prudai.com/v1. Inloggen staat in Inloggen, scopes in Scopes en rechten, fouten in Fouten. Overzicht.

MethodePadWat het doetStand
GET/v1/approvalsList approval requestsOp productie
GET/v1/approvals/{id}Read an approval requestOp productie

List approval requests

GET /v1/approvals

  • Stand: op productie.
  • Scope: geen voor je eigen gegevens, account:approvals:read voor die van de hele organisatie; inloggen met je sleutel of token is nodig.
  • Goedkeuring: none, geen extra stap.

Parameters

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

Antwoorden

StatusBetekenis
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).

Velden in data (200)

  • approvals array<ApprovalRequest>
  • approvals[].id string
    patroon ^apr_[A-Za-z0-9]{24}$
  • approvals[].level string
    Een van: 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
    patroon ^[a-f0-9]{64}$
  • approvals[].status string
    Een van: 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
    kan null zijn
curl
curl -s "https://api.prudai.com/v1/approvals" \
-H "Authorization: Bearer $PRUDAI_TOKEN"
CLI (binnenkort)
prudai leo approvals list
Antwoord 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}

  • Stand: op productie.
  • Scope: geen voor je eigen gegevens, account:approvals:read voor die van de hele organisatie; inloggen met je sleutel of token is nodig.
  • Goedkeuring: none, geen extra stap.

Parameters

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

Antwoorden

StatusBetekenis
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).

Velden in data (200)

  • approvalRequest ApprovalRequest
  • approvalRequest.id string
    patroon ^apr_[A-Za-z0-9]{24}$
  • approvalRequest.level string
    Een van: 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
    patroon ^[a-f0-9]{64}$
  • approvalRequest.status string
    Een van: 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 (binnenkort)
prudai leo approvals get
Antwoord 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"
}
}