Approvals API

Any system you run (purchasing, HR, deployments, contracts, an AI agent) can ask the right people in your company for a yes or no. They get a push notification, an email and an item in the 93 app; they decide with Face ID on their phone or after confirming who they are on the web. Your system gets each decision and the outcome back as signed webhooks, and the outcome is filed in your 93 Compliance evidence with a 93 Notary receipt.

1. Make a key and a webhook endpoint

A company owner or administrator opens 93 Compliance → your company → Approvals:

2. Ask for an approval

curl https://93problems.com/api/v1/approvals \ -H "Authorization: Bearer $NINETY3_KEY" \ -H "Content-Type: application/json" \ -d '{ "title": "Buy 3 laptops for the new hires", "details": "Total **$4,200**, quote attached.\n\n- 3 × MacBook Air\n- Cost center ENG", "approvers": [{"manager_of": "sam@yourco.com"}, {"role": "Finance"}], "rule": "all", "expires_at": "2026-12-10T17:00:00Z", "external_ref": "PO-1001", "metadata": {"po": 1001}, "links": [{"url": "https://erp.yourco.com/po/1001", "label": "PO 1001"}], "idempotency_key": "po-1001-v1" }'
FieldMeaning
titleWhat to decide, up to 200 characters (required). It is the only text in the push notification.
detailsMarkdown, up to 8 KB. Shown on the approval page and in the app; HTML and images are not rendered, links must be https.
approversWho decides (required, up to 20 entries). Each entry is one of {"email": "…"} (a member), {"role": "…"} (owner, admin, or a procedure role such as Finance) or {"manager_of": "…"} (that member’s manager). A role entry is answered by any one of its people. Everyone must be an active member of your company.
ruleany (default: one approval is enough), all (every entry must approve) or sequence (in order; the next person hears about it only when it is their turn). Any rejection under all or sequence rejects the request.
min_approvalsWith any: how many entries must approve (default 1). It is rejected as soon as that can no longer happen.
expires_atISO 8601 time with a zone, from 5 minutes to 30 days ahead. Default: 72 hours.
callback_urlOptional: one of your registered endpoints. Without it, the key’s endpoint is used, else the company’s. No endpoint: no webhooks (you can poll).
external_refYour own id (up to 200 characters), echoed back and searchable.
metadataAny JSON object up to 2 KB, echoed back in every response and webhook.
linksUp to 10 https links, as strings or {url, label}.
idempotency_keySend the same key again (with the same body) and you get the first approval back instead of a second one.
require_signatureDefault true: a decision must be signed on the approver’s phone (Secure Enclave key, Face ID) or made on the web right after re-entering a password or an emailed code. false accepts any signed-in approver.

The answer (201 Created, or 200 for an idempotent repeat) shows who each entry resolved to:

{ "id": "6c1e…", "object": "approval", "status": "pending", "title": "Buy 3 laptops for the new hires", "rule": "all", "expires_at": "2026-12-10T17:00:00+00:00", "external_ref": "PO-1001", "metadata": {"po": 1001}, "requester": {"system": "Purchasing"}, "approvers": [ {"position": 0, "requested": {"manager_of": "sam@yourco.com"}, "label": "Ana Ruiz", "state": "active", "people": [{"name": "Ana Ruiz", "email": "ana@yourco.com"}]}, {"position": 1, "requested": {"role": "Finance"}, "label": "Finance", "state": "active", "people": [{"name": "Lee Park", "email": "lee@yourco.com"}, {"name": "Kim Ode", "email": "kim@yourco.com"}]} ], "decisions": [], "callback_url": "https://erp.yourco.com/hooks/93" }

3. Statuses and other calls

pending → approved | rejected | expired | cancelled. Each decision records who, approve or reject, the comment, when, and how it was confirmed (device_signature with the signed text, signature and key fingerprint, web_reauth, or session), with a 93 Notary receipt.

GET /api/v1/approvals/{id}One approval.
GET /api/v1/approvals?status=&external_ref=&limit=&before=Your company’s approvals, newest first (up to 100; pass next_before to page).
POST /api/v1/approvals/{id}/cancelCancel a pending one, with an optional {"reason": "…"}.
POST /api/v1/approvals/{id}/remindPush and email the people whose turn it is again (once every 10 minutes, 5 times at most).

