Polivor

API reference

Per-action authority for AI agents acting on delegated financial authority. Version 0.1.0. The source is the OpenAPI 3.1 file.

Authentication

Send an API key as Authorization: Bearer <key>. Key format pv_test_ in the sandbox and pv_live_ in production; a key of the other kind is refused with 401; roles admin, agent, enforcer. Each operation lists the roles that may call it. The key set is public only for GET /.well-known/jwks.json.

Base URLs

  • https://api.polivor.com
  • https://api.staging.polivor.com

Operations

mcp

POST /mcp

Model Context Protocol server with the tools authorize and get_decision (role agent)

Roles: agent. Operation id mcpMessage.

MCP over Streamable HTTP, answered as plain JSON (no event stream, no sessions): one JSON-RPC 2.0 message per POST. Supported methods: initialize, ping, tools/list and tools/call; notifications get 202. Protocol versions 2025-06-18, 2025-03-26 and 2024-11-05. The tool authorize takes the fields of AuthorizeRequest plus a required idempotency_key; get_decision takes decision_id. A tool result carries the same JSON as the REST response (as structuredContent and as text); a business error is a tool result with isError: true holding a problem details object. Same API keys, roles and rate limits as /v1. Requests with an Origin header are refused (MCP clients are programs, not web pages). GET is not supported (405).

NameInRequiredTypeDescription
MCP-Protocol-Versionheaderno2025-06-18, 2025-03-26, 2024-11-05Sent by clients after initialize

Request body (JSON, required): JsonRpcMessage

StatusMeaningBody
200A JSON-RPC response (a result, or an error object)JsonRpcMessage
202A notification was received (no response body)
400Problem details with a stable code
401Problem details with a stable code
403Problem details with a stable code
429Problem details with a stable code

authorize

POST /v1/authorize

Request authority for one action (role agent)

Roles: agent. Operation id authorize.

400 IDEMPOTENCY_KEY_REQUIRED when the header is missing. 409 IDEMPOTENCY_KEY_REUSED when the key was used with a different body (or by another agent), and IDEMPOTENCY_KEY_EXPIRED once the 24 h retention is over. A replay returns the stored response unchanged. REQUIRE_APPROVAL reserves no budget; budget is reserved when the approval is granted. The answer never says why: no reasons, no checks, no policy version. When nothing is allowed it carries a coarse denial with a code from a closed list, a fixed sentence and retryable. A person sees the full explanation through the admin key, the console or the evidence.

NameInRequiredTypeDescription
no

Request body (JSON, required): AuthorizeRequest

StatusMeaningBody
200ALLOW (with authorization) or DENYAuthorizeResponse
202REQUIRE_APPROVAL, decision is pendingAuthorizeResponse
400Problem details with a stable code
401Problem details with a stable code
403Problem details with a stable code
409Problem details with a stable code
422Problem details with a stable code
429Problem details with a stable code

POST /v1/simulate

Dry run of the same decision as authorize. No writes, no budget reserved, no authorization, no evidence (role admin)

Roles: admin. Operation id simulate.

Request body (JSON, required): SimulateRequest

StatusMeaningBody
200Simulated decisionSimulateResponse
400Problem details with a stable code
401Problem details with a stable code
403Problem details with a stable code
404Problem details with a stable code
422Problem details with a stable code

GET /v1/decisions/{id}

Decision status; authorization once approved (roles agent, admin)

Roles: agent, admin. Operation id getDecision.

NameInRequiredTypeDescription
no
StatusMeaningBody
200DecisionDecisionStatus
401Problem details with a stable code
403Problem details with a stable code
404Problem details with a stable code

authorization

POST /v1/authorizations/{id}/execution

Enforcement point reports a terminal execution result (role enforcer)

Roles: enforcer. Operation id reportExecution.

One terminal report per authorization. 409 ALREADY_REPORTED for a second one, 410 REPORT_WINDOW_CLOSED more than 24 h after the authorization expired. REJECTED and FAILED release the reserved budget; EXECUTED keeps it consumed.

NameInRequiredTypeDescription
no

Request body (JSON, required): ExecutionReport

StatusMeaningBody
200RecordedAuthorizationStatus
401Problem details with a stable code
403Problem details with a stable code
404Problem details with a stable code
409Problem details with a stable code
410Problem details with a stable code

POST /v1/authorizations/{id}/not-executed

Release an unreported authorization and its reserved budget (role admin)

Roles: admin. Operation id markNotExecuted.

Only after the authorization has expired (409 AUTHORIZATION_STILL_VALID before), because until then the enforcement point could still use it.

NameInRequiredTypeDescription
no
StatusMeaningBody
200ReleasedAuthorizationStatus
401Problem details with a stable code
403Problem details with a stable code
404Problem details with a stable code
409Problem details with a stable code

identity

POST /v1/principals

Roles: admin. Operation id createPrincipal.

Request body (JSON, required): PrincipalCreate

