# accounts

```graphql
query Accounts($input: ListAccountsInput!) {
  accounts(input: $input) {
    data {
      id
      slug
      name
      kind
      createdAt
      updatedAt
    }
    pageInfo {
      self
      first
      next
      prev
    }
  }
}
```

List the personal and team accounts the caller belongs to, oldest first, with the caller's role and capabilities in each.

## Arguments

| Name           | Type               | Required | Description |
| -------------- | ------------------ | -------- | ----------- |
| `input`        | ListAccountsInput! | Yes      |             |
| `input.cursor` | String             |          |             |
| `input.limit`  | Int                |          |             |
| `input.slug`   | String             |          |             |

## Variables

```json
{
  "input": {}
}
```

## Responses

| Status | Description                        |
| ------ | ---------------------------------- |
| 200    | The AccountList! in data.accounts. |

## 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 Accounts($input: ListAccountsInput!) {\n  accounts(input: $input) {\n    data {\n      id\n      slug\n      name\n      kind\n      createdAt\n      updatedAt\n    }\n    pageInfo {\n      self\n      first\n      next\n      prev\n    }\n  }\n}",
  "variables": {
    "input": {}
  }
}'
```

## Example response

```json
{
  "data": {
    "accounts": {
      "data": [
        {
          "id": "string",
          "slug": "string",
          "name": "string",
          "kind": "string",
          "createdAt": "string",
          "updatedAt": "string"
        }
      ],
      "pageInfo": {
        "self": "string",
        "first": "string",
        "next": "string",
        "prev": "string"
      }
    }
  }
}
```
