Skip to content

Quickstart

The API is in private preview and keys are issued by invitation. For access, write to contact@sanctionary.org. Once you are invited, create a v1 key in the dashboard. Keys start with sanc_v1_.

Terminal window
export SANCTIONARY_KEY="sanc_v1_..."

Send the key in the Authorization header and never in a URL or a body. A key that can run checks needs the screen scope; see Authentication & keys.

GET /v1/catalog lists the domains, topics, recipes, accepted values, bounds and capabilities that apply to your key. Discovery calls cost no credits.

Terminal window
curl https://api.sanctionary.org/v1/catalog \
-H "Authorization: Bearer $SANCTIONARY_KEY"

POST /v1/check takes 1 to 100 parties and the domains you want answered. This request uses the catalog’s person recipe (sanctions and peps) and fictional data:

Terminal window
curl https://api.sanctionary.org/v1/check \
-H "Authorization: Bearer $SANCTIONARY_KEY" \
-H "Content-Type: application/json" \
-d '{
"domains": ["sanctions", "peps"],
"parties": [
{
"reference": "cust-8",
"type": "person",
"names": [{ "value": "Maren Tolvisk" }],
"birth_dates": ["1984"],
"countries": ["no"]
}
]
}'

The same call in Python:

import os, httpx
resp = httpx.post(
"https://api.sanctionary.org/v1/check",
headers={"Authorization": f"Bearer {os.environ['SANCTIONARY_KEY']}"},
json={
"domains": ["sanctions", "peps"],
"parties": [
{
"reference": "cust-8",
"type": "person",
"names": [{"value": "Maren Tolvisk"}],
"birth_dates": ["1984"],
"countries": ["no"],
}
],
},
)
answer = resp.json()

Tips for the request:

  • Send names in their original script, and only the detail you actually have.
  • reference is your own ID for the party. It is the only input value an answer repeats.
  • type is one of person, organization, vessel, aircraft, crypto_wallet, security or unknown.
  • Optional: threshold (default 0.7), limit (candidates per section, default 5, at most 50), options per domain and "coverage": "compact".

The answer has meta and results, one result per party in request order. Each result has reference, charged (0 or 1) and one independent section per domain under domains:

results[0].domains.sanctions.status checked | inconclusive | needs_input | not_applicable | not_in_tier | unavailable
results[0].domains.sanctions.checked { names, identifiers, accounts }: what actually ran
results[0].domains.sanctions.candidates[] score, match, features, matched_name, entity, sources, ...
results[0].domains.sanctions.matches qualifying candidates before the limit
results[0].domains.sanctions.truncated more qualified than `limit` returned
meta.domains.sanctions the release read and its coverage

Read each section on its own:

  1. status. Only checked means the check ran to completion. inconclusive means a negative you should not rely on, for example because a core list was stale. See Matching & evidence.
  2. candidates. Each one is evidence, not a verdict: a score, a match flag, features explaining the score, the matched_name and the sources with attribution and freshness. Send possible matches to a reviewer with the evidence.
  3. truncated and retrieval_capped. Check both before treating a list as exhaustive.
  4. meta.domains. Each domain’s release and coverage: datasets in scope and checked, plus stale and missing lists.

Keep the response bytes and the receipt headers (X-Request-Id, X-Sanctionary-Build, X-Sanctionary-Response-SHA256, X-Credits-Charged) with your decision record.

Read https://api.sanctionary.org/v1/guide and https://api.sanctionary.org/v1/openapi.json.
Integrate Sanctionary POST /v1/check into this codebase using the SANCTIONARY_KEY env var.
Handle every section status, keep the receipt headers, and test with fictional data.