# ai.newnal.illi.home.createInvite

> Published by [illi-service.newnal.id](https://lexicon.garden/identity/did:plc:uztm7bi2ce42dez3uu3qafro)

✓ This is the authoritative definition for this NSID.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:uztm7bi2ce42dez3uu3qafro/ai.newnal.illi.home.createInvite)
- [Documentation](https://lexicon.garden/lexicon/did:plc:uztm7bi2ce42dez3uu3qafro/ai.newnal.illi.home.createInvite/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:uztm7bi2ce42dez3uu3qafro/ai.newnal.illi.home.createInvite/examples)

## Definitions

### `ai.newnal.illi.home.createInvite`

**Type**: `procedure`

Create an invite link (root admin). The token is shown once and delivered by hand.

#### Input

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `expiresInDays` | `integer` | No |  |
| `homeId` | `string` (tid) | Yes |  |
| `maxUses` | `integer` | No |  |
| `note` | `string` | No |  |

#### Output

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `expiresAt` | `string` (datetime) | Yes |  |
| `inviteId` | `string` | Yes |  |
| `inviteUrl` | `string` (uri) | Yes |  |
| `maxUses` | `integer` | Yes |  |

#### Errors

- **NotRootAdmin**
- **HomeNotFound**

## Raw Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "Create an invite link (root admin). The token is shown once and delivered by hand.",
      "errors": [
        {
          "name": "NotRootAdmin"
        },
        {
          "name": "HomeNotFound"
        }
      ],
      "input": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "expiresInDays": {
              "default": 7,
              "maximum": 30,
              "minimum": 1,
              "type": "integer"
            },
            "homeId": {
              "format": "tid",
              "type": "string"
            },
            "maxUses": {
              "default": 1,
              "maximum": 20,
              "minimum": 1,
              "type": "integer"
            },
            "note": {
              "maxLength": 120,
              "type": "string"
            }
          },
          "required": [
            "homeId"
          ],
          "type": "object"
        }
      },
      "output": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "expiresAt": {
              "format": "datetime",
              "type": "string"
            },
            "inviteId": {
              "type": "string"
            },
            "inviteUrl": {
              "format": "uri",
              "type": "string"
            },
            "maxUses": {
              "type": "integer"
            }
          },
          "required": [
            "inviteId",
            "inviteUrl",
            "expiresAt",
            "maxUses"
          ],
          "type": "object"
        }
      },
      "type": "procedure"
    }
  },
  "id": "ai.newnal.illi.home.createInvite",
  "lexicon": 1
}
```
