# Configure Newsletter Delivery

Configures a never-scheduled email newsletter’s sender, reply address, domain, signature and tracking settings. Omitted settings stay. Turning off link tracking requires a verified sending domain with its own mail server; a DKIM-only domain is not enough. Reports missing send requirements and usable identities; a changed sender address derives its verified domain. senderEmailMode and senderDomainMode use signature_dispatch_profile together or not at all. Split tests are refused; their variant senders are set in the app. Does not schedule or send.

## Input schema:

```json
{
  "type": "object",
  "properties": {
    "newsletterId": {
      "type": "integer",
      "description": "ID of the newsletter to configure",
      "minimum": 1
    },
    "senderNameMode": {
      "type": [
        "null",
        "string"
      ],
      "description": "\"explicit\" (pass senderName), \"account_default\" or \"signature_dispatch_profile\"; omit to keep",
      "default": null,
      "enum": [
        "explicit",
        "account_default",
        "signature_dispatch_profile"
      ]
    },
    "senderName": {
      "type": [
        "null",
        "string"
      ],
      "description": "Name the recipients see as the sender, for mode \"explicit\" only; omit to keep the current one",
      "default": null,
      "maxLength": 250
    },
    "senderEmailMode": {
      "type": [
        "null",
        "string"
      ],
      "description": "\"explicit\" (pass senderEmail), \"account_default\" or \"signature_dispatch_profile\"; omit to keep",
      "default": null,
      "enum": [
        "explicit",
        "account_default",
        "signature_dispatch_profile"
      ]
    },
    "senderEmail": {
      "type": [
        "null",
        "string"
      ],
      "description": "Sender address configured for the account; for mode \"explicit\"; omit to keep",
      "default": null,
      "maxLength": 250
    },
    "replyToEmailMode": {
      "type": [
        "null",
        "string"
      ],
      "description": "\"explicit\" (pass replyToEmail), \"account_default\" or \"signature_dispatch_profile\"; omit to keep",
      "default": null,
      "enum": [
        "explicit",
        "account_default",
        "signature_dispatch_profile"
      ]
    },
    "replyToEmail": {
      "type": [
        "null",
        "string"
      ],
      "description": "Address answers go to, for mode \"explicit\" only; omit to keep the current one",
      "default": null,
      "maxLength": 250
    },
    "senderDomainMode": {
      "type": [
        "null",
        "string"
      ],
      "description": "\"explicit\" (pass senderDomain), \"account_default\" for automatic resolution or \"signature_dispatch_profile\"; omit to keep",
      "default": null,
      "enum": [
        "explicit",
        "account_default",
        "signature_dispatch_profile"
      ]
    },
    "senderDomain": {
      "type": [
        "null",
        "string"
      ],
      "description": "Matching verified domain; for mode \"explicit\"; omit to derive it when changing the sender address",
      "default": null,
      "maxLength": 250
    },
    "signatureId": {
      "type": [
        "null",
        "integer"
      ],
      "description": "ID of the signature under the newsletter; 0 lets KlickTipp pick one by tagging; omit to keep",
      "default": null,
      "minimum": 0
    },
    "linkTracking": {
      "type": [
        "null",
        "boolean"
      ],
      "description": "Whether KlickTipp rewrites the links so clicks are counted; true is the normal case, omit to keep",
      "default": null
    },
    "headerLinks": {
      "type": [
        "null",
        "boolean"
      ],
      "description": "Whether KlickTipp puts its own line above the body with browser view, unsubscribe and report-spam links; omit to keep",
      "default": null
    },
    "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"
  ],
  "additionalProperties": false
}
```

## Output schema:

```json
{
  "type": "object",
  "required": [
    "accountId",
    "newsletterId",
    "emailId",
    "name",
    "newsletterStatus",
    "sender",
    "tracking",
    "missingRequirements",
    "readyToSend",
    "availableSenderAddresses",
    "availableSenderDomains",
    "availableSignatures",
    "contentUrl",
    "scheduleUrl"
  ],
  "properties": {
    "accountId": {
      "type": "integer"
    },
    "newsletterId": {
      "type": "integer"
    },
    "emailId": {
      "type": "integer"
    },
    "name": {
      "type": "string"
    },
    "newsletterStatus": {
      "type": "string"
    },
    "sender": {
      "type": "object",
      "required": [
        "senderNameMode",
        "senderName",
        "senderEmailMode",
        "senderEmail",
        "replyToEmailMode",
        "replyToEmail",
        "senderDomainMode",
        "senderDomain",
        "signature"
      ],
      "properties": {
        "senderNameMode": {
          "type": "string"
        },
        "senderName": {
          "type": [
            "string",
            "null"
          ]
        },
        "senderEmailMode": {
          "type": "string"
        },
        "senderEmail": {
          "type": [
            "string",
            "null"
          ]
        },
        "replyToEmailMode": {
          "type": "string"
        },
        "replyToEmail": {
          "type": [
            "string",
            "null"
          ]
        },
        "senderDomainMode": {
          "type": "string"
        },
        "senderDomain": {
          "type": [
            "string",
            "null"
          ]
        },
        "signature": {
          "type": "object",
          "required": [
            "mode",
            "id",
            "name"
          ],
          "properties": {
            "mode": {
              "type": "string"
            },
            "id": {
              "type": "integer"
            },
            "name": {
              "type": [
                "string",
                "null"
              ]
            }
          }
        }
      }
    },
    "tracking": {
      "type": "object",
      "required": [
        "linkTracking",
        "headerLinks",
        "linkTrackingCanBeTurnedOff"
      ],
      "properties": {
        "linkTracking": {
          "type": "boolean"
        },
        "headerLinks": {
          "type": "boolean"
        },
        "linkTrackingCanBeTurnedOff": {
          "type": "boolean"
        }
      }
    },
    "missingRequirements": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "readyToSend": {
      "type": "boolean"
    },
    "availableSenderAddresses": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "availableSenderDomains": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "availableSignatures": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "id",
          "name"
        ],
        "properties": {
          "id": {
            "type": "integer"
          },
          "name": {
            "type": "string"
          }
        }
      }
    },
    "contentUrl": {
      "type": "string"
    },
    "scheduleUrl": {
      "type": "string"
    }
  }
}
```