Errors are JSON {"detail": "…"}: 401 bad key, 403 scope or switched off, 404 not your company’s, 409 already decided or idempotency conflict, 422 invalid field (the message names it), 429 too many (30 a minute, 600 an hour per company; see Retry-After).

4. Webhooks

Events: approval.decided (each decision), approval.completed (approved or rejected), approval.expired, approval.cancelled. The body is the whole approval plus event and event_id (and decision for approval.decided).

POST https://erp.yourco.com/hooks/93 Content-Type: application/json X-93-Event: approval.completed X-93-Event-Id: 0b7f… (the same on every retry and redelivery: use it to ignore duplicates) X-93-Delivery: 4d2a… (new for each attempt you see) X-93-Signature: t=1796290000,v1=5f1c… { "event": "approval.completed", "event_id": "0b7f…", "occurred_at": "2026-12-08T15:04:11+00:00", "id": "6c1e…", "status": "approved", "external_ref": "PO-1001", "metadata": {"po": 1001}, "decisions": [ {"decider": {"name": "Ana Ruiz", "email": "ana@yourco.com"}, "decision": "approve", "comment": "Go ahead", "signed_at": "2026-12-08T14:51:02+00:00", "method": "device_signature", "signer_fp": "9a41c0…", "receipt": "e3b0…"}, {"decider": {"name": "Lee Park", "email": "lee@yourco.com"}, "decision": "approve", "comment": null, "signed_at": "2026-12-08T15:04:10+00:00", "method": "web_reauth", "receipt": "77d2…"} ], "receipt": {"type": "93-notary-receipt", "leaf_hash": "c4f9…", "verify": "https://93problems.com/notary/verify"}, "evidence_artifact_id": "a81b…" }

Answer with any 2xx within 10 seconds. Anything else is retried with growing gaps (30 s, 1, 2, 5, 10, 20, 30 minutes, then hourly and longer) for 24 hours; redirects are not followed. Every attempt is in Approvals → Webhook deliveries, where Redeliver sends the same event again.

5. Check the signature

X-93-Signature: t=<unix seconds>,v1=<hex>, where v1 is HMAC-SHA256 of t + "." + raw body with your endpoint’s signing secret. Use the raw bytes (before JSON parsing), compare in constant time, and refuse timestamps older than 5 minutes.

Node.js

import crypto from 'node:crypto'; // Express: app.post('/hooks/93', express.raw({ type: 'application/json' }), handler) function verify93(rawBody, header, secret) { const parts = Object.fromEntries(header.split(',').map((p) => p.split('='))); const t = Number(parts.t); if (!t || Math.abs(Date.now() / 1000 - t) > 300) return false; // older than 5 minutes: refuse const expected = crypto.createHmac('sha256', secret).update(`${t}.`).update(rawBody).digest('hex'); const a = Buffer.from(expected), b = Buffer.from(parts.v1 || ''); return a.length === b.length && crypto.timingSafeEqual(a, b); } function handler(req, res) { if (!verify93(req.body, req.get('X-93-Signature') || '', process.env.NINETY3_WEBHOOK_SECRET)) return res.sendStatus(401); const event = JSON.parse(req.body); // if (alreadySeen(event.event_id)) return res.sendStatus(200); // ... act on event.event / event.status ... res.sendStatus(200); // any 2xx = delivered }

Python

import hashlib, hmac, json, os, time def verify_93(raw_body: bytes, header: str, secret: str) -> bool: parts = dict(p.split("=", 1) for p in header.split(",") if "=" in p) try: t = int(parts.get("t", "")) except ValueError: return False if abs(time.time() - t) > 300: # older than 5 minutes: refuse return False expected = hmac.new(secret.encode(), f"{t}.".encode() + raw_body, hashlib.sha256).hexdigest() return hmac.compare_digest(expected, parts.get("v1", "")) # Flask @app.post("/hooks/93") def hook(): if not verify_93(request.get_data(), request.headers.get("X-93-Signature", ""), os.environ["NINETY3_WEBHOOK_SECRET"]): return "", 401 event = json.loads(request.get_data()) # skip if event["event_id"] was seen before; then act on event["event"] / event["status"] return "", 200

6. Proof

Each final outcome is written as a JSON record (request, approvers, every decision with its signature) and filed under Evidence → Artifacts from other systems with the tag approvals, so auditors find it with the rest of your evidence. Its fingerprint goes into the 93 Notary log; anyone can check the receipt at 93problems.com/notary/verify.

More: Approvals in the help center.