Quantum Nexus Webhooks API
HMAC-SHA256 signed webhooks + delivery inspection.
HMAC-SHA256 signed webhooks + delivery inspection.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/nexusquantum-legal:nexusquantum-legal-webhooks-api"
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: Nexus Legal Webhooks API
version: 1.95.0
description: 'Multi-jurisdictional legal analysis API with a multi-agent architecture and Zero Retention. ## Output language
`language` (and the language implied by the jurisdiction) sets the language the text is written in. For `es` and `en` the delivered text is also measured: when a substantial part of it came back in the other of the two, a block headed `⚠️ LANGUAGE OF THIS REPORT` (`⚠️ IDIOMA DE ESTE INFORME` when `es` was requested) is added at the end of the text. It works the same with any engine, BYO included. - **When there is no block**: it is not a confirmation. Other languages are not measured, and neither is a text too short or too mixed to tell. - **With BYO**: how closely the output follows the request depends on your engine. - **If the output language is essential to your workflow**: check it on your side against the `analysis` string. ## The verdict travels INSIDE the text — read this before you parse a response
Every string this API returns that a lawyer reads — `analysis`, `answer`, `report`, `draft`, `synthesisText`, and the string fields of structured results like `applicableLaw[]` — carries the citation verdict **inline**, not only in the `citationChecks` object beside it. **What you will actually see:**
```
An acknowledgement does not revive a claim already barred: section 29(7) of the
Limitation Act 1980 【✓】. See also [2019] EWHC 3556 (Comm)
【◻ not checked — the reason is in this citation''s note】. ---
DETERMINISTIC CITATION CHECK (against the official corpus)
1 verified · 1 not checked. ◻ **Not checked** — they were not compared against any official corpus…
```
- **Inline marker**: a `【…】` block immediately after each citation, in the response language. The glyph carries the verdict: `✓` verified · `⚠` a warning (e.g. the decision exists but a party you named does not appear in it) · `⛔` broken · `◻` not checked. - **Footer**: a `---` block at the end with the tally and, for anything not clean, the list of citations and why. **Why it is in the text and not only in the JSON.** Whoever copies an answer into an email, a brief or a .docx takes the PROSE. The `citationChecks` object does not travel with it. A verdict that only exists in a field beside the text is a verdict the reader can lose without noticing. **If you parse these strings**: markers are the only `【…】` sequences we emit, so they are safe to strip with a single regex if your pipeline needs the raw prose — but do not strip them from anything a human will read. `citationChecks` remains the machine-readable source of truth for counts and per-citation status; the markers are the same verdict, placed where it cannot get lost. **Idempotent**: annotating an already-annotated text does not duplicate markers or the footer. ## Streaming: `verifiedText` on the `done` event
On SSE routes the client already holds the raw prose by the time the verifier finishes, so the closing `{type:"done"}` event carries `verifiedText`: the same answer with the verdict already in it. **If it is present, render it in place of the concatenated `text_delta` chunks.** It is omitted when there is nothing to annotate, in which case the deltas are already final. The REST wrappers do this for you — `/v1/consulta`, `/v1/chat` and the rest aggregate server-side and hand you the annotated text — so this only concerns you if you consume the SSE stream directly. ## Base capabilities
- **Mode=deep**: the Node A (Claude Opus 4.7) + Node B (DeepSeek V4-Pro) chain audits adversarially. 2 credits. Returns an `audit` object with structured findings (hallucinations, false citations, omissions). - **Direct models**: calls through the providers'' own APIs (Anthropic, DeepSeek) with no proxies — lower latency, better rate limits. - **Stable Stripe-style error format**: `error.type`, `error.code`, `error.request_id`, `error.details` + backward-compat aliases. ## Errors and rate limits
- **Branch on `error.code`.** A code you do not recognise is handled by its `error.type`.'
contact:
name: Nexus Legal
email: support@nexusquantum.legal
url: https://legal.nexusquantum.legal/developers
license:
name: Commercial
url: https://nexusquantum.legal/terms
servers:
- url: https://legal.nexusquantum.legal
description: Production
security:
- ApiKeyAuth: []
tags:
- name: Webhooks
description: HMAC-SHA256 signed webhooks + delivery inspection.
paths:
/api/v1/webhooks/{id}/deliveries:
get:
tags:
- Webhooks
summary: List recent webhook deliveries (debug)
description: 'Lists the last N deliveries of a webhook endpoint. Useful for debugging: which events arrived, what status code the partner receiver returned, how many attempts, next scheduled retry.
ZERO-RETENTION: `payload_preview` is a metadata-only OBJECT, NEVER the analysis content. Normal rows → `{ redacted: false, event, keys, size_bytes }` (`keys` = top-level keys, structure not content); redacted rows (EXT-E07 success or 7d TTL) → `{ redacted: true, redacted_reason, size_bytes }`. The full payload is reproduced on the client side from the `delivery id`.
Includes a `summary` (v1.31.0) with endpoint-wide counts by status (`pending`/`success`/`failed`/`exhausted`), independent of `?status=`/`?limit=` — so you can tell at a glance what to retry (`failed`+`exhausted`) via `POST .../deliveries/redrive`.'
parameters:
- name: id
in: path
required: true
schema:
type: string
format: uuid
- name: limit
in: query
schema:
type: integer
minimum: 1
maximum: 200
default: 50
- name: status
in: query
schema:
type: string
enum:
- pending
- success
- failed
- exhausted
responses:
'200':
description: List of deliveries.
content:
application/json:
schema:
type: object
properties:
webhook_endpoint:
type: object
count:
type: integer
limit:
type: integer
summary:
type: object
description: Endpoint-wide counts by status (independent of filter/limit).
properties:
pending:
type: integer
success:
type: integer
failed:
type: integer
exhausted:
type: integer
deliveries:
type: array
items:
type: object
properties:
id:
type: string
format: uuid
event:
type: string
status:
type: string
enum:
- pending
- success
- failed
- exhausted
attempts:
type: integer
last_status_code:
type:
- integer
- 'null'
last_error:
type:
- string
- 'null'
created_at:
type: string
format: date-time
delivered_at:
type:
- string
- 'null'
format: date-time
next_retry_at:
type:
- string
- 'null'
format: date-time
payload_preview:
type: object
description: 'ZERO-RETENTION metadata-only (never the analysis content). Normal rows: {redacted:false, event, keys, size_bytes}; redacted: {redacted:true, redacted_reason, size_bytes}.'
properties:
redacted:
type: boolean
event:
type:
- string
- 'null'
description: Absent in redacted rows.
keys:
type: array
items:
type: string
description: Top-level keys (structure, not content). Absent in redacted rows.
size_bytes:
type: integer
redacted_reason:
type: string
description: Present only when redacted=true.
required:
- redacted
- size_bytes
operationId: getApiV1WebhooksByIdDeliveries
x-operation-id-source: derived
/api/v1/webhooks/{id}/deliveries/redrive:
post:
tags:
- Webhooks
summary: Redrive (re-enqueue) failed webhook deliveries
description: 'Re-enqueues `failed`/`exhausted` deliveries of a webhook endpoint. OPS action: only the **master** of the owning organization (or the solo owner of an account with no org) can trigger it; a `child` sub-key → `403 FORBIDDEN`.
Body: `{ delivery_id }` re-enqueues one specific delivery, or `{ redrive_all_failed: true }` re-enqueues ALL of the endpoint''s failed/exhausted deliveries (cap 100).
Semantics: only `failed`/`exhausted` rows whose payload is still retained are re-enqueued → `status`→`pending`, `attempts`→0, `next_retry_at`→now(), `last_error`→null. The `event_id`/`payload.id` does NOT change (the SIEM keeps deduplicating). After the reset a best-effort immediate delivery is fired; the cron picks up whatever stays pending.
Zero-Retention: a `success` delivery already has its payload redacted (`{redacted:true}`) → nothing to resend → `409 PAYLOAD_REDACTED`. A status that cannot be re-enqueued → `409 NOT_REDRIVABLE`. Uniform anti-enumeration 404 (does not exist OR is not yours).'
operationId: redriveWebhookDeliveries
security:
- ApiKeyAuth: []
parameters:
- name: id
in: path
required: true
schema:
type: string
format: uuid
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
delivery_id:
type: string
format: uuid
description: Re-enqueues this specific delivery.
redrive_all_failed:
type: boolean
description: If `true`, re-enqueues ALL of the endpoint's failed/exhausted deliveries (cap 100).
example:
delivery_id: b3f1c2a4-0000-4000-8000-000000000000
responses:
'202':
description: Deliveries re-enqueued.
content:
application/json:
schema:
$ref: '#/components/schemas/RedriveResult'
'400':
description: VALIDATION_ERROR — missing `delivery_id`/`redrive_all_failed`, or invalid JSON.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'403':
description: FORBIDDEN — redrive is restricted to the master key (child → 403).
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'404':
description: NOT_FOUND — webhook or delivery does not exist, or is not owned by the caller (indistinguishable by design).
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'409':
description: State conflict. `ENDPOINT_INACTIVE` (the webhook endpoint is `active=false` — reactivate it before redriving) · `PAYLOAD_REDACTED` (payload redacted after a successful delivery — nothing to resend) · `NOT_REDRIVABLE` (status cannot be re-enqueued) · `REDRIVE_CONFLICT` (the delivery changed state between the read and the conditional update — 0 rows affected, retry).
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'429':
description: REDRIVE_COOLDOWN — per-endpoint cooldown after a recent `redrive_all_failed`. Retry after the `Retry-After` header (seconds).
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
components:
schemas:
ErrorResponse:
type: object
required:
- error
description: Stripe-style error envelope returned by apiError() on ALL v1 routes. `error` is an OBJECT {type, code, message, request_id, details?}; the top-level `error_message`/`code` are backward-compat (deprecated v1.7). A generated client must deserialize `error` as an object, not as a string.
properties:
error:
type: object
required:
- type
- code
- message
properties:
type:
type: string
example: invalid_request_error
code:
type: string
example: VALIDATION_ERROR
message:
type: string
request_id:
type: string
details:
type: object
description: Optional. An engine failure carries what you need in order to decide what to do next, and a `429` says whose ceiling you reached. Each field is present only when it was measured, and `details` is omitted entirely rather than sent empty.
properties:
retryable:
type: boolean
description: Whether retrying this exact request can succeed. Absent means not measured — do not read absence as `true`.
refunded:
type: boolean
description: Whether the credit for this call was returned. Absent means not measured.
reason:
type: string
description: Short machine-readable cause.
example: provider_timeout
provider:
type: string
description: Which engine failed. On a BYO tenant this is the difference between checking your own key and opening a ticket with us.
example: Anthropic (BYO)
error_class:
type: string
scope:
type: string
enum:
- ip
- user
- organization
description: 'On a `429`: whose ceiling you reached.'
retry_after_seconds:
type: integer
description: 'On a `429`: seconds to wait, the same value as the `Retry-After` header.'
limit_per_minute:
type: integer
description: 'On a `429`: the per-minute ceiling you reached.'
error_message:
type: string
description: Backward-compat (deprecated v1.7).
code:
type: string
description: Backward-compat (deprecated v1.7).
RedriveResult:
type: object
description: Result of `POST /api/v1/webhooks/{id}/deliveries/redrive` (HTTP 202). Only `failed`/`exhausted` deliveries with a still-retained payload are re-enqueued (status→pending, attempts→0); `event_id`/`payload.id` are preserved so SIEM dedupe stays intact.
required:
- redriven
- delivery_ids
properties:
redriven:
type: integer
description: Number of deliveries re-enqueued.
delivery_ids:
type: array
items:
type: string
format: uuid
description: Ids of the re-enqueued deliveries.
skipped_redacted:
type: integer
description: 'Batch mode only: rows skipped because their payload was already redacted (Zero-Retention).'
capped:
type: boolean
description: 'Batch mode only: true when the batch hit the cap (100) and more may remain.'
requestId:
type: string
securitySchemes:
ApiKeyAuth:
type: http
scheme: bearer
bearerFormat: nlk_...