# Failures

> Part of the Cowliss docs. Markdown for every page: append `index.md` to its URL. Site map: /llms.txt

<!-- GENERATED by apps/docs/scripts/generate-api-reference.ts. Do not edit. Regenerate with `pnpm -F cowliss-docs generate`. -->

A failed delivery is one that `bounced`, drew a complaint or `failed` outright, dry runs excluded, counted on the day it was recorded. A failed execution is an automation run that stopped with an error, counted on the day it stopped. Both are read-only views over the [delivery log](/reference/api/deliveries/) and the [executions](/reference/api/executions/), windowed to the last `days` UTC days ending today, so there is nothing here to resolve or dismiss.

## GET /v1/failures/stats

Failed deliveries and executions per day, and the newest ones

**Auth:** Session token.

**Query parameters**

```json
{
  "days": 30
}
```

| Field | Type | Required | Constraints |
| --- | --- | --- | --- |
| `days` | integer | no | default `30`; 1 ≤ x ≤ 90 |

**Response 200**

```json
{
  "data": {
    "days": 1,
    "volume": [
      {
        "day": "string",
        "deliveries": 42,
        "executions": 42
      }
    ],
    "recent": [
      {
        "type": "delivery",
        "id": "string",
        "at": "2026-01-15T09:30:00.000Z",
        "appId": "string",
        "automation": "string",
        "step": "string",
        "error": "string"
      }
    ]
  },
  "meta": {
    "requestId": "string",
    "nextCursor": "string",
    "hasMore": true,
    "warnings": [
      {
        "code": "string",
        "message": "string",
        "suggestion": "string"
      }
    ]
  }
}
```

| Field | Type | Required | Constraints |
| --- | --- | --- | --- |
| `data` | object | yes |  |
| `data.days` | integer | yes | 1 ≤ x ≤ 90 |
| `data.volume` | object[] | yes |  |
| `data.volume[]` | object | yes |  |
| `data.volume[].day` | string | yes |  |
| `data.volume[].deliveries` | integer | yes | 0 ≤ x ≤ ∞ |
| `data.volume[].executions` | integer | yes | 0 ≤ x ≤ ∞ |
| `data.recent` | object[] | yes |  |
| `data.recent[]` | object | yes |  |
| `data.recent[].type` | "delivery" \| "execution" | yes |  |
| `data.recent[].id` | string | yes |  |
| `data.recent[].at` | string (date-time) | yes |  |
| `data.recent[].appId` | string \| null | yes |  |
| `data.recent[].automation` | string \| null | yes |  |
| `data.recent[].step` | string \| null | yes |  |
| `data.recent[].error` | string \| null | yes |  |
| `meta` | object | no |  |
| `meta.requestId` | string | no |  |
| `meta.nextCursor` | string \| null | no |  |
| `meta.hasMore` | boolean | no |  |
| `meta.warnings` | object[] | no |  |
| `meta.warnings[]` | object | no |  |
| `meta.warnings[].code` | string | yes |  |
| `meta.warnings[].message` | string | yes |  |
| `meta.warnings[].suggestion` | string | no |  |

Errors follow the [shared envelope and code table](/api-conventions/#errors).
