# at.happyproto.admin.listInvites

> Published by [happyproto.at](https://lexicon.garden/identity/did:plc:mo7vq4jbioxwafy5zkcc3eux)

✓ This is the authoritative definition for this NSID.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:mo7vq4jbioxwafy5zkcc3eux/at.happyproto.admin.listInvites)
- [Documentation](https://lexicon.garden/lexicon/did:plc:mo7vq4jbioxwafy5zkcc3eux/at.happyproto.admin.listInvites/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:mo7vq4jbioxwafy5zkcc3eux/at.happyproto.admin.listInvites/examples)

## Definitions

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

**Type**: `object`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `createdAt` | `string` (datetime) | Yes |  |
| `createdBy` | `string` (did) | Yes |  |
| `email` | `string` | Yes |  |
| `expiresAt` | `string` (datetime) | Yes |  |
| `id` | `string` | Yes |  |
| `redeemedAt` | `string` (datetime) | No |  |
| `redeemedDid` | `string` (did) | No |  |
| `status` | `string` | Yes |  |

### `at.happyproto.admin.listInvites`

**Type**: `query`

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

#### Output

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `invites` | `array` | Yes |  |

#### Errors

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

## Raw 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
}
```
