btcintel

Propose a claim, entity, relation or event (ops; a human approves it)

POST /v1/ops/drafts
quién puede llamarla
Un operador
qué cuesta
1 petición de la cuota
niveles y claves
cuán reciente
Nunca en caché
cada respuesta lleva la altura del índice y la del nodo
Herramienta MCP
Ninguna
En esta página

An agent's writes always become drafts; a human's proposal waits for a different human too. Approval publishes through the writer under the draft's source.

Parámetros

NombreDóndeTipoObligatorioQué hace
claim_tablecuerpostringobligatorioWhat the payload makes: an annotation, an entity, a relation or an event.
payloadcuerpoobjectobligatorioClaimInput {subject_kind, subject_key, label, category|abuse, entity_id, role, method, confidence_class, evidence}, EntityInput {id, name, kind, …}, RelationInput {from_entity, to_entity, type, …} or EventInput {kind, occurred_at, title, cites, subjects, entities}.
source_idcuerpostringopcionalThe source the draft is published under on approval, one the registry holds. A draft without one cannot be approved.
lead_event_idcuerpostringopcional32-byte Community event id in hex.

El cuerpo es application/json.

esquema
  • claim_table string obligatorio — What the payload makes: an annotation, an entity, a relation or an event. · uno de "intel.annotations", "intel.entities", "intel.entity_relations", "intel.events"
  • payload object obligatorio — ClaimInput {subject_kind, subject_key, label, category|abuse, entity_id, role, method, confidence_class, evidence}, EntityInput {id, name, kind, …}, RelationInput {from_entity, to_entity, type, …} or EventInput {kind, occurred_at, title, cites, subjects, entities}.
  • source_id string — The source the draft is published under on approval, one the registry holds. A draft without one cannot be approved.
  • lead_event_id string — 32-byte Community event id in hex.

Qué responde

201 · application/json

The draft.

CampoTipoQué lleva
idintegerThe draft's id.
claim_tablestringThe table the payload is for: intel.annotations, intel.entities, intel.entity_relations or intel.events.
payloadobjectWhat the draft would write, as proposed.
proposed_bystringWho proposed it: an operator's id, npub:<hex>, key:<id> or account:<id>.
source_idstring o nullThe source it is published under on approval. Null when it names none.
lead_event_idstring o nullThe Community event that led to it, 64 hex. Null when none did.
statusstringWhere it stands: draft until a human approves or rejects it.
decided_bystring o nullThe operator who decided it. Null while it waits.
decided_atstring o nullWhen it was decided. Null while it waits.
reasonstring o nullWhy it was rejected. Null otherwise.
published_idinteger o nullThe id of the row the approval wrote, in the draft's table. Null until it is approved.
created_atstringWhen it was proposed.
guardstringWhy a pending draft would be held out of a batch; absent when nothing holds it.
esquema Draft
  • id integer — The draft's id.
  • claim_table string — The table the payload is for: intel.annotations, intel.entities, intel.entity_relations or intel.events.
  • payload object — What the draft would write, as proposed.
  • proposed_by string — Who proposed it: an operator's id, npub:<hex>, key:<id> or account:<id>.
  • source_id string | null — The source it is published under on approval. Null when it names none.
  • lead_event_id string | null — The Community event that led to it, 64 hex. Null when none did.
  • status string — Where it stands: draft until a human approves or rejects it. · uno de "draft", "approved", "rejected", "withdrawn"
  • decided_by string | null — The operator who decided it. Null while it waits.
  • decided_at string | null (date-time) — When it was decided. Null while it waits.
  • reason string | null — Why it was rejected. Null otherwise.
  • published_id integer | null — The id of the row the approval wrote, in the draft's table. Null until it is approved.
  • created_at string (date-time) — When it was proposed.
  • guard string — Why a pending draft would be held out of a batch; absent when nothing holds it.

Errores

EstadoCódigoCuándo
400invalid_inputA body outside the contract (invalid_input), named in the message, or a payload that holds a private key (a Nostr nsec1, a WIF key or an extended private key such as xprv): refused before anything is stored, and never repeated.
401unauthorizedunauthorized: 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.
403forbiddenforbidden: the caller is known but may not do this: a key without the scope or the tier the action needs, a session without an npub, a second factor or a recent sign-in, an operator without the role or switched off, or a source that does not allow it. The message says which.
429quota_exceededquota_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.

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/ops/drafts \
  -H "Authorization: Bearer $BTCINTEL_KEY" \
  -H 'Content-Type: application/json' \
  -d '{"claim_table":"intel.annotations","payload":{}}' | jq

This route needs an operator credential. Set BTCINTEL_KEY to the ops bearer or a btci_ key with the ops:agent scope first: the snippet reads it from there and holds no key.