# Activate Newsletter

Sends or schedules an email newsletter after the user confirms the recipient estimate in the client's elicitation dialog; no, cancel or no answer sends nothing. Clients without elicitation are refused with the newsletter's schedule page, where the user sends in KlickTipp. Sent mail cannot be recalled. Unpublished edits are refused; publish them with publish-newsletter-email-content first. Requires an explicit mode and UTC offset for scheduled sends; split tests require every variant published. Read deliveryStatus via get-newsletter.

## Input schema:

```json
{
  "type": "object",
  "properties": {
    "newsletterId": {
      "type": "integer",
      "description": "ID of the newsletter to send",
      "minimum": 1
    },
    "mode": {
      "type": "string",
      "description": "\"immediate\" or \"scheduled\"; no default",
      "enum": [
        "immediate",
        "scheduled"
      ]
    },
    "scheduledAt": {
      "type": [
        "null",
        "string"
      ],
      "description": "Moment to send at, ISO 8601 with UTC offset; required for \"scheduled\", forbidden for \"immediate\"",
      "default": null,
      "pattern": "^\\d{4}-\\d{2}-\\d{2}[Tt ]\\d{2}:\\d{2}(:\\d{2})?([Zz]|[+-]\\d{2}:?\\d{2})$"
    },
    "accountId": {
      "type": [
        "null",
        "integer"
      ],
      "description": "User ID of the account; omit for the account the access token works in",
      "default": null,
      "minimum": 1
    }
  },
  "required": [
    "newsletterId",
    "mode"
  ],
  "additionalProperties": false
}
```

## Output schema:

```json
{
  "type": "object",
  "required": [
    "outcome",
    "accountId",
    "newsletterId",
    "newsletterStatus",
    "sendAt",
    "estimatedRecipients",
    "scheduleUrl",
    "statisticsUrl"
  ],
  "properties": {
    "outcome": {
      "type": "string",
      "enum": [
        "sending",
        "scheduled"
      ]
    },
    "accountId": {
      "type": "integer"
    },
    "newsletterId": {
      "type": "integer"
    },
    "newsletterStatus": {
      "type": "string"
    },
    "sendAt": {
      "type": [
        "string",
        "null"
      ]
    },
    "estimatedRecipients": {
      "type": "integer"
    },
    "scheduleUrl": {
      "type": "string"
    },
    "statisticsUrl": {
      "type": "string"
    }
  }
}
```

