API
Two things for your own tools: the read API returns what your account's pages show as JSON, and a webhook channel posts each notification to a URL of yours. The read API is part of Pro; webhook channels are part of Starter and Pro.
Read API
Make a secret that reads under Secrets and send it with every request. A secret reads or sends reports, never both. A secret may read 600 times an hour.
curl -H "Authorization: Bearer $ZOSIA_READ_SECRET" https://zosiasec.com/api/v1/projects
- GET /api/v1/projects: every project with its repository, its default branch and the gate result there (pass, block, error or null), the counts of blocking findings and warnings, and the time of its latest report.
- GET /api/v1/machines: every machine with its verdict, its counts, the time of its last report and whether it went silent.
- GET /api/v1/reports: reports, newest first. project, machine (an id each) and branch narrow them; limit (up to 200, 50 by default) and page walk them. nextPage is null on the last page.
- GET /api/v1/reports/<id>: one report with its action cards and its findings, in the order of the report's page. limit (up to 5,000, 1,000 by default) and page walk the findings; findingsTotal says how many there are. full is false for a report that is stored with its result and its most urgent findings only.
Times are ISO 8601 in UTC. An error is JSON with a code and a message: 401 BAD_SECRET, 403 PLAN_LIMIT on a plan without the read API, 404 NOT_FOUND, 429 RATE_LIMITED.
Webhook channels
Add one under Notifications. Zosia posts JSON to its URL for every notification the channel is set to get, and once when you add it. The URL must be https and reachable from the internet; redirects are not followed, and an answer has 5 seconds. A post that fails is not sent again.
{
"id": "5b0c6f0e-6f0a-4c62-9a55-0d3b8a1c2e11",
"type": "project.blocked",
"subject": "shop is blocked on main",
"text": "The gate of shop (github.com/acme/shop) blocks on main: 2 findings.",
"url": "https://zosiasec.com/app/reports/…",
"sentAt": "2026-11-28T09:14:03.120Z"
}type is the event: project.blocked, project.warnings, project.error, project.missing, project.fine, project.connected, project.removed, the same seven for machine. (with exploitable, conditional, incomplete and silent in place of the first four), machine.reboot, plan.refused, subscription.changed, subscription.renewal, subscription.ending, and reminder, digest and test. The body as a JSON Schema: webhook.schema.json.
Every post carries Zosia-Signature: t=<seconds>,v1=<hex>. v1 is the HMAC-SHA256 of <seconds>.<body> with the channel's signing secret, which its card lets you copy. Compare it before you trust a post, and refuse one whose time is more than a few minutes old.
const [t, v1] = header.split(",").map((part) => part.split("=")[1]);
const expected = crypto.createHmac("sha256", signingSecret).update(t + "." + rawBody).digest("hex");
const ok = crypto.timingSafeEqual(Buffer.from(v1), Buffer.from(expected));A Slack channel is added with “Add to Slack” or with a Slack incoming-webhook URL, and gets the same notifications as text.