Publish one incident dossier through a dossier source (ops)
POST /v1/sources/{id}/dossiers- quién puede llamarla
- Un operador
- An agent imports only a source flagged
agent_may_publish. - cuán reciente
- Nunca en caché
- cada respuesta lleva la altura del índice y la del nodo
En esta página
One dossier, pushed as a bundle of one through the source's campaign-dossier parser: its campaign is written, bound or joined, its entities created or attached, its members written in the states the guards decide, and the diff touches that dossier's campaign alone. A dossier is sent whole: a member it no longer lists is delisted with a date; retired: true withdraws them all. The caller is an operator: the ops bearer, or a btci_ key with ops:agent on a source that carries agent_may_publish; the import is audited under the operator and counts one action of its budget. note is kept on the fetch: the validation the CEO made before publishing. Run check_dossier first; the same body, the same parser, nothing written.
Parámetros
| Nombre | Dónde | Tipo | Obligatorio | Qué hace |
|---|---|---|---|---|
id | ruta | string | obligatorio | A dossier source: btcintel-dossiers. |
dossier | cuerpo | object | obligatorio | 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 | cuerpo | string | opcional | Kept on the fetch: the validation the CEO made before publishing. Ignored by the check. |
El cuerpo es application/json.
esquema DossierPush
dossierDossier obligatorio — 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 obligatorio — The dossier's schema version: 1, the only one the parser reads. · uno de 1keystring obligatorio — 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 obligatorio — The incident: its kind, title, summary, day and abuse word, the entities it names, and its context links.kindstring obligatorio — An event: concept (event:hack, event:theft, event:scam_campaign, event:ransomware_incident, event:seizure).titlestring obligatorio — The campaign's title. Required and never blank.summarystring obligatorio — What the cited pages state, nothing more: no actor, no figure a page does not give.occurred_atstring (date) obligatorio — The day the incident happened, YYYY-MM-DD.occurred_precisionstring — How fineoccurred_atis known:day(when left out),monthoryear. · uno de "day", "month", "year"abusestring obligatorio — 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 de object — The entities the campaign names, each with its role in it. An actor needs anauthority_datapage and is never declared inentities.idstring obligatorio — The entity's id: one the dossier declares inentities, or one btcintel already holds.rolestring obligatorio — The entity's part in the incident. · uno de "victim", "actor", "authority"evidencearray de object — The pages that name the entity in that role.
refsarray de object — Context links: the victim's statement, the write-ups, another chain's tracker. Never a member.titlestring obligatorio — The link's title. Required and never blank.urlstring obligatorio — The link, an http(s) address.
entitiesarray de 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 obligatorio — The entity's id. Required.namestring obligatorio — The entity's name. Required and never blank.kindstring obligatorio — An entity: concept; never a person, a threat actor or a malware family.descriptionstring — What the entity is.aliasesarray de string — Other names the entity goes by.identifiersarray de object — The entity's ids in other registries.schemestring obligatorio — The registry the id belongs to. Required.valuestring obligatorio — The id in that registry. Required.urlstring — The entity's entry in that registry.
membersarray de 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 obligatorio — The member's subject, each at most once in the dossier.kindstring obligatorio — The subject's kind. A sweep is a transaction; a member of any other role is an address or an outpoint. · uno de "address", "tx", "outpoint"keystring obligatorio — The subject's key. Required.
rolestring obligatorio — The member's part in the incident: a victim, a sweep, a vault or a cash-out. · uno de "victim", "sweep", "vault", "cash_out"chain_factstring obligatorio — Checked against the index when the member is written. · uno de "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 obligatorio — Alwaystx. · uno de "tx"keystring obligatorio — The txid of a sweep this dossier lists.
evidencearray de object — The pages that name the subject: at least oneurlentry, unless the member is derived from a sweep.kindstring obligatorio — What the entry is: a page (url), a transaction (txid) or a Nostr event (nostr_event). · uno de "url", "txid", "nostr_event"valuestring obligatorio — 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. · como mucho 300 caracteresclassstring — What the page earns; the first url entry sets the member's confidence class. · uno de "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. · como mucho 2000 caracteres
Qué responde
200 · application/json
Import finished.
| Campo | Tipo | Qué lleva |
|---|---|---|
fetch_id | integer | The fetch the import recorded for the file: the one its claims cite. |
import_run_id | integer | The import's run: the id GET /v1/ops/imports/{id} takes. |
inserted | integer | Claims created or re-versioned. |
confirmed | integer | Claims the fetch restated unchanged. |
expired | integer | Claims, relations and signatures the source stopped saying. |
skipped | integer | Claims left out and noted on the run: an invalid subject, a word outside the vocabulary, a campaign member without a campaign role (victim, sweep, vault, cash_out), a victim with an abuse word. |
rejected | integer | Records left out whole because they are not text PostgreSQL stores (a NUL byte, an escaped surrogate outside a pair, bytes that are not UTF-8, or in XML a character reference to a surrogate), with, for a dossier source, every record of a dossier that holds one, and an ATT&CK relationship to an object rejected so, or because they hold a Bitcoin private key (a WIF key or an extended private key); named on the run by position and key, by position alone for a private key; included in record_count. Nothing of them is written and nothing they may have stated is withdrawn: their claims stay as they were, and while a fetch rejects a record no relation, signature, alias or identifier of the source is withdrawn. |
record_count | integer | Records the parser emitted from the file, distinct by record key, the rejected ones included: rows as parsed, not claims (see Source.last_fetch.record_count). |
provisional | integer | Campaign members that landed provisional: a source's first import into the campaign, a batch over the batch size, or a sweep, vault or cash-out named by one source. Included in inserted. |
promoted | integer | Members held back only for want of a second source that another source now names: current now. |
esquema ImportResult
fetch_idinteger — The fetch the import recorded for the file: the one its claims cite.import_run_idinteger — The import's run: the idGET /v1/ops/imports/{id}takes.insertedinteger — Claims created or re-versioned.confirmedinteger — Claims the fetch restated unchanged.expiredinteger — Claims, relations and signatures the source stopped saying.skippedinteger — Claims left out and noted on the run: an invalid subject, a word outside the vocabulary, a campaign member without a campaign role (victim,sweep,vault,cash_out), a victim with an abuse word.rejectedinteger — Records left out whole because they are not text PostgreSQL stores (a NUL byte, an escaped surrogate outside a pair, bytes that are not UTF-8, or in XML a character reference to a surrogate), with, for a dossier source, every record of a dossier that holds one, and an ATT&CK relationship to an object rejected so, or because they hold a Bitcoin private key (a WIF key or an extended private key); named on the run by position and key, by position alone for a private key; included in record_count. Nothing of them is written and nothing they may have stated is withdrawn: their claims stay as they were, and while a fetch rejects a record no relation, signature, alias or identifier of the source is withdrawn.record_countinteger — Records the parser emitted from the file, distinct by record key, the rejected ones included: rows as parsed, not claims (seeSource.last_fetch.record_count).provisionalinteger — Campaign members that landed provisional: a source's first import into the campaign, a batch over the batch size, or a sweep, vault or cash-out named by one source. Included in inserted.promotedinteger — Members held back only for want of a second source that another source now names: current now.
202 · application/json
Import still running after the budget; poll the run.
| Campo | Tipo | Qué lleva |
|---|---|---|
import_run_id | integer | The import's run: poll it at GET /v1/ops/imports/{id}. |
source_id | string | The source the dossier is imported into. |
status | string | Always running: the import goes on past the budget. |
esquema
import_run_idinteger — The import's run: poll it atGET /v1/ops/imports/{id}.source_idstring — The source the dossier is imported into.statusstring — Alwaysrunning: the import goes on past the budget. · uno de "running"
Errores
| Estado | Código | Cuándo |
|---|---|---|
| 400 | invalid_input | The body is not a dossier (invalid_input), or it carries a private key (a Nostr nsec1, a WIF key or an extended private key such as xprv), its note included, which the answer never repeats: nothing is imported or recorded. |
| 401 | unauthorized | unauthorized: the request does not say who makes it, or what it offers does not verify: no key or session where one is needed, or a password, a code, a passkey or a signed event that does not check. The message says what is missing. |
| 403 | forbidden | An agent may publish only a source flagged agent_may_publish (forbidden). |
| 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. |
| 409 | source_inactive | Source inactive (source_inactive), or a link-out without a grant of reuse (link_out). |
| 413 | too_large | Body over the size cap (too_large). |
| 422 | parse_failed | The parser refused the dossier (parse_failed); the fetch is recorded as failed and no claim changes. |
| 429 | quota_exceeded | An import of this source is already running (quota_exceeded, Retry-After), or the agent's daily budget is spent. |
Cada uno llega en el sobre de error único, y ninguno se guarda en caché: un error lleva Cache-Control: no-store.
Ejemplo
curl y jq, en cualquier shell.
curl -s -X POST https://api.btcintel.io/v1/sources/ransomwhere/dossiers \
-H "Authorization: Bearer $BTCINTEL_KEY" \
-H 'Content-Type: application/json' \
-d '{"dossier":{"version":1,"key":"bc1qz654h5qcqzalv6ltpxsk4ksdcc3e20wkedqntgnarv3a0t2e2p7scr48pl","campaign":{"kind":"address","title":"…","summary":"…","occurred_at":"…","abuse":"…"}}}' | jqThis route needs a key. Set BTCINTEL_KEY in your environment first: the snippet reads it from there and holds no key. The description above names the tiers the route takes.