StatusMeaningBody
201CreatedPrincipal
400Problem details with a stable code
401Problem details with a stable code
403Problem details with a stable code
422Problem details with a stable code

GET /v1/persons

The person directory (owners and approvers); the only place with names and emails

Roles: admin. Operation id listPersons.

StatusMeaningBody
200Peoplearray of Person
401Problem details with a stable code
403Problem details with a stable code

POST /v1/persons

Roles: admin. Operation id createPerson.

Request body (JSON, required): PersonCreate

StatusMeaningBody
201CreatedPerson
400Problem details with a stable code
401Problem details with a stable code
403Problem details with a stable code
422Problem details with a stable code

GET /v1/persons/{id}

Roles: admin. Operation id getPerson.

NameInRequiredTypeDescription
no
StatusMeaningBody
200The personPerson
401Problem details with a stable code
403Problem details with a stable code
404Problem details with a stable code

POST /v1/persons/{id}/erase

Empties name, title, email and the approval comments of this person. Evidence is not touched and still verifies; it shows "identity erased". Idempotent.

Roles: admin. Operation id erasePerson.

NameInRequiredTypeDescription
no
StatusMeaningBody
200ErasedPerson
401Problem details with a stable code
403Problem details with a stable code
404Problem details with a stable code

GET /v1/users

People who can sign in to the console, with their role and status

Roles: admin. Operation id listUsers.

StatusMeaningBody
200Usersarray of User
401Problem details with a stable code
403Problem details with a stable code

POST /v1/users

Invites a person of the directory as a user. The invitation becomes an active user on the first sign-in.

Roles: admin. Operation id inviteUser.

Request body (JSON, required): UserInvite

StatusMeaningBody
201InvitedUser
400Problem details with a stable code
401Problem details with a stable code
403Problem details with a stable code
409Problem details with a stable code
422Problem details with a stable code

GET /v1/users/{id}

Roles: admin. Operation id getUser.

NameInRequiredTypeDescription
no
StatusMeaningBody
200The userUser
401Problem details with a stable code
403Problem details with a stable code
404Problem details with a stable code

GET /v1/identity-providers

Roles: admin. Operation id listIdentityProviders.

StatusMeaningBody
200The tenant's identity providersarray of IdentityProvider
401Problem details with a stable code
403Problem details with a stable code

POST /v1/identity-providers

Registers the customer's identity provider for a production tenant, OpenID Connect or SAML 2.0. For OpenID Connect the issuer's discovery document is fetched and checked and the client secret is sealed and never shown again. For SAML the metadata (pasted or fetched from a URL) is checked and the response lists what to enter at the provider. Each domain must be verified with a DNS TXT record before it routes sign-ins.

Roles: admin. Operation id createIdentityProvider.

Request body (JSON, required): IdentityProviderCreate

StatusMeaningBody
201RegisteredIdentityProvider
400Problem details with a stable code
401Problem details with a stable code
403Problem details with a stable code
409Problem details with a stable code
422Problem details with a stable code

GET /v1/identity-providers/{id}

Roles: admin. Operation id getIdentityProvider.

NameInRequiredTypeDescription
no
StatusMeaningBody
200The identity providerIdentityProvider
401Problem details with a stable code
403Problem details with a stable code
404Problem details with a stable code

POST /v1/identity-providers/{id}/client-secret

OpenID Connect only. Replaces the client secret of the provider in place, for example before it expires; people, domains and sessions are unchanged. One evidence row, without the secret.

Roles: admin. Operation id replaceIdentityProviderClientSecret.

NameInRequiredTypeDescription
no

Request body (JSON, required): object

StatusMeaningBody
200ReplacedIdentityProvider
401Problem details with a stable code
403Problem details with a stable code
404Problem details with a stable code
409Problem details with a stable code
422Problem details with a stable code

POST /v1/identity-providers/{id}/saml-metadata

SAML only. Replaces the provider's metadata in place, for example with a new signing certificate. The entity id must stay the same; a different one is a new provider. One evidence row.

Roles: admin. Operation id refreshIdentityProviderSamlMetadata.

NameInRequiredTypeDescription
no

Request body (JSON, required): object

StatusMeaningBody
200RefreshedIdentityProvider
401Problem details with a stable code
403Problem details with a stable code
404Problem details with a stable code
409Problem details with a stable code
422Problem details with a stable code

POST /v1/identity-providers/{id}/disable

Stops sign-ins through this provider. Its domains go to another active provider that lists them. Console sessions of its issuer end unless another active provider has the same issuer. Idempotent; one evidence row.

Roles: admin. Operation id disableIdentityProvider.

NameInRequiredTypeDescription
no
StatusMeaningBody
200DisabledIdentityProvider
401Problem details with a stable code
403Problem details with a stable code
404Problem details with a stable code

POST /v1/identity-providers/{id}/domains/{domain}/verify

Looks for the TXT record of the domain. A verified domain routes its email addresses to this provider; a domain is verified for one tenant only.

