# Read Waiting Contact Counts

Reads how many contacts are waiting at which action of one automation right now, with the action ID, type and name, most contacts first; an action nobody waits at is not listed. The counts are an observation, not a completion receipt for a queued move. Only automations: a newsletter or autoresponder ID is refused. Reads only.

## Input schema:

```json
{
  "type": "object",
  "properties": {
    "automationId": {
      "type": "integer",
      "description": "ID of the automation; a newsletter or autoresponder ID is refused",
      "minimum": 1
    },
    "accountId": {
      "type": [
        "null",
        "integer"
      ],
      "description": "User ID of the account; omit for the account the access token works in",
      "default": null,
      "minimum": 1
    }
  },
  "required": [
    "automationId"
  ],
  "additionalProperties": false
}
```

## Output schema:

```json
{
  "type": "object",
  "required": [
    "automationId",
    "name",
    "waiting",
    "total"
  ],
  "properties": {
    "automationId": {
      "type": "integer"
    },
    "name": {
      "type": "string"
    },
    "waiting": {
      "type": "array",
      "description": "Only the actions at which at least one contact is waiting, most contacts first.",
      "items": {
        "type": "object",
        "required": [
          "actionId",
          "type",
          "name",
          "contacts"
        ],
        "properties": {
          "actionId": {
            "type": "integer"
          },
          "type": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "contacts": {
            "type": "integer"
          }
        }
      }
    },
    "total": {
      "type": "integer"
    }
  }
}
```

