# rsvp.atmo.space.invite.create

> 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.invite.create)
- [Documentation](https://lexicon.garden/lexicon/did:plc:b63bmauox6z5rbibwrhxrdnw/rsvp.atmo.space.invite.create/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:b63bmauox6z5rbibwrhxrdnw/rsvp.atmo.space.invite.create/examples)

## Definitions

### `rsvp.atmo.space.invite.create`

**Type**: `procedure`

Create an invite for a space. Caller must be the space owner. Returns the raw token once; only the hash is stored.

#### Input

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `note` | `string` | No |  |
| `perms` | `string` | No |  |
| `maxUses` | `integer` | No | Omit for unlimited uses. |
| `spaceUri` | `string` (at-uri) | Yes |  |
| `expiresAt` | `integer` | No | Unix ms timestamp. Omit for no expiry. |

#### Output

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `token` | `string` | Yes | Raw token. Shown once — cannot be retrieved later. |
| `invite` | `ref` → `rsvp.atmo.space.defs#inviteView` | Yes |  |

#### Errors

- **NotFound**
- **Forbidden**

## Raw Schema

```json
{
  "id": "rsvp.atmo.space.invite.create",
  "defs": {
    "main": {
      "type": "procedure",
      "input": {
        "schema": {
          "type": "object",
          "required": [
            "spaceUri"
          ],
          "properties": {
            "note": {
              "type": "string",
              "maxLength": 500
            },
            "perms": {
              "type": "string",
              "default": "write",
              "knownValues": [
                "read",
                "write"
              ]
            },
            "maxUses": {
              "type": "integer",
              "minimum": 1,
              "description": "Omit for unlimited uses."
            },
            "spaceUri": {
              "type": "string",
              "format": "at-uri"
            },
            "expiresAt": {
              "type": "integer",
              "description": "Unix ms timestamp. Omit for no expiry."
            }
          }
        },
        "encoding": "application/json"
      },
      "errors": [
        {
          "name": "NotFound"
        },
        {
          "name": "Forbidden"
        }
      ],
      "output": {
        "schema": {
          "type": "object",
          "required": [
            "token",
            "invite"
          ],
          "properties": {
            "token": {
              "type": "string",
              "description": "Raw token. Shown once — cannot be retrieved later."
            },
            "invite": {
              "ref": "rsvp.atmo.space.defs#inviteView",
              "type": "ref"
            }
          }
        },
        "encoding": "application/json"
      },
      "description": "Create an invite for a space. Caller must be the space owner. Returns the raw token once; only the hash is stored."
    }
  },
  "$type": "com.atproto.lexicon.schema",
  "lexicon": 1
}
```
