# Send Test SMS Newsletter

Sends the saved SMS of an SMS newsletter as a test to one phone number through the configured provider, not to its audience. It charges SMS credits and cannot be recalled; pass confirm=true only when the user asked for a test to exactly this number. Refused while text, sender or provider are missing. For a split test, messageId names the variant.

## Input schema:

```json
{
  "type": "object",
  "properties": {
    "newsletterId": {
      "type": "integer",
      "description": "ID of the SMS newsletter",
      "minimum": 1
    },
    "recipientPhone": {
      "type": "string",
      "description": "Number to send the test to, international format like +491701234567",
      "pattern": "^\\+[1-9][0-9]{5,14}$"
    },
    "confirm": {
      "type": "boolean",
      "description": "true only when the user asked for a test to exactly this number; it charges SMS credits"
    },
    "messageId": {
      "type": [
        "null",
        "integer"
      ],
      "description": "For a split test: messageId of the variant to test, from get-sms-newsletter-split-test; omit otherwise",
      "default": null,
      "minimum": 1
    },
    "accountId": {
      "type": [
        "null",
        "integer"
      ],
      "description": "User ID of the account; omit for the account of the access token",
      "default": null,
      "minimum": 1
    }
  },
  "required": [
    "newsletterId",
    "recipientPhone",
    "confirm"
  ],
  "additionalProperties": false
}
```

## Output schema:

```json
{
  "type": "object",
  "required": [
    "accountId",
    "newsletterId",
    "smsId",
    "recipientPhone",
    "messages"
  ],
  "properties": {
    "accountId": {
      "type": "integer"
    },
    "newsletterId": {
      "type": "integer"
    },
    "smsId": {
      "type": "integer"
    },
    "recipientPhone": {
      "type": "string"
    },
    "messages": {
      "type": "array",
      "items": {
        "type": "string"
      }
    }
  }
}
```

