{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/sendly-now/json-schema/sendly-now-campaign-v1-failure-list-schema.json",
  "title": "CampaignV1FailureList",
  "description": "Cursor-paginated list of a campaign's failed sends.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/sendly-now-campaigns-api-openapi.yml#/components/schemas/CampaignV1FailureList",
  "properties": {
    "data": {
      "items": {
        "$ref": "#/$defs/CampaignV1Failure"
      },
      "type": "array"
    },
    "has_more": {
      "type": "boolean"
    },
    "next_cursor": {
      "description": "Pass as `after` to fetch the next page. `null` on the last page.",
      "type": [
        "string",
        "null"
      ]
    },
    "total": {
      "description": "Every FAILED row on this campaign, not just this page.",
      "type": "integer"
    }
  },
  "required": [
    "data",
    "has_more",
    "next_cursor",
    "total"
  ],
  "type": "object",
  "$defs": {
    "CampaignV1Failure": {
      "description": "A campaign recipient whose send did not complete.",
      "properties": {
        "contact_id": {
          "format": "uuid",
          "type": "string"
        },
        "email": {
          "description": "The recipient the send was for.",
          "type": "string"
        },
        "failed_at": {
          "format": "date-time",
          "type": "string"
        },
        "id": {
          "description": "Ledger row id. Pass the last one as `after` to page.",
          "format": "uuid",
          "type": "string"
        },
        "reason": {
          "type": [
            "string",
            "null"
          ]
        }
      },
      "required": [
        "id",
        "contact_id",
        "email",
        "reason",
        "failed_at"
      ],
      "type": "object"
    }
  }
}