# rsvp.atmo.space.admin.createSpace

> Published by [atmo.rsvp](https://lexicon.garden/identity/did:plc:b63bmauox6z5rbibwrhxrdnw)

✓ This is the authoritative definition for this NSID.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:b63bmauox6z5rbibwrhxrdnw/rsvp.atmo.space.admin.createSpace)
- [Documentation](https://lexicon.garden/lexicon/did:plc:b63bmauox6z5rbibwrhxrdnw/rsvp.atmo.space.admin.createSpace/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:b63bmauox6z5rbibwrhxrdnw/rsvp.atmo.space.admin.createSpace/examples)

## Definitions

### `rsvp.atmo.space.admin.createSpace`

**Type**: `procedure`

Create a new space owned by the JWT issuer. The caller is added as an owner-perm member.

#### Input

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `key` | `string` | No | Space key. Auto-generated (TID) if omitted. |
| `type` | `string` (nsid) | No | Space type NSID. Defaults to the service's configured type. |
| `appPolicy` | `ref` → `rsvp.atmo.space.defs#appPolicy` | No |  |
| `appPolicyRef` | `string` (at-uri) | No |  |
| `memberListRef` | `string` (at-uri) | No |  |

#### Output

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `space` | `ref` → `rsvp.atmo.space.defs#spaceView` | Yes |  |

#### Errors

- **AlreadyExists**

## Raw Schema

```json
{
  "id": "rsvp.atmo.space.admin.createSpace",
  "defs": {
    "main": {
      "type": "procedure",
      "input": {
        "schema": {
          "type": "object",
          "properties": {
            "key": {
              "type": "string",
              "description": "Space key. Auto-generated (TID) if omitted."
            },
            "type": {
              "type": "string",
              "format": "nsid",
              "description": "Space type NSID. Defaults to the service's configured type."
            },
            "appPolicy": {
              "ref": "rsvp.atmo.space.defs#appPolicy",
              "type": "ref"
            },
            "appPolicyRef": {
              "type": "string",
              "format": "at-uri"
            },
            "memberListRef": {
              "type": "string",
              "format": "at-uri"
            }
          }
        },
        "encoding": "application/json"
      },
      "errors": [
        {
          "name": "AlreadyExists"
        }
      ],
      "output": {
        "schema": {
          "type": "object",
          "required": [
            "space"
          ],
          "properties": {
            "space": {
              "ref": "rsvp.atmo.space.defs#spaceView",
              "type": "ref"
            }
          }
        },
        "encoding": "application/json"
      },
      "description": "Create a new space owned by the JWT issuer. The caller is added as an owner-perm member."
    }
  },
  "$type": "com.atproto.lexicon.schema",
  "lexicon": 1
}
```
