# social.grain.unspecced.createGroup

> Start a group on Grain's group host. The host creates the group with the viewer as its founder and hands Grain its own session on it (fyi.opensocial.provisionGroup); Grain then gives the group its pool and its Grain profile. The viewer never leaves Grain.

- Kind: procedure
- Authority: unspecced.grain.social
- Lexicon: 1
- Published by [grain.social](https://lexicon.garden/identity/did:plc:e7rftrdyz5e2rw4y6ocszew2), the NSID's authority

## Links

- [Documentation](https://lexicon.garden/lexicon/did:plc:e7rftrdyz5e2rw4y6ocszew2/social.grain.unspecced.createGroup)
- [Schema JSON](https://lexicon.garden/lexicon/did:plc:e7rftrdyz5e2rw4y6ocszew2/social.grain.unspecced.createGroup/schema.json)
- [Analytics](https://lexicon.garden/lexicon/did:plc:e7rftrdyz5e2rw4y6ocszew2/social.grain.unspecced.createGroup/analytics)

## Procedure (`social.grain.unspecced.createGroup`)

Type: procedure · POST

### Input (application/json)

- `description` (string)
  - Constraints: maxLength: 3000, maxGraphemes: 300
- `displayName` (string, required)
  - Constraints: maxLength: 640, maxGraphemes: 64
- `name` (string, required): The first label of the group's handle, 3 to 18 characters; the host supplies its domain.
  - Constraints: minLength: 3, maxLength: 18

### Output (application/json)

- `did` (string · did, required)
- `handle` (string · handle, required)

## Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "Start a group on Grain's group host. The host creates the group with the viewer as its founder and hands Grain its own session on it (fyi.opensocial.provisionGroup); Grain then gives the group its pool and its Grain profile. The viewer never leaves Grain.",
      "input": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "description": {
              "maxGraphemes": 300,
              "maxLength": 3000,
              "type": "string"
            },
            "displayName": {
              "maxGraphemes": 64,
              "maxLength": 640,
              "type": "string"
            },
            "name": {
              "description": "The first label of the group's handle, 3 to 18 characters; the host supplies its domain.",
              "maxLength": 18,
              "minLength": 3,
              "type": "string"
            }
          },
          "required": [
            "name",
            "displayName"
          ],
          "type": "object"
        }
      },
      "output": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "did": {
              "format": "did",
              "type": "string"
            },
            "handle": {
              "format": "handle",
              "type": "string"
            }
          },
          "required": [
            "did",
            "handle"
          ],
          "type": "object"
        }
      },
      "type": "procedure"
    }
  },
  "id": "social.grain.unspecced.createGroup",
  "lexicon": 1
}
```
