# club.hellyeah.invite

> Spends one of the caller's invites to add an account to the allowlist. A handle is resolved to its DID now, and only the DID is stored. Requires service auth from a member.

- Kind: procedure
- Authority: hellyeah.club
- Lexicon: 1
- Published by [hellyeah.club](https://lexicon.garden/identity/did:plc:ce2gpmv3q5a4xlnpt63e4nsn), the NSID's authority

## Links

- [Documentation](https://lexicon.garden/lexicon/did:plc:ce2gpmv3q5a4xlnpt63e4nsn/club.hellyeah.invite)
- [Schema JSON](https://lexicon.garden/lexicon/did:plc:ce2gpmv3q5a4xlnpt63e4nsn/club.hellyeah.invite/schema.json)
- [Analytics](https://lexicon.garden/lexicon/did:plc:ce2gpmv3q5a4xlnpt63e4nsn/club.hellyeah.invite/analytics)

## Procedure (`club.hellyeah.invite`)

Type: procedure · POST

### Input (application/json)

- `actor` (string · at-identifier, required)

### Output (application/json)

- `did` (string · did, required): The account now on the allowlist.
- `invites` (integer, required): The caller's unused invites after this one.
  - Constraints: minimum: 0

### Errors

- `NotMember`: The caller isn't on the allowlist.
- `NoInvites`: The caller has no unused invites.
- `AlreadyMember`: The account is already on the allowlist. No invite was spent.
- `Removed`: The account was removed; only an admin can add it back.
- `ActorNotFound`: No description in schema.

## Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "Spends one of the caller's invites to add an account to the allowlist. A handle is resolved to its DID now, and only the DID is stored. Requires service auth from a member.",
      "errors": [
        {
          "description": "The caller isn't on the allowlist.",
          "name": "NotMember"
        },
        {
          "description": "The caller has no unused invites.",
          "name": "NoInvites"
        },
        {
          "description": "The account is already on the allowlist. No invite was spent.",
          "name": "AlreadyMember"
        },
        {
          "description": "The account was removed; only an admin can add it back.",
          "name": "Removed"
        },
        {
          "name": "ActorNotFound"
        }
      ],
      "input": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "actor": {
              "format": "at-identifier",
              "type": "string"
            }
          },
          "required": [
            "actor"
          ],
          "type": "object"
        }
      },
      "output": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "did": {
              "description": "The account now on the allowlist.",
              "format": "did",
              "type": "string"
            },
            "invites": {
              "description": "The caller's unused invites after this one.",
              "minimum": 0,
              "type": "integer"
            }
          },
          "required": [
            "did",
            "invites"
          ],
          "type": "object"
        }
      },
      "type": "procedure"
    }
  },
  "id": "club.hellyeah.invite",
  "lexicon": 1
}
```
