Skip to content

Kind 9008: Group Deletion

Overview

This event is used to delete or deactivate an entire relay-based group. It signals that a group should no longer be active or visible to users.

Specification

PropertyValue
Kind Number9008
Event RangeRegular
Defined inNIP-29

Content Format

The content field can contain an optional reason for deleting the group.

Schema

"optional reason"

Tags

Tag NameDescriptionFormatRequired
hGroup identifier["h", "<group-id>"]Yes
previousTimeline references["previous", "<event-id-prefix>"]No, but recommended

Client Behavior

Clients with appropriate permissions (typically the group owner or a relay administrator) can send this event to delete a group. The client should include the group ID in the h tag.

Clients should include timeline references in the previous tag to prevent messages from being used out of context.

When receiving this event, clients should remove the group from their UI or mark it as deleted/inactive.

Relay Behavior

Relays should validate that:

  1. The sender has the appropriate permissions to delete the group.
  2. The event contains a valid h tag with the group ID.
  3. The timeline references in the previous tag, if present, refer to events in the relay's database.

If validation succeeds, the relay should process the event and mark the group as deleted. Depending on the relay's implementation, this might involve removing the group data from storage or just marking it as inactive.

Use Cases

  • Removing a group that is no longer needed.
  • Closing a group that has served its purpose.
  • Deleting a group that violates relay policies.

Example

json
{
  "id": "...",
  "pubkey": "1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
  "created_at": 1671217411,
  "kind": 9008,
  "tags": [
    ["h", "vegans-united"],
    ["previous", "a1b2c3d4"]
  ],
  "content": "Closing this group as we're merging with the larger Food Enthusiasts group",
  "sig": "..."
}

References

Notes

The event should only be accepted by relays if it comes from a user with appropriate permissions (e.g., the group owner or a relay administrator).

After processing this event, the relay might choose to permanently delete all group data or simply mark the group as inactive while preserving its history, depending on the relay's policies.