Delete own Community events through the API (NIP-09)
POST /v1/community/delete- quién puede llamarla
- Una sesión o una clave
- nivel t2 o superior · con el ámbito
community:publish· A session deletes as its own key; a key as one of itsallowed_npubs. - qué cuesta
- 1 petición de la cuota
- y cuenta para
publish_per_min,publish_per_day· Counted per author, and given back when the relay's door refuses the deletion. · niveles y claves - cuán reciente
- Nunca en caché
- cada respuesta lleva la altura del índice y la del nodo
En esta página
The body carries a kind 5 signed by the author naming the ids to delete in e tags; the same callers and binding as /v1/community/publish. Events held here by that author are marked deleted at once (the row stays for moderation; every read hides it), deleted counts them; the deletion is stored when it deleted something held and is broadcast outbound in any case, since a note that only public relays hold is the author's to delete there. A stranger's deletion deletes nothing. 501 not_configured while WRITES_ENABLED is off (on since 2026-09-29). Over MCP this is delete_community_event, with the same bearer binding.
Parámetros
| Nombre | Dónde | Tipo | Obligatorio | Qué hace |
|---|---|---|---|---|
event | cuerpo | object | obligatorio | A Nostr event exactly as signed (NIP-01); the server recomputes the id and verifies the signature. |
El cuerpo es application/json.
esquema EventEnvelope
eventobject obligatorio — A Nostr event exactly as signed (NIP-01); the server recomputes the id and verifies the signature.idstring obligatorio — The event's id, 64 hex: the SHA-256 of its NIP-01 serialisation.pubkeystring obligatorio — The author's public key, 64 hex. It must be a key the caller may publish as: a person's own, or one of a key'sallowed_npubs.created_atinteger obligatorio — When the event was made, unix seconds: at most 15 minutes ahead and 30 days back.kindinteger obligatorio — The event's kind: 1111 (a comment), 1985 (a label) or 5 (a deletion).POST /v1/community/deletetakes 5 alone.tagsarray de array de string obligatorio — The event's tags, at most 100. A comment and a label name their NIP-73bitcoin:subject here; a deletion names, inetags, the events it deletes.contentstring obligatorio — The event's text, at most 16,384 bytes; the tier's cap on the whole event can be lower.sigstring obligatorio — The author's Schnorr signature of the id, 128 hex.
Qué responde
200 · application/json
Nothing held was deleted (deleted: 0, stored: false) or the deletion was known already; broadcast still.
| Campo | Tipo | Qué lleva |
|---|---|---|
id | string | The event's id. |
pubkey | string | Its author's public key, 64 hex. |
kind | integer | Its kind. |
pow_bits | integer | Committed NIP-13 difficulty. |
stored | boolean | The event row exists on this relay. |
accepted_by | array | self when this relay holds it. |
broadcast_to | array | Outbound relays the event is being sent to (best effort, asynchronous). |
duplicate | boolean | True when this relay held the event already. |
deleted | integer | Deletions only: events of the author marked deleted here. |
_meta | object | The notice every Community answer carries: indexed from Nostr, never endorsed by btcintel. |
esquema PublishResult
idstring obligatorio — The event's id.pubkeystring obligatorio — Its author's public key, 64 hex.kindinteger obligatorio — Its kind.pow_bitsinteger obligatorio — Committed NIP-13 difficulty.storedboolean obligatorio — The event row exists on this relay.accepted_byarray de string obligatorio —selfwhen this relay holds it.broadcast_toarray de string obligatorio — Outbound relays the event is being sent to (best effort, asynchronous).duplicateboolean obligatorio — True when this relay held the event already.deletedinteger — Deletions only: events of the author marked deleted here._metaCommunityMeta obligatorio — The notice every Community answer carries: indexed from Nostr, never endorsed by btcintel.noticestring obligatorio — Always: Community content is indexed from Nostr and not endorsed by btcintel.endorsementboolean obligatorio — Always false.
201 · application/json
The deletion was stored (it deleted something held) and broadcast.
| Campo | Tipo | Qué lleva |
|---|---|---|
id | string | The event's id. |
pubkey | string | Its author's public key, 64 hex. |
kind | integer | Its kind. |
pow_bits | integer | Committed NIP-13 difficulty. |
stored | boolean | The event row exists on this relay. |
accepted_by | array | self when this relay holds it. |
broadcast_to | array | Outbound relays the event is being sent to (best effort, asynchronous). |
duplicate | boolean | True when this relay held the event already. |
deleted | integer | Deletions only: events of the author marked deleted here. |
_meta | object | The notice every Community answer carries: indexed from Nostr, never endorsed by btcintel. |
esquema PublishResult
idstring obligatorio — The event's id.pubkeystring obligatorio — Its author's public key, 64 hex.kindinteger obligatorio — Its kind.pow_bitsinteger obligatorio — Committed NIP-13 difficulty.storedboolean obligatorio — The event row exists on this relay.accepted_byarray de string obligatorio —selfwhen this relay holds it.broadcast_toarray de string obligatorio — Outbound relays the event is being sent to (best effort, asynchronous).duplicateboolean obligatorio — True when this relay held the event already.deletedinteger — Deletions only: events of the author marked deleted here._metaCommunityMeta obligatorio — The notice every Community answer carries: indexed from Nostr, never endorsed by btcintel.noticestring obligatorio — Always: Community content is indexed from Nostr and not endorsed by btcintel.endorsementboolean obligatorio — Always false.
Errores
| Estado | Código | Cuándo |
|---|---|---|
| 400 | invalid_input | Malformed input (invalid_input). |
| 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 | forbidden: 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. |
| 422 | event_rejected | The event was refused at the door (event_rejected): the message carries the relay's NIP-01 prefix — unbound: (not this caller's key), invalid: (shape, subject, window, size, signature), pow: (below the floor), blocked: (kind, banned, read-only). |
| 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. |
| 501 | not_configured | not_configured: this deployment does not run what the route needs, for example the mempool engine, accounts, the intel store or watchlists. The message names it. |
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/community/delete \
-H "Authorization: Bearer $BTCINTEL_KEY" \
-H 'Content-Type: application/json' \
-d '{"event":{"id":"…","pubkey":"…","created_at":10,"kind":10,"tags":[],"content":"…","sig":"…"}}' | 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.