Roles: admin. Operation id verifyIdentityProviderDomain.

NameInRequiredTypeDescription
no
domainpathyesstring (minLength 1)
StatusMeaningBody
200The identity provider with the domain's stateIdentityProvider
401Problem details with a stable code
403Problem details with a stable code
404Problem details with a stable code
409Problem details with a stable code

POST /v1/users/{id}/role

Takes effect on the user's next request; one evidence row. The last active admin cannot be demoted (409 LAST_ADMIN_USER).

Roles: admin. Operation id changeUserRole.

NameInRequiredTypeDescription
no

Request body (JSON, required): UserRole

StatusMeaningBody
200ChangedUser
400Problem details with a stable code
401Problem details with a stable code
403Problem details with a stable code
404Problem details with a stable code
409Problem details with a stable code
422Problem details with a stable code

POST /v1/users/{id}/deactivate

Ends every session at once and suspends the agents the person owns (reason owner lost). Idempotent. The last active admin cannot be deactivated (409 LAST_ADMIN_USER).

Roles: admin. Operation id deactivateUser.

NameInRequiredTypeDescription
no
StatusMeaningBody
200DeactivatedUser
401Problem details with a stable code
403Problem details with a stable code
404Problem details with a stable code
409Problem details with a stable code

POST /v1/users/{id}/sessions/revoke

Ends every open console session of the user without deactivating them.

Roles: admin. Operation id revokeUserSessions.

NameInRequiredTypeDescription
no
StatusMeaningBody
200How many sessions were openobject
401Problem details with a stable code
403Problem details with a stable code
404Problem details with a stable code

GET /v1/agents

Roles: admin. Operation id listAgents.

StatusMeaningBody
200Agentsarray of Agent
401Problem details with a stable code
403Problem details with a stable code

POST /v1/agents

Roles: admin. Operation id createAgent.

Request body (JSON, required): AgentCreate

StatusMeaningBody
201CreatedAgent
400Problem details with a stable code
401Problem details with a stable code
403Problem details with a stable code
422Problem details with a stable code

POST /v1/agents/{id}/owner

Hands the agent to another person of the directory. One evidence row; a suspension is not lifted by it.

Roles: admin. Operation id changeAgentOwner.

NameInRequiredTypeDescription
no

Request body (JSON, required): object

StatusMeaningBody
200The agent with its new ownerAgent
400Problem details with a stable code
401Problem details with a stable code
403Problem details with a stable code
404Problem details with a stable code
422Problem details with a stable code

POST /v1/agents/{id}/suspend

Instant and idempotent; never changes the mandate

Roles: admin. Operation id suspendAgent.

NameInRequiredTypeDescription
no
StatusMeaningBody
200SuspendedAgent
401Problem details with a stable code
403Problem details with a stable code
404Problem details with a stable code

POST /v1/agents/{id}/lift

Lifts a suspension; the same mandate version applies again

Roles: admin. Operation id liftAgentSuspension.

NameInRequiredTypeDescription
no
StatusMeaningBody
200Active againAgent
401Problem details with a stable code
403Problem details with a stable code
404Problem details with a stable code
409Problem details with a stable code

mandate

GET /v1/mandates

Roles: admin. Operation id listMandates.

StatusMeaningBody
200Mandatesarray of Mandate
401Problem details with a stable code
403Problem details with a stable code

POST /v1/mandates

Create a native Financial Mandate (validated against financial-mandate/v0)

Roles: admin. Operation id createMandate.

Request body (JSON, required): MandateBody

StatusMeaningBody
201Created as DRAFT, version 1Mandate
400Problem details with a stable code
401Problem details with a stable code
403Problem details with a stable code
422Problem details with a stable code

POST /v1/mandates/import/ap2

Import an AP2 open payment mandate into a DRAFT native mandate (adapter; body at most 64 KB)

Roles: admin. Operation id importAp2Mandate.

Accepts an AP2 v0.2 Open Payment Mandate (vct mandate.payment.open.1) as an SD-JWT signed ES256 by a key of a trusted issuer (POST /v1/trusted-issuers). The signature, every disclosure and the expiry are checked. What AP2 states precisely is copied (per-payment maximum as integer minor units and its currency, the validity window); everything else is listed in the report as not enforced natively or as still to complete. Principal and agent come from the request.

Constraints Polivor cannot enforce. AP2 says a constraint a verifier does not understand must fail evaluation, and a native mandate is looser than the credential wherever it cannot enforce one. So an import that carries payees, a budget, recurrence, payment instruments, PISPs, a reference or a minimum amount is refused (422 AP2_UNENFORCED_CONSTRAINTS, one error per type) until the request names each of them in acknowledge_unenforced; constraint types AP2 does not define at all are never imported (422 AP2_UNKNOWN_CONSTRAINT). Issuer keys are the ones registered for the issuer plus, if it has a jwks_url, the set published there at the time of the import (AP2_ISSUER_KEYS_UNAVAILABLE if that cannot be fetched). The DRAFT cannot be activated until a new version with the missing fields is created (POST /v1/mandates/{id}/versions). The raw credential and its hash are kept.

