# Sending safely

> The checks the server makes before any message leaves, what keys can never do, and how to test without risk.

Last updated: 2026-10-30. Source: https://docs.smartchat.marketing/en/security/

The API is built so that a wrong call cannot hurt your contacts. These checks happen on the server for every call that sends a message. You cannot switch them off.

## Checks before a message leaves

| Check | What it means |
|---|---|
| Permission | The key has the permission for this call. Sending a newsletter needs `newsletters:send` on top of any write permission. |
| Opt-in | Only contacts who may receive the message. Newsletters only go to `confirmed` contacts. |
| Unsubscribed | A contact with `opted_out` receives no template and no newsletter. The only exception is a free-text answer inside the open 24-hour window, right after the person wrote to you (see [Consent and the 24-hour window](https://docs.smartchat.marketing/en/concepts/consent-and-24h-window/)). A suppressed number never receives anything. If the suppression list cannot be read, nothing is sent ([`suppression_check_unavailable`](https://docs.smartchat.marketing/en/errors/#suppression_check_unavailable)). |
| 24-hour window | Free text only inside the window. Otherwise [`window_closed`](https://docs.smartchat.marketing/en/errors/#window_closed). |
| Templates | Only approved templates go out. |
| Repeat protection | Calls that send need an [`Idempotency-Key`](https://docs.smartchat.marketing/en/concepts/idempotency/). A repeat does not send twice. |
| Audit | Every call that changes something or sends is written to an audit log, with the key, the time and the request ID. |

Details of each rule: [Consent and the 24-hour window](https://docs.smartchat.marketing/en/concepts/consent-and-24h-window/).

## Preview before you send

A preview call shows who would receive a newsletter, how many are excluded and why, and a few sample texts. It reads and calculates only; it sends nothing. See [`get_newsletter_send_preview`](https://docs.smartchat.marketing/en/api/reference/newsletters/get_newsletter_send_preview/).

## Testing without risk

- Use a key with the level **Read** while you build. Nothing can change.
- A **test send** of a newsletter goes to the phone number you name. It uses approved templates only and never goes to a contact who unsubscribed.
- Use the webhook test call to see a signed delivery without any real event. See [Webhook testing](https://docs.smartchat.marketing/en/webhooks/testing/).

## Keys have limits by design

A key cannot delete data (except a tag on a contact and a webhook endpoint), manage the account or plan, or create keys. See [Authentication](https://docs.smartchat.marketing/en/authentication/).

## Outside text

Text from contacts is marked and must never be treated as an instruction. See [Untrusted content](https://docs.smartchat.marketing/en/concepts/untrusted-content/).

## Phone numbers

A key with the Read level sees the phone numbers of your contacts. Keep keys secret and give integrations only the level they need.

