# listFailedTexts

Outbound texts that FAILED in a window, grouped by the carrier's error code (30007 carrier filtered, 30003 unreachable, 30006 landline, ...): count, one sample provider message and the latest failure per code, most first; total is every failure. since (inclusive) and until (exclusive) as ISO datetimes WITH an offset, resolved in the person's zone; at most 93 days, a wider window is refused. Same visibility as countOutboundTexts: with VIEW_ALL_PHONES the whole organization (or the userIds named), otherwise only the texts on the person's own rows, so say so. A null errorCode means the provider gave none.

- Call: `POST https://server.goliathdata.com/api/v1/call` with `{ "operationId": "listFailedTexts", "variables": {...} }`
- Scope: `READ`
- Type: query
- Idempotency: a read; rejects `Idempotency-Key`
- Rate-limited: no

## Variables

- `since`: `DateTime!` (required)
- `until`: `DateTime!` (required)
- `userIds`: `[ID!]`

## Response (data, an example)

```json
{
  "teamAnalyticsQuery": {
    "failedTexts": {
      "startDate": "2026-01-01T00:00:00.000Z",
      "endDate": "2026-01-01T00:00:00.000Z",
      "total": 0,
      "groups": [
        {
          "errorCode": "…",
          "count": 0,
          "sampleErrorMessage": "…",
          "latestAt": "2026-01-01T00:00:00.000Z"
        }
      ]
    }
  }
}
```

## Example

```bash
curl https://server.goliathdata.com/api/v1/call \
  -H "Authorization: Bearer $GOLIATH_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "operationId": "listFailedTexts",
    "variables": {
      "since": "2026-01-01T00:00:00.000Z",
      "until": "2026-01-01T00:00:00.000Z"
    }
  }'
```
