Skip to content

Kind 9022: Group Leave Request

Overview

This event is used by users to request to leave a relay-based group. It functions as a formal notification that a user wishes to be removed from a group's membership.

Specification

PropertyValue
Kind Number9022
Event RangeRegular
Defined inNIP-29

Content Format

The content field can contain an optional reason or message explaining why the user wants to leave the group.

Schema

"optional reason"

Tags

Tag NameDescriptionFormatRequired
hGroup identifier["h", "<group-id>"]Yes

Client Behavior

Users can send this event to request to leave a group. The client should include the group ID in the h tag.

Relay Behavior

Relays should validate that:

  1. The event contains a valid h tag with the group ID.
  2. The user is currently a member of the group.

After validation, the relay will automatically issue a kind 9001 (Group User Removal) event in response, removing the user from the group.

Use Cases

  • Leaving a group that a user is no longer interested in.
  • Removing oneself from a group due to excessive noise or irrelevant content.
  • Departing from a group after completing a project or collaboration.

Example

json
{
  "id": "...",
  "pubkey": "1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
  "created_at": 1671217411,
  "kind": 9022,
  "tags": [
    ["h", "vegans-united"]
  ],
  "content": "I'm leaving the group as I'm focusing more on pasta-making these days",
  "sig": "..."
}

References

Notes

According to NIP-29, when a user sends a leave request, the relay will automatically issue a kind 9001 event in response, removing the user from the group. This process is meant to be automatic and doesn't require administrator approval.