Appearance
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
Property | Value |
---|---|
Kind Number | 9007 |
Event Range | Regular |
Defined in | NIP-29 |
Content Format
The content
field can contain an optional reason or description for creating the group.
Schema
"optional reason"
Tags
Tag Name | Description | Format | Required |
---|---|---|---|
h | Group identifier | ["h", "<group-id>"] | Yes |
name | Group name | ["name", "<group-name>"] | No |
picture | Group picture URL | ["picture", "<picture-url>"] | No |
about | Group description | ["about", "<description>"] | No |
public or private | Group visibility | ["public"] or ["private"] | No |
open or closed | Group join policy | ["open"] or ["closed"] | No |
previous | Timeline 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:
- The sender has the appropriate permissions to create groups on the relay.
- The event contains a valid
h
tag with a group ID that doesn't already exist. - 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:
- Create the new group with the specified properties.
- Generate the corresponding kind 39000 (group metadata) event.
- 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
Related Kinds
- Kind 9008: Group Deletion
- Kind 39000: Group Metadata
- Kind 39001: Group Admins
- Kind 39002: Group Members
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
.