Request body (JSON, required): object

StatusMeaningBody
201DRAFT mandate and what was done with each part of the credentialAp2ImportResult
400Problem details with a stable code
401Problem details with a stable code
403Problem details with a stable code
404Problem details with a stable code
409Problem details with a stable code
422Problem details with a stable code

GET /v1/trusted-issuers

Roles: admin. Operation id listTrustedIssuers.

StatusMeaningBody
200Trusted issuers of this tenantarray of TrustedIssuer
401Problem details with a stable code
403Problem details with a stable code

POST /v1/trusted-issuers

Register an issuer whose AP2 credentials may be imported (public keys only)

Roles: admin. Operation id registerTrustedIssuer.

Give the issuer's public P-256 keys (jwks), the HTTPS URL where it publishes them (jwks_url), or both. A URL is fetched when a credential is imported and is never cached, so a rotated or withdrawn key takes effect immediately. The URL must be public (no private or internal addresses), is not followed through redirects, and must serve at most 10 public keys, each with a kid.

Request body (JSON, required): any or any

StatusMeaningBody
201RegisteredTrustedIssuer
400Problem details with a stable code
401Problem details with a stable code
403Problem details with a stable code
422Problem details with a stable code

GET /v1/mandates/{id}

The version in force, or any other version with ?version=2.1 (versions are immutable and stay readable)

Roles: admin. Operation id getMandate.

NameInRequiredTypeDescription
no
versionquerynoMandateVersion
StatusMeaningBody
200Mandate with all versions readableMandate
401Problem details with a stable code
403Problem details with a stable code
404Problem details with a stable code

GET /v1/mandates/{id}/versions

Every version, newest first, with whether it is in force and whether it was revoked

Roles: admin. Operation id listMandateVersions.

NameInRequiredTypeDescription
no
StatusMeaningBody
200Versionsarray of MandateVersionInfo
401Problem details with a stable code
403Problem details with a stable code
404Problem details with a stable code

POST /v1/mandates/{id}/versions

Create the next version. Only the validity dates changed gives the next minor version (2.1 to 2.2); anything else the next major (2.1 to 3.0). The same body is refused (409 MANDATE_UNCHANGED). Versions are immutable.

Roles: admin. Operation id createMandateVersion.

NameInRequiredTypeDescription
no

Request body (JSON, required): MandateBody

StatusMeaningBody
201New versionMandate
400Problem details with a stable code
401Problem details with a stable code
403Problem details with a stable code
404Problem details with a stable code
409Problem details with a stable code
422Problem details with a stable code

POST /v1/mandates/{id}/activate

Roles: admin. Operation id activateMandate.

NameInRequiredTypeDescription
no
StatusMeaningBody
200Problem details with a stable code
401Problem details with a stable code
403Problem details with a stable code
404Problem details with a stable code
409Problem details with a stable code
422Problem details with a stable code

POST /v1/mandates/{id}/versions/{version}/revoke

Final and instant for that version; idempotent. Revoking the version in force leaves the agent with no authority until a new version is approved. Older versions are never reinstated.

Roles: admin. Operation id revokeMandateVersion.

NameInRequiredTypeDescription
no
versionpathyesMandateVersion
StatusMeaningBody
200Problem details with a stable code
400Problem details with a stable code
401Problem details with a stable code
403Problem details with a stable code
404Problem details with a stable code
409Problem details with a stable code
422Problem details with a stable code

beneficiary

GET /v1/beneficiaries

Roles: admin. Operation id listBeneficiaries.

StatusMeaningBody
200Allowlistarray of Beneficiary
401Problem details with a stable code
403Problem details with a stable code

POST /v1/beneficiaries

Roles: admin. Operation id createBeneficiary.

Request body (JSON, required): BeneficiaryCreate

StatusMeaningBody
201CreatedBeneficiary
400Problem details with a stable code
401Problem details with a stable code
403Problem details with a stable code
409Problem details with a stable code
422Problem details with a stable code

PATCH /v1/beneficiaries/{id}

Roles: admin. Operation id updateBeneficiary.

NameInRequiredTypeDescription
no

Request body (JSON, required): BeneficiaryUpdate

StatusMeaningBody
200UpdatedBeneficiary
400Problem details with a stable code
401Problem details with a stable code
403Problem details with a stable code
404Problem details with a stable code
422Problem details with a stable code

policy

GET /v1/policies

Roles: admin. Operation id listPolicies.

StatusMeaningBody
200Policy versionsarray of PolicyVersion
401Problem details with a stable code
403Problem details with a stable code

POST /v1/policies

Create a DRAFT policy version from template parameters or raw Cedar; validated against the Cedar schema

Roles: admin. Operation id createPolicy.

Request body (JSON, required): PolicyCreate

