Skip to content

Kind 9007: Group Creation

Overview

This event is used to create a new relay-based group. It establishes the initial settings and properties of the group.

Specification

PropertyValue
Kind Number9007
Event RangeRegular
Defined inNIP-29

Content Format

The content field can contain an optional reason or description for creating the group.

Schema

"optional reason"

Tags

Tag NameDescriptionFormatRequired
hGroup identifier["h", "<group-id>"]Yes
nameGroup name["name", "<group-name>"]No
pictureGroup picture URL["picture", "<picture-url>"]No
aboutGroup description["about", "<description>"]No
public or privateGroup visibility["public"] or ["private"]No
open or closedGroup join policy["open"] or ["closed"]No
previousTimeline references["previous", "<event-id-prefix>"]Not applicable for new groups

Client Behavior

Clients with appropriate permissions can send this event to create a new group. The client should include a randomly generated or specified group ID in the h tag and any initial metadata fields as additional tags.

Relay Behavior

Relays should validate that:

  1. The sender has the appropriate permissions to create groups on the relay.
  2. The event contains a valid h tag with a group ID that doesn't already exist.
  3. The group ID follows the recommended format (using characters a-z0-9-_ and preferably being random to avoid name collisions).

If validation succeeds, the relay should:

  1. Create the new group with the specified properties.
  2. Generate the corresponding kind 39000 (group metadata) event.
  3. Add the creator as a member and possibly an admin by generating the appropriate kind 39001 (group admins) and kind 39002 (group members) events.

Use Cases

  • Creating a new topical discussion group.
  • Establishing a private group for a specific community or team.
  • Setting up a public announcement channel.

Example

json
{
  "id": "...",
  "pubkey": "1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
  "created_at": 1671217411,
  "kind": 9007,
  "tags": [
    ["h", "vegans-united"],
    ["name", "Vegans United"],
    ["about", "A place where vegans fight with each other"],
    ["picture", "https://vegans-united.com/new-logo.png"],
    ["public"],
    ["open"]
  ],
  "content": "Creating a new group for vegan enthusiasts around the world",
  "sig": "..."
}

References

Notes

According to NIP-29, there is technically "no way to create a group" in the sense that relays will create rules around specific IDs that can serve as groups. This event serves as a standardized way to request the relay to set up those rules for a new group.

The group identifier should follow the format described in NIP-29, which allows for identification as <host>'<group-id>. For example, a group with ID abcdef hosted at relay wss://groups.nostr.com would be identified by the string groups.nostr.com'abcdef.