btcintel

Hide or unhide an event, ban or unban a pubkey (ops, human admin or moderator)

POST /v1/ops/community/moderation
quién puede llamarla
Un operador
una persona: admin o moderator
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

Appends a row to the lens and applies it — hidden events and banned pubkeys' events leave every public read and the relay at once; nothing is deleted. Ids may be 64 hex characters or NIP-19 (note1…, npub1…). A pubkey never seen can be banned ahead of its first event. The vocabulary of reasons is the relay policy's moderation_reasons.

Parámetros

NombreDóndeTipoObligatorioQué hace
actioncuerpostringobligatorioWhat to do: hide or unhide an event (event_id), ban or unban a pubkey (pubkey).
event_idcuerpostringopcionalThe event to hide or unhide (64 hex or note1…).
pubkeycuerpostringopcionalThe pubkey to ban or unban (64 hex or npub1…).
reasoncuerpostringobligatorioOne of the policy's moderation_reasons, or legal:<reference>, or other:<text>.

El cuerpo es application/json.

esquema ModerationBody
  • action string obligatorio — What to do: hide or unhide an event (event_id), ban or unban a pubkey (pubkey). · uno de "hide", "unhide", "ban", "unban"
  • event_id string — The event to hide or unhide (64 hex or note1…).
  • pubkey string — The pubkey to ban or unban (64 hex or npub1…).
  • reason string obligatorio — One of the policy's moderation_reasons, or legal:<reference>, or other:<text>. · como mucho 500 caracteres

Qué responde

201 · application/json

The row appended.

CampoTipoQué lleva
idintegerThe moderation's id.
actionstringWhat was done: an event hidden or shown again, a pubkey banned or unbanned.
event_idstring64 hex characters (hide/unhide).
pubkeystring64 hex characters (ban/unban).
npubstring o nullThe pubkey as an npub. Only on a ban or an unban.
reasonstringWhy: a word of the policy's vocabulary, legal:<reference> or other:<text>.
actorstringoperator:<id>.
atstringWhen it was done.
esquema Moderation
  • id integer obligatorio — The moderation's id.
  • action string obligatorio — What was done: an event hidden or shown again, a pubkey banned or unbanned. · uno de "hide", "unhide", "ban", "unban"
  • event_id string — 64 hex characters (hide/unhide).
  • pubkey string — 64 hex characters (ban/unban).
  • npub string | null — The pubkey as an npub. Only on a ban or an unban.
  • reason string obligatorio — Why: a word of the policy's vocabulary, legal:<reference> or other:<text>.
  • actor string obligatorio — operator:<id>.
  • at string (date-time) obligatorio — When it was done.

Errores

EstadoCódigoCuándo
400invalid_inputMalformed input (invalid_input).
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.
404not_foundNo such event, or an unban of a pubkey that is not banned (not_found).
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/community/moderation \
  -H "Authorization: Bearer $BTCINTEL_KEY" \
  -H 'Content-Type: application/json' \
  -d '{"action":"hide","reason":"…"}' | 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.