# Configure SMS Newsletter Delivery

Configures provider, sender and link tracking of an SMS newsletter that can still be changed; omitted values stay. A sender that is one of the account's numbers for the provider is used as that number, anything else as a free sender name. Providers and numbers are set up in the KlickTipp account settings. Split tests are refused. Sends nothing.

## Input schema:

```json
{
  "type": "object",
  "properties": {
    "newsletterId": {
      "type": "integer",
      "description": "ID of the SMS newsletter",
      "minimum": 1
    },
    "provider": {
      "type": [
        "null",
        "string"
      ],
      "description": "SMS provider the account has set up: \"nexmo\" or \"twilio\"; omit to keep",
      "default": null,
      "enum": [
        "nexmo",
        "twilio"
      ]
    },
    "sender": {
      "type": [
        "null",
        "string"
      ],
      "description": "A sender number of the account for that provider, or a free sender name (recipients cannot reply to a name); omit to keep",
      "default": null,
      "minLength": 1,
      "maxLength": 32
    },
    "linkTracking": {
      "type": [
        "null",
        "boolean"
      ],
      "description": "Whether links in the SMS are rewritten so clicks are counted; omit to keep",
      "default": null
    },
    "accountId": {
      "type": [
        "null",
        "integer"
      ],
      "description": "User ID of the account; omit for the account of the access token",
      "default": null,
      "minimum": 1
    }
  },
  "required": [
    "newsletterId"
  ],
  "additionalProperties": false
}
```

## Output schema:

```json
{
  "type": "object",
  "required": [
    "accountId",
    "newsletterId",
    "name",
    "notes",
    "labels",
    "status",
    "isSplitTest",
    "sms",
    "audience",
    "sendAt",
    "missingForDispatch",
    "editUrl",
    "scheduleUrl",
    "statisticsUrl"
  ],
  "properties": {
    "accountId": {
      "type": "integer"
    },
    "newsletterId": {
      "type": "integer"
    },
    "name": {
      "type": "string"
    },
    "notes": {
      "type": "string"
    },
    "labels": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "status": {
      "type": "string",
      "enum": [
        "draft",
        "scheduled",
        "outgoing",
        "sent"
      ]
    },
    "isSplitTest": {
      "type": "boolean"
    },
    "sms": {
      "type": [
        "object",
        "null"
      ],
      "required": [
        "smsId",
        "text",
        "senderName",
        "provider",
        "linkTracking",
        "contentUrl"
      ],
      "properties": {
        "smsId": {
          "type": "integer"
        },
        "text": {
          "type": "string"
        },
        "senderName": {
          "type": "string"
        },
        "provider": {
          "type": "string"
        },
        "linkTracking": {
          "type": "boolean"
        },
        "contentUrl": {
          "type": "string"
        }
      }
    },
    "audience": {
      "type": "object",
      "required": [
        "mode"
      ],
      "properties": {
        "mode": {
          "type": "string",
          "enum": [
            "all_contacts",
            "saved_audience",
            "tag_conditions"
          ]
        }
      },
      "additionalProperties": true
    },
    "sendAt": {
      "type": [
        "string",
        "null"
      ]
    },
    "missingForDispatch": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "editUrl": {
      "type": "string"
    },
    "scheduleUrl": {
      "type": "string"
    },
    "statisticsUrl": {
      "type": "string"
    }
  }
}
```

