What publishing a dossier would do, without publishing it
POST /v1/sources/{id}/dossiers/check- who may call it
- Anyone
- no key and no session
- how fresh
- Never cached
- every answer carries the index's height and the node's
On this page
The dry run of import_dossier: the same parser, the same guards, nothing written. Per dossier, the campaign it would write, bind or join, each entity it would create or attach to an existing one, as the import resolves it (resolved_to is the id the import writes to when it is not the one declared, so a software declared under an id that a threat actor holds is created with that id followed by -malware, the two never being one entity), and each member with the state it would land in (current, provisional, held, known, skipped), its chain check against the index, the collisions that would hold it, and the claims and campaigns btcintel already holds on its subject; errors lists what would fail the whole import. A dossier that holds a record that is not text PostgreSQL stores (an escaped surrogate outside a pair, bytes that are not UTF-8, a NUL) is rejected, as the import rejects it whole: its records are named, and the other dossiers are reported as the import would write them. Open to every tier under its quota: the Research agent reads it before it sends a dossier, the CEO before it publishes one.
Parameters
| Name | Where | Type | Required | What it does |
|---|---|---|---|---|
id | path | string | required | A dossier source: btcintel-dossiers. |
dossier | body | object | required | One incident, schema version 1: the campaign, the entities it needs and one member per Bitcoin mainnet subject, each citing the public pages that name it. Other chains go in refs; a victim carries no abuse word; a person is never an entity; an actor is named only with an authority's page. |
note | body | string | optional | Kept on the fetch: the validation the CEO made before publishing. Ignored by the check. |
The body is application/json.
schema DossierPush
dossierDossier required — One incident, schema version 1: the campaign, the entities it needs and one member per Bitcoin mainnet subject, each citing the public pages that name it. Other chains go in refs; a victim carries no abuse word; a person is never an entity; an actor is named only with an authority's page.versioninteger required — The dossier's schema version: 1, the only one the parser reads. · one of 1keystring required — The incident's slug; one dossier per incident, and the key never changes.retiredboolean — Withdraws every member the dossier ever named, with a date; a retired dossier lists no member.campaignobject required — The incident: its kind, title, summary, day and abuse word, the entities it names, and its context links.kindstring required — An event: concept (event:hack, event:theft, event:scam_campaign, event:ransomware_incident, event:seizure).titlestring required — The campaign's title. Required and never blank.summarystring required — What the cited pages state, nothing more: no actor, no figure a page does not give.occurred_atstring (date) required — The day the incident happened, YYYY-MM-DD.occurred_precisionstring — How fineoccurred_atis known:day(when left out),monthoryear. · one of "day", "month", "year"abusestring required — The campaign's abuse word (abuse:theft, abuse:scam, …); a victim never carries it.joinsstring — An existing campaign for the same incident to join instead of writing one.entitiesarray of object — The entities the campaign names, each with its role in it. An actor needs anauthority_datapage and is never declared inentities.idstring required — The entity's id: one the dossier declares inentities, or one btcintel already holds.rolestring required — The entity's part in the incident. · one of "victim", "actor", "authority"evidencearray of object — The pages that name the entity in that role.
refsarray of object — Context links: the victim's statement, the write-ups, another chain's tracker. Never a member.titlestring required — The link's title. Required and never blank.urlstring required — The link, an http(s) address.
entitiesarray of object — The entities the dossier declares. Each is written, or goes to the entity that answers to its name; never a person, a threat actor or a malware family.idstring required — The entity's id. Required.namestring required — The entity's name. Required and never blank.kindstring required — An entity: concept; never a person, a threat actor or a malware family.descriptionstring — What the entity is.aliasesarray of string — Other names the entity goes by.identifiersarray of object — The entity's ids in other registries.schemestring required — The registry the id belongs to. Required.valuestring required — The id in that registry. Required.urlstring — The entity's entry in that registry.
membersarray of object — One member for each subject, each citing the pages that name it. At least one, unless the dossier is retired; a retired dossier lists none.subjectobject required — The member's subject, each at most once in the dossier.kindstring required — The subject's kind. A sweep is a transaction; a member of any other role is an address or an outpoint. · one of "address", "tx", "outpoint"keystring required — The subject's key. Required.
rolestring required — The member's part in the incident: a victim, a sweep, a vault or a cash-out. · one of "victim", "sweep", "vault", "cash_out"chain_factstring required — Checked against the index when the member is written. · one of "funded", "spent", "confirmed"first_reported_atstring (date) — The day the subject was first reported, YYYY-MM-DD. Without it, the earliestpage_dateof its evidence.derived_fromobject — The sweep of this dossier the address is a direct output of; such a vault needs no page of its own and inherits the sweep's class and corroboration.kindstring required — Alwaystx. · one of "tx"keystring required — The txid of a sweep this dossier lists.
evidencearray of object — The pages that name the subject: at least oneurlentry, unless the member is derived from a sweep.kindstring required — What the entry is: a page (url), a transaction (txid) or a Nostr event (nostr_event). · one of "url", "txid", "nostr_event"valuestring required — The page's http(s) address, the transaction's txid in 64 lowercase hex, or the event's id.authorstring — An organisation, or the handle as the page shows it.page_datestring (date) — The page's date, YYYY-MM-DD. Required on aurlentry.quotestring — Verbatim. · at most 300 charactersclassstring — What the page earns; the first url entry sets the member's confidence class. · one of "authority_data", "service_data", "trusted_provider", "web_crawl"notestring — A note on the entry.
notestring — Kept on the fetch: the validation the CEO made before publishing. Ignored by the check. · at most 2000 characters
What it answers
The report.
| Field | Type | What it carries |
|---|---|---|
source | string | The source checked: the id of the path. |
parser_version | string | The parser that read the bundle, with its version. |
sha256 | string | Of the bundle as read; the fetch an import would cite. |
records | integer | The records the parser made of the bundle: one for each campaign, entity and member, a repeat counted once. |
errors | array | What would fail the whole import: a join to a missing or retracted event, an entity named but neither existing nor declared, a word outside the vocabulary. |
dossiers | array | One entry for each dossier of the bundle, by key. |
dossiers[].key | string | The dossier's key. |
dossiers[].retired | boolean | True when the dossier is retired. Absent otherwise. |
dossiers[].campaign | object | What the import would do with the dossier's campaign. |
dossiers[].entities | array | The entities the dossier declares, each with what the import would do with it. |
dossiers[].members | array | One entry for each member, with the state its import would land in. |
dossiers[].expires | array | Current members the source names in the campaign that this push leaves out: the import would delist them with a date. A dossier is sent whole. |
dossiers[].summary | object | The members counted by what would become of them: current, provisional, held, known and skipped, and expires for the ones the push would delist; for a rejected dossier, rejected, its records the import rejects. |
dossiers[].rejected | array | For a rejected dossier, its records as the import's run names them: by position among the bundle's records and by key when the key is text, never by content, those rejected with their dossier marked (its dossier). Absent otherwise. |
schema DossierCheckReport
sourcestring required — The source checked: the id of the path.parser_versionstring required — The parser that read the bundle, with its version.sha256string required — Of the bundle as read; the fetch an import would cite.recordsinteger required — The records the parser made of the bundle: one for each campaign, entity and member, a repeat counted once.errorsarray of string required — What would fail the whole import: a join to a missing or retracted event, an entity named but neither existing nor declared, a word outside the vocabulary.dossiersarray of object required — One entry for each dossier of the bundle, by key.keystring — The dossier's key.retiredboolean — True when the dossier is retired. Absent otherwise.campaignobject — What the import would do with the dossier's campaign.actionstring —new: the event would be written.bound: the key already has its event.joins: it would bind to the eventjoinsnames.nothing: a retired key that was never imported.rejected: a record of the dossier is not text PostgreSQL stores, so the import writes nothing of the dossier and withdraws nothing it stated before;rejectednames its records, and the dossier is not read further. · one of "new", "bound", "joins", "nothing", "rejected"event_idstring — The event the campaign is bound to or joins, evt_<n>. Absent for a new one, and when nothing would be done.titlestring — The campaign's title, as the dossier gives it.kindstring — The campaign's kind, as the dossier gives it.kind_in_vocabularyboolean — False when that kind is not in the vocabulary (errorssays so), or the dossier isrejected.entitiesobject — The entities the campaign names, each id with its role. Absent when it names none.
entitiesarray of object — The entities the dossier declares, each with what the import would do with it.idstring — The entity's id, as the dossier declares it.namestring — Its name, as declared.kindstring — Its kind, as declared.kind_in_vocabularyboolean — False when that kind is not in the vocabulary;errorsthen says so.actionstring — created: the import makes the entity; exists: the record's own is there; attaches: it joins another. · one of "exists", "attaches", "created"resolved_tostring — The id the import writes to when it is notid: the entity joined, or the id made for the record.
membersarray of object — One entry for each member, with the state its import would land in.subjectstring — The member's subject askind:key, canonicalised when it parses.rolestring — The member's role.classstring — The confidence class it would carry, asconfidence:<class>: its firsturlentry's, or web_crawl.corroboratedboolean — True when an authority's page, or two pages by different authors on different hosts, name the subject, or another source already names it in the campaign.chain_factstring — The fact on the chain the dossier states of the subject: funded, spent or confirmed.chain_checkstring — What the lookup of that fact found. Absent for a member skipped before the lookup. · one of "verified", "mismatch", "not_checkable"observedstring — What the chain showed, or why the fact could not be looked up.would_bestring — The state the member would land in:current;provisionalwhile one source alone names it;heldfor a chain mismatch or a collision;knownwhen the same row is already published;skippedwhen it cannot be a member. · one of "current", "provisional", "held", "known", "skipped"reasonstring — Why it would land so. Absent for acurrentmember.collisionsarray of string — Claims of another source that name the subject as a service, ann_<n>. Absent when there is none, and for a cash-out.campaignsarray of string — Other campaigns the subject is already a member of: the same incident joins them.existing_claimsarray of string — Up to five claims of other sources on the subject outside any campaign, each asann_<n> (source: label). Absent when there is none.
expiresarray of string — Current members the source names in the campaign that this push leaves out: the import would delist them with a date. A dossier is sent whole.summaryobject — The members counted by what would become of them: current, provisional, held, known and skipped, andexpiresfor the ones the push would delist; for arejecteddossier,rejected, its records the import rejects.rejectedarray of string — For arejecteddossier, its records as the import's run names them: by position among the bundle's records and by key when the key is text, never by content, those rejected with their dossier marked(its dossier). Absent otherwise.
Errors
| Status | Code | When |
|---|---|---|
| 400 | invalid_input | The source's parser declares no dossiers, the body is not a dossier, or it carries a private key (a Nostr nsec1, a WIF key or an extended private key such as xprv), which the answer never repeats (invalid_input). |
| 404 | not_found | not_found: what the path names is not known: not in the index (for a transaction, not in the node's mempool either), or no such record. The message says which. |
| 413 | too_large | Body over the size cap (too_large). |
| 422 | parse_failed | The parser refused the dossier (parse_failed): the message names the first refusal. |
| 429 | quota_exceeded | quota_exceeded: the caller's tier ran out of requests for the minute or the day. Retry-After says when to try again; every rate-limited answer carries X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset and X-RateLimit-Tier. While the deployment runs in log-only mode the decision is logged instead and X-RateLimit-Policy: log-only is set. |
Each comes in the one error envelope, and none is cached: an error carries Cache-Control: no-store.
Example
curl and jq, in any shell.
curl -s -X POST https://api.btcintel.io/v1/sources/ransomwhere/dossiers/check \
-H 'Content-Type: application/json' \
-d '{"dossier":{"version":1,"key":"bc1qz654h5qcqzalv6ltpxsk4ksdcc3e20wkedqntgnarv3a0t2e2p7scr48pl","campaign":{"kind":"address","title":"…","summary":"…","occurred_at":"…","abuse":"…"}}}' | jq