StatusMeaningBody
201DRAFT versionPolicyVersion
400Problem details with a stable code
401Problem details with a stable code
403Problem details with a stable code
422Problem details with a stable code

POST /v1/policies/{version}/publish

Publish; immutable afterwards. Rejected if a permit rule references signals

Roles: admin. Operation id publishPolicy.

NameInRequiredTypeDescription
versionpathyesinteger (minimum 1)
StatusMeaningBody
200Now the active versionPolicyVersion
401Problem details with a stable code
403Problem details with a stable code
404Problem details with a stable code
409Problem details with a stable code
422Problem details with a stable code

evidence

GET /v1/evidence

Roles: admin. Operation id listEvidence.

NameInRequiredTypeDescription
from_seqquerynointeger (minimum 0)
limitquerynointeger (minimum 1, maximum 1000, default 100)
StatusMeaningBody
200Evidence rows in sequence orderarray of EvidenceRow
401Problem details with a stable code
403Problem details with a stable code

GET /v1/evidence/export

Bundle for a range - rows, JWS, chain hashes and JWKS - verifiable offline

Roles: admin. Operation id exportEvidence.

At most 10000 rows per export (422 RANGE_TOO_LARGE otherwise).

NameInRequiredTypeDescription
from_seqquerynointeger (minimum 0)
to_seqquerynointeger (minimum 0)
StatusMeaningBody
200Export bundleEvidenceBundle
401Problem details with a stable code
403Problem details with a stable code
422Problem details with a stable code

GET /.well-known/jwks.json

Public keys (authz-signing and evidence-signing, all versions)

No API key needed. Operation id getJwks.

StatusMeaningBody
200JWKSJwks

keys

GET /v1/keys

Keys of this tenant, active and revoked (never the secret)

Roles: admin. Operation id listApiKeys.

StatusMeaningBody
200Keys, newest firstarray of ApiKey
401Problem details with a stable code
403Problem details with a stable code

POST /v1/keys

Create an API key; the secret is returned once and stored hashed

Roles: admin. Operation id createApiKey.

Request body (JSON, required): ApiKeyCreate

StatusMeaningBody
201CreatedApiKeyCreated
400Problem details with a stable code
401Problem details with a stable code
403Problem details with a stable code
422Problem details with a stable code

POST /v1/keys/{id}/revoke

Revoke a key; takes effect on the next request (well within 5 s). Idempotent

Roles: admin. Operation id revokeApiKey.

The last active admin key cannot be revoked (409 LAST_ADMIN_KEY).

NameInRequiredTypeDescription
no
StatusMeaningBody
204Revoked
401Problem details with a stable code
403Problem details with a stable code
404Problem details with a stable code
409Problem details with a stable code

webhook

GET /v1/webhook

The tenant's webhook URL, if any (role admin)

Roles: admin. Operation id getWebhook.

StatusMeaningBody
200Webhook statusWebhookStatus
401Problem details with a stable code
403Problem details with a stable code

PUT /v1/webhook

Set the webhook URL and create a new signing secret, shown once (role admin)

Roles: admin. Operation id setWebhook.

Events: decision.resolved (an approval ended: ALLOWED with the authorization, or DENIED with a reason), authorization.reported (an execution report or an admin release) and webhook.test. Each delivery is POST with the JSON body {id, type, created_at, tenant_id, data} and the headers Polivor-Event-Id and Polivor-Signature: t=<unix seconds>,v1=<hex>, where v1 is HMAC-SHA256 of <t>.<raw body> with the secret. Reject deliveries whose t is far from your clock. Any 2xx is success; other results are retried 5 times with backoff (1 min, 5 min, 15 min, 1 h, 6 h) and the same event ID. The URL must be HTTPS and public.

Request body (JSON, required): WebhookSet

StatusMeaningBody
200Configured. The secret is not shown again; setting the URL again creates a new one.WebhookConfigured
400Problem details with a stable code
401Problem details with a stable code
403Problem details with a stable code
422Problem details with a stable code

DELETE /v1/webhook

Stop sending events (role admin)

Roles: admin. Operation id removeWebhook.

StatusMeaningBody
204Removed or none was set
401Problem details with a stable code
403Problem details with a stable code

Schemas

WebhookSet

PropertyTypeRequiredDescription
urlstring (maxLength 2048)yesHTTPS

WebhookStatus

PropertyTypeRequiredDescription
configuredbooleanyes
urlstring or nullno

WebhookConfigured

PropertyTypeRequiredDescription
urlstringyes
secretstringyesShown once. Sign check: HMAC-SHA256(secret, ".")

JsonRpcMessage

