# accountInvitations

```graphql
query AccountInvitations($input: AccountInvitationListInput!) {
  accountInvitations(input: $input) {
    data {
      id
      accountId
      email
      role
      status
      expiresAt
      invitedByUserId
      acceptedByUserId
      resolvedAt
      createdAt
    }
    pageInfo {
      self
      first
      next
      prev
    }
  }
}
```

List account invitations. Requires account.invitations.read.

## Arguments

| Name              | Type                        | Required | Description                                                 |
| ----------------- | --------------------------- | -------- | ----------------------------------------------------------- |
| `input`           | AccountInvitationListInput! | Yes      |                                                             |
| `input.accountId` | ID!                         | Yes      |                                                             |
| `input.cursor`    | String                      |          |                                                             |
| `input.limit`     | Int                         |          |                                                             |
| `input.status`    | String                      |          | Invitation status filter. Defaults to pending when omitted. |

## Variables

```json
{
  "input": {
    "accountId": "string"
  }
}
```

## Responses

| Status | Description                                            |
| ------ | ------------------------------------------------------ |
| 200    | The AccountInvitationList! in data.accountInvitations. |

## Call it

```bash
curl -X POST "https://api.veryfront.com/graphql" \
  -H "Authorization: Bearer $VERYFRONT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "query": "query AccountInvitations($input: AccountInvitationListInput!) {\n  accountInvitations(input: $input) {\n    data {\n      id\n      accountId\n      email\n      role\n      status\n      expiresAt\n      invitedByUserId\n      acceptedByUserId\n      resolvedAt\n      createdAt\n    }\n    pageInfo {\n      self\n      first\n      next\n      prev\n    }\n  }\n}",
  "variables": {
    "input": {
      "accountId": "string"
    }
  }
}'
```

## Example response

```json
{
  "data": {
    "accountInvitations": {
      "data": [
        {
          "id": "string",
          "accountId": "string",
          "email": "user@example.com",
          "role": "string",
          "status": "string",
          "expiresAt": "string",
          "invitedByUserId": "string",
          "acceptedByUserId": "string",
          "resolvedAt": "string",
          "createdAt": "string"
        }
      ],
      "pageInfo": {
        "self": "string",
        "first": "string",
        "next": "string",
        "prev": "string"
      }
    }
  }
}
```
