Skip to main content
You will need a terminal with curl and a phronel.ai account. Sign up at phronel.ai; the first three runs a month are free.

Step 1: Create a key

In the phronel.ai console, open the API keys page and create a key with write scope. The plaintext is shown once and looks like cap_inv_live_…. Keep it in your shell:
Live keys work on https://api.phronel.ai. Test keys (cap_inv_test_…) work on https://api-sandbox.phronel.ai, which runs against the staging estate and never touches production data.

Step 2: Check your allowance

Response

Step 3: Start a run

query accepts a company name, a website or a Companies House number. The optional fields help disambiguation and unlock more of the report.
Response (202)
A 402 with code insufficient_credits means the free allowance is used and the paid balance is empty. Buy credits on the billing page of the console. Runs are idempotent by company: if you retry while a run for the same company is in flight, or within ten minutes of one completing, you get that run back with a 200 and deduplicated: true, and no credit is used. Failed runs never count, so retrying a failure starts a fresh run.

Step 4: Poll until complete

Reading a run advances it, so polling every 30 seconds is the right cadence. Expect enrolled for a few minutes, then scored, then composing, then complete.
Response (complete)
If you passed webhook_url, the same run object arrives as a POST with event set to run.complete or run.failed, plus a scores object and the report’s priority questions. If you passed notify_email (or left the workspace default on), an email from phronel@notifications.caplia.ai links to the report.

Verify the webhook

Every POST carries x-phronel-signature: t=<unix seconds>,v1=<hex> where v1 is HMAC-SHA256 of "<t>.<raw body>" keyed by your workspace secret (GET /v1/webhook-secret, or the Settings page). Recompute it over the exact bytes you received and reject timestamps older than five minutes. Same scheme as Stripe.
Node
Rotate the secret with POST /v1/webhook-secret/rotate; deliveries signed from then on use the new one.

Step 5: Add a deck and a thesis

CRI readiness needs a pitch deck. Thesis fit needs a deck and at least one thesis. Both can be added after the run; the scores are queued and appear in the company’s scores and in the regenerated report.

Errors

Every error is {"error": {"code", "message", "request_id"}}. Quote the request_id when you contact support.

Reference

The full OpenAPI document, which also covers the wider Venture API on the same host, is at https://api.phronel.ai/v1/openapi.json.