A JSON-RPC 2.0 request, notification, result or error object (https://www.jsonrpc.org/specification)

PropertyTypeRequiredDescription
jsonrpc"2.0"yes
idstring or integer or nullno
methodstringno
paramsobjectno
resultobjectno
errorobjectno

Uuid

Type: string, uuid

Currency

Type: string (pattern "^[A-Z]{3}$")

Country

Type: string (pattern "^[A-Z]{2}$")

Iban

Type: string (pattern "^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,30}$")

MinorAmount

Integer minor units (cents); never a float

Type: integer, int64 (minimum 1)

Problem

PropertyTypeRequiredDescription
typestringyes
titlestringyes
statusintegeryes
detailstringno
codestringyesStable machine-readable code. Match on it, not on detail. New codes can be added, so treat an unknown code by its HTTP status. Every code with its status and meaning is in the error codes guide (/docs/errors-limits.html); a test keeps that list equal to the codes the API can return.
errorsarray of objectno

Reason

PropertyTypeRequiredDescription
policy_idstringnoThe Cedar policy that decided
codestringnoA pre-check or system reason, e.g. AGENT_SUSPENDED, MANDATE_REVOKED, NO_PERMIT, NO_ACTIVE_POLICY

Check

PropertyTypeRequiredDescription
idstringyes
resultpass, fail, satisfied, not_satisfiedyes
detailobjectno

Beneficiary_Ref

Unknown fields are ignored. Everything decisive about the beneficiary is computed by Polivor from the allowlist and the IBAN.

PropertyTypeRequiredDescription
idstring (minLength 1, maxLength 100)yes
ibanstring (minLength 1, maxLength 42)yes
countrystringnoAccepted for compatibility and never used

Action

Unknown fields are ignored and never influence the decision.

PropertyTypeRequiredDescription
type"PayInvoice"yes
amount_minorMinorAmountyes
currencyCurrencyyes
debtor_accountstring (minLength 15, maxLength 42)yes
payment_typeSEPA_CT, SEPA_INSTyes
beneficiaryBeneficiary_Refyes
referencestring (minLength 1, maxLength 140)yes

Signals

Agent-supplied; may only be used in forbid rules (signals tighten, never loosen). Unknown fields are ignored.

PropertyTypeRequiredDescription
originstring (maxLength 100)no
risk_flagsarray of string (maxItems 50)no

AuthorizeRequest

Unknown fields are ignored. Flags such as iban_changed or beneficiary_allowlisted have no effect, Polivor computes those facts itself.

PropertyTypeRequiredDescription
agent_buildstring (minLength 1, maxLength 64)noInformational label of the agent build or model. Stored in the decision and the evidence; it never changes an outcome.
actionActionyes
signalsSignalsno

SimulateRequest

Combines: AuthorizeRequest and object

SimulateResponse

PropertyTypeRequiredDescription
simulatedtrueyes
outcomeALLOW, DENY, REQUIRE_APPROVALyes
denialDenialno
reasonsarray of Reasonyes
checksarray of Checkyes
mandateobjectno
policy_versioninteger (minimum 0)yes0 when no policy applied

AuthorizationArtifact

PropertyTypeRequiredDescription
idUuidyes
jwsstringyesCompact JWS, typ polivor-authz+jwt, alg EdDSA
expires_atstring, date-timeyes

Denial

What an agent is told when nothing was allowed. The list of codes is closed and each sentence says what to do, never why. retryable is true only when sending the same request again later, with nothing else changed, may succeed (UNAVAILABLE).

PropertyTypeRequiredDescription
codeAGENT_NOT_ENABLED, OUTSIDE_AUTHORITY, APPROVAL_REQUIRED, UNAVAILABLE, APPROVER_DENIED, APPROVAL_EXPIREDyes
messagestringyes
retryablebooleanyes

AuthorizeResponse

The answer to an agent. It has no reasons, no checks and no policy version; a person sees those through the admin key, the console or the evidence.

PropertyTypeRequiredDescription
decision_idUuidyes
outcomeALLOW, DENY, REQUIRE_APPROVALyes
denialDenialno
mandateobjectno
evidenceobjectyes
authorizationAuthorizationArtifactno

DecisionStatus

Every caller gets the status and, when nothing is allowed, the coarse denial. Only an admin key also gets reasons, checks and policy_version; an agent key never does.

PropertyTypeRequiredDescription
decision_idUuidyes
outcomeALLOW, DENY, REQUIRE_APPROVALyes
statusALLOWED, DENIED, PENDING_APPROVALyes
denialDenialno
reasonsarray of ReasonnoAdmin keys only
checksarray of ChecknoAdmin keys only
policy_versioninteger (minimum 0)noAdmin keys only
authorizationAuthorizationArtifactno

ExecutionReport

PropertyTypeRequiredDescription
statusEXECUTED, REJECTED, FAILEDyes
external_refstring (maxLength 200)no

AuthorizationStatus

PropertyTypeRequiredDescription
idUuidyes
statusISSUED, EXECUTED, REJECTED, FAILED, NOT_EXECUTEDyes
reported_atstring or null, date-timeno
external_refstring or nullno

PrincipalCreate

PropertyTypeRequiredDescription
legal_namestring (minLength 1, maxLength 200)yes
countryCountryyes
leistring (pattern "^[A-Z0-9]{20}$")no

Principal

PropertyTypeRequiredDescription
idUuidyes
legal_namestring (minLength 1, maxLength 200)yes
countryCountryyes
leistring (pattern "^[A-Z0-9]{20}$")no

UserInvite

PropertyTypeRequiredDescription
person_idUuidyes
roleVIEWER, APPROVER, ADMINyes

UserRole

PropertyTypeRequiredDescription
roleVIEWER, APPROVER, ADMINyesVIEWER reads; APPROVER also approves mandate versions; ADMIN does everything

User

PropertyTypeRequiredDescription
idUuidyes
person_idUuidyes
roleVIEWER, APPROVER, ADMINyes
statusINVITED, ACTIVE, DEACTIVATEDyes

IdentityProviderCreate

PropertyTypeRequiredDescription
protocolOIDC, SAML (default "OIDC")no
namestring (minLength 1, maxLength 200)yes
issuerstring (maxLength 2048)noOIDC only. The issuer URL; its /.well-known/openid-configuration must answer.
client_idstring (minLength 1, maxLength 200)noOIDC only.
client_secretstring (minLength 1, maxLength 512)noOIDC only.
client_secret_expires_onstring, datenoOpenID Connect only, optional. The day the client secret stops working, if it does (Microsoft Entra secrets do). The admins are told 30 and 7 days before. For SAML the earliest signing certificate date is read from the metadata.
saml_metadatastring (maxLength 262144)noSAML only. The identity provider's metadata XML. Give this or saml_metadata_url.
saml_metadata_urlstring (maxLength 2048)noSAML only. An https URL that serves the identity provider's metadata.
domainsarray of string (minItems 1, maxItems 10)yes
require_mfabooleannoRefuse a sign-in that does not show multi-factor authentication (amr for OpenID Connect
require_confirmed_emailbooleannoOpenID Connect only. Refuse a sign-in whose token does not say email_verified is true. Off by default: a missing claim is accepted and an explicit false is refused. Always on for a provider shared by many organisations (Google accounts, Microsoft common, organizations or consumers) unless a required claim is set.
required_claimobjectnoA claim (OpenID Connect) or attribute (SAML) the sign-in must carry, for example tid for a Microsoft Entra tenant or hd for a Google Workspace domain.

IdentityProvider

PropertyTypeRequiredDescription
idUuidyes
protocolOIDC, SAMLyes
namestringyes
issuerstringyesThe issuer (OpenID Connect) or the entity id (SAML).
client_idstringnoOpenID Connect only.
service_providerobjectnoSAML only. What the customer enters at its identity provider.
require_mfabooleanyes
require_confirmed_emailbooleanyes
credential_expires_atstring or null, date-timenoWhen the client secret (as the admin gave it) or the earliest SAML signing certificate expires; null when not known.
warningsarray of objectyesWhat the provider's own description says about the settings chosen, for example that it does not list the email claim. Only on the response that creates the provider; never blocking.
required_claimobjectno
statusPENDING, ACTIVE, DISABLEDyesA new provider is PENDING: it routes nobody until an admin signs in once through it as a test, which makes it ACTIVE.
domainsarray of objectyes

PersonCreate

PropertyTypeRequiredDescription
namestring (minLength 1, maxLength 200)yes
titlestring (minLength 1, maxLength 200)no
emailstring, email (maxLength 254)yes

Person

PropertyTypeRequiredDescription
idUuidyes
versioninteger (minimum 1)yes
namestring or nullno
titlestring or nullno
emailstring or nullno
erasedbooleanyes

AgentCreate

PropertyTypeRequiredDescription
namestring (minLength 1, maxLength 200)yes
principal_idUuidyes
owner_person_idUuidyesThe accountable owner

Agent

PropertyTypeRequiredDescription
idUuidyes
namestringyes
principal_idUuidyes
owner_person_idUuidyes
statusACTIVE, SUSPENDED, RETIREDyes
agent_keystringnoShown once, on agent creation only

MandateBody

Native Financial Mandate body. The authoritative definition is docs/schema/financial-mandate.v0.json; validated against it on write. A DRAFT imported from AP2 holds only the mapped fields until a complete version is added.

PropertyTypeRequiredDescription
schema"polivor.financial-mandate/v0"yes

TrustedIssuer

PropertyTypeRequiredDescription
idUuidyes
namestringyes
format"AP2"yes
key_idsarray of stringyesIds of the keys registered by hand
jwks_urlstring or nullno

Ap2ImportResult

PropertyTypeRequiredDescription
mandateMandateyes
reportobjectyes

MandateVersion

major.minor, for example 2.1. A major version changes the rules, a minor version only the validity dates.

Type: string (pattern "^[0-9]{1,6}\\.[0-9]{1,6}$")

MandateVersionInfo

PropertyTypeRequiredDescription
versionMandateVersionyes
livebooleanyes
revokedbooleanyes
valid_fromstring, date-timeyes
valid_untilstring, date-timeyes
approver_person_idUuid or nullyes

Mandate

PropertyTypeRequiredDescription
idUuidyes
principal_idUuidyes
agent_idUuidyes
statusDRAFT, ACTIVE, REVOKEDyesREVOKED: the version in force was revoked and no version applies until a new one is approved
current_versionMandateVersionyesThe version in force (a DRAFT's current_version is the one activation will put in force)
latest_versionMandateVersionyesHighest version created; takes effect only when activated
versionMandateVersionyesThe version whose body is returned
revokedbooleanyesWhether the returned version is revoked
sourceNATIVE, AP2yes
bodyMandateBodyyes

BeneficiaryCreate

PropertyTypeRequiredDescription
external_idstring (minLength 1, maxLength 100)yesThe ID the agent sends in an authorize request; letters, digits and . _ : @ / -
namestring (minLength 1, maxLength 200)yes
ibanstring (minLength 15, maxLength 42)yesSpaces and lowercase are accepted and normalised; the checksum is verified
countryCountryyes
statusAPPROVED, BLOCKED (default "APPROVED")no

BeneficiaryUpdate

PropertyTypeRequiredDescription
namestring (minLength 1, maxLength 200)no
ibanstring (minLength 15, maxLength 42)no
countryCountryno
statusAPPROVED, BLOCKEDno

Beneficiary

PropertyTypeRequiredDescription
idUuidyes
external_idstringyes
namestringyes
ibanIbanyes
countryCountryyes
statusAPPROVED, BLOCKEDyes

TemplateParams

Which rules the generated Cedar contains. The mandate's own limits, scope and threshold are facts in the Cedar context; the template only chooses which rules apply. Omitted properties take their default.

PropertyTypeRequiredDescription
scopeboolean (default true)nopermit requires debtor account, currency, beneficiary country and payment type inside the mandate scope
per_transaction_limitboolean (default true)no
daily_limitboolean (default true)no
monthly_limitboolean (default true)no
approval_thresholdboolean (default true)noforbid with approval when the amount exceeds the mandate's threshold
beneficiary_allowlistboolean (default true)noforbid with approval when the beneficiary is not on the allowlist
blocked_beneficiaryboolean (default true)noHard deny for an explicitly blocked beneficiary; never payable by approval
iban_mismatchboolean (default true)noforbid with approval when an allowlisted beneficiary's IBAN differs
risk_signalsarray of string (maxItems 20, default ["prompt_injection_suspected"])noAgent-reported risk flags that escalate to approval. Empty turns the rule off. Signals only ever tighten.

PolicyCreate

One of: any or any

PropertyTypeRequiredDescription
template_paramsTemplateParamsno
cedarstring (maxLength 65536)noRaw Cedar. Validated against the Cedar schema; context.signals is rejected in permit rules.

PolicyVersion

PropertyTypeRequiredDescription
idUuidno
versioninteger (minimum 1)yes
statusDRAFT, ACTIVE, RETIREDyes
cedarstringyes
cedar_sha256stringyesHex
template_paramsTemplateParams or nullno
published_atstring or null, date-timeno

EvidenceRow

PropertyTypeRequiredDescription
seqinteger (minimum 1)yes
event_typestringyes
subject_idUuidyes
payloadobjectyesRFC 8785 canonicalised before hashing
prev_hashstringyesHex
hashstringyesHex
jwsstringyes
key_versionintegeryes
created_atstring, date-timeyes

EvidenceBundle

Everything needed to verify a range of evidence offline (cli/verify or the console verifier): rows with canonical payloads, hashes and signatures, all public keys, and the authorization artifacts issued for the decisions in the range. A range that does not start at row 1 verifies internally; its first row's prev_hash is the anchor to compare with the previous row you hold.

PropertyTypeRequiredDescription
format"polivor.evidence-bundle/v1"yes
tenant_idUuidyes
exported_atstring, date-timeyes
from_seqinteger (minimum 0)yes
to_seqinteger (minimum 0)yes
rowsarray of EvidenceRowyes
jwksJwksyes
authorizationsarray of objectyes

Jwk

PropertyTypeRequiredDescription
kty"OKP"yes
crv"Ed25519"yes
xstringyes
kidstringyes
alg"EdDSA"no
useauthz, evidenceyes
revoked_atstring or null, date-timeno

Jwks

PropertyTypeRequiredDescription
keysarray of Jwkyes

ApiKeyCreate

agent_id is required if and only if role is agent

PropertyTypeRequiredDescription
roleadmin, agent, enforceryes
agent_idUuidno

ApiKey

PropertyTypeRequiredDescription
idUuidyes
roleadmin, agent, enforceryes
agent_idstring or nullno
prefixstringyesThe non-secret part (pv_test_ or pv_live_) that identifies the key in logs
created_atstring, date-timeyes
revoked_atstring or null, date-timeno

ApiKeyCreated

PropertyTypeRequiredDescription
idUuidyes
roleadmin, agent, enforceryes
keystringyesPlaintext