btcintel

Delete own Community events through the API (NIP-09)

POST /v1/community/delete
who may call it
A session or a key
tier t2 or above · with the scope community:publish · A session deletes as its own key; a key as one of its allowed_npubs.
what it costs
1 request of the quota
and counts toward publish_per_min, publish_per_day · Counted per author, and given back when the relay's door refuses the deletion. · tiers and keys
how fresh
Never cached
every answer carries the index's height and the node's
MCP tool
delete_community_event
on the MCP server
On this page

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.

Parameters

NameWhereTypeRequiredWhat it does
eventbodyobjectrequiredA Nostr event exactly as signed (NIP-01); the server recomputes the id and verifies the signature.

The body is application/json.

schema EventEnvelope
  • event object required — A Nostr event exactly as signed (NIP-01); the server recomputes the id and verifies the signature.
    • id string required — The event's id, 64 hex: the SHA-256 of its NIP-01 serialisation.
    • pubkey string required — 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's allowed_npubs.
    • created_at integer required — When the event was made, unix seconds: at most 15 minutes ahead and 30 days back.
    • kind integer required — The event's kind: 1111 (a comment), 1985 (a label) or 5 (a deletion). POST /v1/community/delete takes 5 alone.
    • tags array of array of string required — The event's tags, at most 100. A comment and a label name their NIP-73 bitcoin: subject here; a deletion names, in e tags, the events it deletes.
    • content string required — The event's text, at most 16,384 bytes; the tier's cap on the whole event can be lower.
    • sig string required — The author's Schnorr signature of the id, 128 hex.

What it answers

200 · application/json

Nothing held was deleted (deleted: 0, stored: false) or the deletion was known already; broadcast still.

FieldTypeWhat it carries
idstringThe event's id.
pubkeystringIts author's public key, 64 hex.
kindintegerIts kind.
pow_bitsintegerCommitted NIP-13 difficulty.
storedbooleanThe event row exists on this relay.
accepted_byarrayself when this relay holds it.
broadcast_toarrayOutbound relays the event is being sent to (best effort, asynchronous).
duplicatebooleanTrue when this relay held the event already.
deletedintegerDeletions only: events of the author marked deleted here.
_metaobjectThe notice every Community answer carries: indexed from Nostr, never endorsed by btcintel.
schema PublishResult
  • id string required — The event's id.
  • pubkey string required — Its author's public key, 64 hex.
  • kind integer required — Its kind.
  • pow_bits integer required — Committed NIP-13 difficulty.
  • stored boolean required — The event row exists on this relay.
  • accepted_by array of string required — self when this relay holds it.
  • broadcast_to array of string required — Outbound relays the event is being sent to (best effort, asynchronous).
  • duplicate boolean required — True when this relay held the event already.
  • deleted integer — Deletions only: events of the author marked deleted here.
  • _meta CommunityMeta required — The notice every Community answer carries: indexed from Nostr, never endorsed by btcintel.
    • notice string required — Always: Community content is indexed from Nostr and not endorsed by btcintel.
    • endorsement boolean required — Always false.

201 · application/json

The deletion was stored (it deleted something held) and broadcast.

FieldTypeWhat it carries
idstringThe event's id.
pubkeystringIts author's public key, 64 hex.
kindintegerIts kind.
pow_bitsintegerCommitted NIP-13 difficulty.
storedbooleanThe event row exists on this relay.
accepted_byarrayself when this relay holds it.
broadcast_toarrayOutbound relays the event is being sent to (best effort, asynchronous).
duplicatebooleanTrue when this relay held the event already.
deletedintegerDeletions only: events of the author marked deleted here.
_metaobjectThe notice every Community answer carries: indexed from Nostr, never endorsed by btcintel.
schema PublishResult
  • id string required — The event's id.
  • pubkey string required — Its author's public key, 64 hex.
  • kind integer required — Its kind.
  • pow_bits integer required — Committed NIP-13 difficulty.
  • stored boolean required — The event row exists on this relay.
  • accepted_by array of string required — self when this relay holds it.
  • broadcast_to array of string required — Outbound relays the event is being sent to (best effort, asynchronous).
  • duplicate boolean required — True when this relay held the event already.
  • deleted integer — Deletions only: events of the author marked deleted here.
  • _meta CommunityMeta required — The notice every Community answer carries: indexed from Nostr, never endorsed by btcintel.
    • notice string required — Always: Community content is indexed from Nostr and not endorsed by btcintel.
    • endorsement boolean required — Always false.

Errors

StatusCodeWhen
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.
422event_rejectedThe 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).
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.
501not_configurednot_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.

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/community/delete \
  -H "Authorization: Bearer $BTCINTEL_KEY" \
  -H 'Content-Type: application/json' \
  -d '{"event":{"id":"…","pubkey":"…","created_at":10,"kind":10,"tags":[],"content":"…","sig":"…"}}' | jq

This 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.