# at.happyproto.admin.listInvites

> Every customer invite, newest first: the address it went to, whether it is pending, expired or redeemed, and by which account. Staff only.

- Kind: query
- Authority: admin.happyproto.at
- Lexicon: 1
- Published by [happyproto.at](https://lexicon.garden/identity/did:plc:mo7vq4jbioxwafy5zkcc3eux), the NSID's authority

## Links

- [Documentation](https://lexicon.garden/lexicon/did:plc:mo7vq4jbioxwafy5zkcc3eux/at.happyproto.admin.listInvites)
- [Schema JSON](https://lexicon.garden/lexicon/did:plc:mo7vq4jbioxwafy5zkcc3eux/at.happyproto.admin.listInvites/schema.json)
- [Analytics](https://lexicon.garden/lexicon/did:plc:mo7vq4jbioxwafy5zkcc3eux/at.happyproto.admin.listInvites/analytics)

## Query (`at.happyproto.admin.listInvites`)

Type: query · GET

### Output (application/json)

- `invites` (array, required)
  - `items` (ref)
    - Reference: `#invite`

### Errors

- `AuthRequired`: This endpoint requires an authenticated caller.
- `Forbidden`: The caller is not HappyProto staff.
- `Upstream`: The provisioner could not be reached, or refused.

## #invite (`at.happyproto.admin.listInvites#invite`)

Type: object

### Properties

- `createdAt` (string · datetime, required)
- `createdBy` (string · did, required)
- `email` (string, required)
- `expiresAt` (string · datetime, required)
- `id` (string, required)
- `redeemedAt` (string · datetime)
- `redeemedDid` (string · did)
- `status` (string, required)
  - Constraints: knownValues: pending | expired | redeemed

## Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "invite": {
      "properties": {
        "createdAt": {
          "format": "datetime",
          "type": "string"
        },
        "createdBy": {
          "format": "did",
          "type": "string"
        },
        "email": {
          "type": "string"
        },
        "expiresAt": {
          "format": "datetime",
          "type": "string"
        },
        "id": {
          "type": "string"
        },
        "redeemedAt": {
          "format": "datetime",
          "type": "string"
        },
        "redeemedDid": {
          "format": "did",
          "type": "string"
        },
        "status": {
          "knownValues": [
            "pending",
            "expired",
            "redeemed"
          ],
          "type": "string"
        }
      },
      "required": [
        "id",
        "email",
        "status",
        "createdBy",
        "createdAt",
        "expiresAt"
      ],
      "type": "object"
    },
    "main": {
      "description": "Every customer invite, newest first: the address it went to, whether it is pending, expired or redeemed, and by which account. Staff only.",
      "errors": [
        {
          "description": "This endpoint requires an authenticated caller.",
          "name": "AuthRequired"
        },
        {
          "description": "The caller is not HappyProto staff.",
          "name": "Forbidden"
        },
        {
          "description": "The provisioner could not be reached, or refused.",
          "name": "Upstream"
        }
      ],
      "output": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "invites": {
              "items": {
                "ref": "#invite",
                "type": "ref"
              },
              "type": "array"
            }
          },
          "required": [
            "invites"
          ],
          "type": "object"
        }
      },
      "type": "query"
    }
  },
  "id": "at.happyproto.admin.listInvites",
  "lexicon": 1
}
```
