Skip to main content

Integrate one controlled action

Send an intended action to Qerexa before your system performs it. Your integration applies the returned decision. Qerexa does not automatically intercept every action in your environment or execute the action for you.

This public contract documents the core decision and review lookup path only. It is read-only documentation: no credentials are collected and no requests are sent from this page. Additional customer APIs require a signed-in account and current customer documentation.

Before you start

  • Use a tenant-issued API key for the correct environment mode.
  • Give the key only the scopes needed for the workflow: gates:evaluate for review creation and flows:read for lookup.
  • Keep keys server-side. Never place one in browser code, a URL, or this page.
  • Start with a nonproduction workflow and a system that can actually stop before the consequential action runs.

1. Evaluate the intended action

POST /api/v1/gates/evaluate accepts the action, actor, reason, and optional scope. Use a stable Idempotency-Key for retries of the same request. The example below is illustrative: sending it with a real key creates a real evaluation, so substitute a nonproduction workflow you control.

curl https://api.qerexa.com/api/v1/gates/evaluate \
  -H "Authorization: Bearer $QEREXA_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: <stable-unique-request-id>" \
  -d '{
    "action": "deploy:payments-service",
    "actor": "deployment-service",
    "reasoning": "Reviewed release change",
    "scope": { "target": "payments-service" }
  }'

This endpoint expects the tenant API key in Authorization: Bearer. Do not put sensitive payloads in the reason or examples unless your organization has approved that data flow. Keep the JSON body within 1 MiB (1,048,576 bytes) and complete its upload within the API's five-second body-read window, whether or not you use an idempotency key. HTTP 408 (read timeout) or 413 (body too large) is not permission to execute.

2. Handle the outcome before execution

ResponseMeaningWhat your system must do
200 allowedThis evaluation permits the submitted action.Check expiry and exact action binding before proceeding.
202 approval_requiredA durable review flow was created.Stop execution; retain the flow_id and check later.
403 blockedThe action was denied.Do not execute. Show or record the reason safely.
Error or unavailableNo usable authorization was returned.Fail closed; retry only according to your policy.

A 202 is not permission to execute. An approved review is not a blanket permission for a different action, target, or expired request. The enforcement point must check the current authorization immediately before its downstream call.

3. Check a pending review

GET /api/v1/trust-flows/{id} returns the current status for your tenant and mode. This endpoint currently expects the key in the X-API-Key header; the evaluation endpoint uses a Bearer header. Use the same appropriately scoped tenant key only if it has both scopes.

curl https://api.qerexa.com/api/v1/trust-flows/<flow_id> \
  -H "X-API-Key: $QEREXA_API_KEY"

Status can be pending, approved, rejected, expired, cancelled, or escalated. Do not treat a flow status alone as authority to execute; follow the exact integration contract for your protected action and re-check its binding and expiry.

What happens after approval?

Approval completes the human decision; it does not by itself execute the action or grant a reusable permission. Your protected workflow needs its own final enforcement step that checks the same action and target at execution time. The exact resume or consume call depends on the integration. The two public operations above demonstrate evaluation and status lookup, not a complete payment or deployment execution contract.

Reference and limits

The public OpenAPI file defines these two operations, their headers, response codes, and JSON shapes. It is a versioned subset, not an inventory of every route in the service. A missing operation is not permission to use an undocumented endpoint.

  • API keys, quotas, and available scopes are tenant- and plan-specific.
  • Rate limiting can return 429 with Retry-After.
  • Use HTTPS, least privilege, idempotent retries, and redacted application logs.
  • Qerexa is not a payment processor; no live payment rail is exposed here.

For a scoped integration or security review, use the signed-in route index orcontact Qerexa.