# Search Newsletters

Searches email newsletters by name, delivery status or creation/dispatch dates, newest first and cursor-paginated. Drafts have no dispatch date; split tests have no single email ID. Excludes SMS newsletters and follow-ups.

## Input schema:

```json
{
  "type": "object",
  "properties": {
    "query": {
      "type": [
        "null",
        "string"
      ],
      "description": "Text the name of a newsletter has to contain; omit to list them all",
      "default": null,
      "maxLength": 250
    },
    "status": {
      "type": [
        "null",
        "string"
      ],
      "description": "Only newsletters in this delivery state: \"draft\", \"scheduled\", \"outgoing\" or \"sent\"",
      "default": null,
      "enum": [
        "draft",
        "scheduled",
        "outgoing",
        "sent"
      ]
    },
    "createdFrom": {
      "type": [
        "null",
        "string"
      ],
      "description": "Created at or after this moment, ISO 8601 with UTC offset (\"2026-09-01T10:00:00+02:00\")",
      "default": null,
      "pattern": "^\\d{4}-\\d{2}-\\d{2}[Tt ]\\d{2}:\\d{2}(:\\d{2})?([Zz]|[+-]\\d{2}:?\\d{2})$"
    },
    "createdBefore": {
      "type": [
        "null",
        "string"
      ],
      "description": "Only newsletters created before this moment, exclusive, same format",
      "default": null,
      "pattern": "^\\d{4}-\\d{2}-\\d{2}[Tt ]\\d{2}:\\d{2}(:\\d{2})?([Zz]|[+-]\\d{2}:?\\d{2})$"
    },
    "sendDateFrom": {
      "type": [
        "null",
        "string"
      ],
      "description": "Dispatch moment at or after this one, same format; a draft has none and never matches",
      "default": null,
      "pattern": "^\\d{4}-\\d{2}-\\d{2}[Tt ]\\d{2}:\\d{2}(:\\d{2})?([Zz]|[+-]\\d{2}:?\\d{2})$"
    },
    "sendDateBefore": {
      "type": [
        "null",
        "string"
      ],
      "description": "Only newsletters whose dispatch moment lies before this one, exclusive, same format",
      "default": null,
      "pattern": "^\\d{4}-\\d{2}-\\d{2}[Tt ]\\d{2}:\\d{2}(:\\d{2})?([Zz]|[+-]\\d{2}:?\\d{2})$"
    },
    "limit": {
      "type": [
        "null",
        "integer"
      ],
      "description": "How many newsletters to return at most, 1 to 100, 25 by default",
      "default": null,
      "minimum": 1,
      "maximum": 100
    },
    "cursor": {
      "type": [
        "null",
        "string"
      ],
      "description": "nextCursor of the previous page, with the same filters; omit for the first page",
      "default": null,
      "minLength": 8,
      "maxLength": 200
    },
    "accountId": {
      "type": [
        "null",
        "integer"
      ],
      "description": "User ID of the account; omit for the account the access token works in",
      "default": null,
      "minimum": 1
    }
  },
  "additionalProperties": false
}
```

## Output schema:

```json
{
  "type": "object",
  "required": [
    "accountId",
    "count",
    "hasNextPage",
    "nextCursor",
    "newsletters"
  ],
  "properties": {
    "accountId": {
      "type": "integer"
    },
    "count": {
      "type": "integer"
    },
    "hasNextPage": {
      "type": "boolean"
    },
    "nextCursor": {
      "type": [
        "string",
        "null"
      ]
    },
    "newsletters": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "newsletterId",
          "emailId",
          "name",
          "newsletterStatus",
          "createdAt",
          "sendDate",
          "isSplitTest",
          "sent",
          "opensTotal",
          "clicksTotal",
          "editUrl",
          "statisticsUrl",
          "contentUrl"
        ],
        "properties": {
          "newsletterId": {
            "type": "integer"
          },
          "emailId": {
            "type": [
              "integer",
              "null"
            ]
          },
          "name": {
            "type": "string"
          },
          "newsletterStatus": {
            "type": "string"
          },
          "createdAt": {
            "type": "string"
          },
          "sendDate": {
            "type": [
              "string",
              "null"
            ]
          },
          "isSplitTest": {
            "type": "boolean"
          },
          "sent": {
            "type": "integer"
          },
          "opensTotal": {
            "type": "integer"
          },
          "clicksTotal": {
            "type": "integer"
          },
          "editUrl": {
            "type": "string"
          },
          "statisticsUrl": {
            "type": "string"
          },
          "contentUrl": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      }
    }
  }
}
```

