# accountMembers

```graphql
query AccountMembers($input: AccountPageInput!) {
  accountMembers(input: $input) {
    data {
      membershipId
      userId
      email
      name
      avatarSrc
      role
      invitedByUserId
      createdAt
      updatedAt
    }
    pageInfo {
      self
      first
      next
      prev
    }
  }
}
```

List the members of an account with their roles, oldest first. Requires account.members.read.

## Arguments

| Name              | Type              | Required | Description |
| ----------------- | ----------------- | -------- | ----------- |
| `input`           | AccountPageInput! | Yes      |             |
| `input.accountId` | ID!               | Yes      |             |
| `input.cursor`    | String            |          |             |
| `input.limit`     | Int               |          |             |

## Variables

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

## Responses

| Status | Description                                    |
| ------ | ---------------------------------------------- |
| 200    | The AccountMemberList! in data.accountMembers. |

## 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 AccountMembers($input: AccountPageInput!) {\n  accountMembers(input: $input) {\n    data {\n      membershipId\n      userId\n      email\n      name\n      avatarSrc\n      role\n      invitedByUserId\n      createdAt\n      updatedAt\n    }\n    pageInfo {\n      self\n      first\n      next\n      prev\n    }\n  }\n}",
  "variables": {
    "input": {
      "accountId": "string"
    }
  }
}'
```

## Example response

```json
{
  "data": {
    "accountMembers": {
      "data": [
        {
          "membershipId": "string",
          "userId": "string",
          "email": "user@example.com",
          "name": "string",
          "avatarSrc": "string",
          "role": "string",
          "invitedByUserId": "string",
          "createdAt": "string",
          "updatedAt": "string"
        }
      ],
      "pageInfo": {
        "self": "string",
        "first": "string",
        "next": "string",
        "prev": "string"
      }
    }
  }
}
```
