Send test newsletter
Sends one test message of a newsletter to a single phone number, never to a contact who unsubscribed. Needs an approved template and an idempotency key. Leave out 'to' to use the test number of the account.
POST /v1/newsletters/{newsletter_id}/test-send
| Permission | newsletters:test (all permissions) |
| Risk | Send (reaches other people) |
| Idempotency-Key | Required (how it works) |
| Safe to repeat | Safe to repeat with the same Idempotency-Key: the first answer comes back and nothing is done twice. |
| Rate limit class | send (120 requests per minute per key) |
| Confirmation | None |
| MCP tool | send_test_newsletter |
| Since version | 2026-10-25 |
#What it does
- Sends WhatsApp messages to contacts.
- Safe to repeat with the same Idempotency-Key.
#Request
Header
| Name | Required | Description |
|---|---|---|
Authorization | yes | Bearer <key> |
Idempotency-Key | yes | A unique value for this operation, for example a UUID (1 to 255 visible ASCII characters). |
Path parameters
| Name | Type | Description |
|---|---|---|
newsletter_id | string | ID of the newsletter, from list_newsletters. |
Body (JSON)
| Name | Type | Required | Description |
|---|---|---|---|
to | string | no | Phone number in E.164 format, for example +4915112345678. Default: the test number in the business profile. up to 16 characters; format e164 |
#Examples
curl -X POST "https://api.smartchat.marketing/v1/newsletters/nwl_3c9e1f7a5b2d4e8f9a0b1c2d3e4f5a6b/test-send" \
-H "Authorization: Bearer $SMARTCHAT_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"to": "+4915112345678"
}'import os
import uuid
import requests
response = requests.post(
"https://api.smartchat.marketing/v1/newsletters/nwl_3c9e1f7a5b2d4e8f9a0b1c2d3e4f5a6b/test-send",
headers={
"Authorization": "Bearer " + os.environ["SMARTCHAT_API_KEY"],
"Idempotency-Key": str(uuid.uuid4()),
},
json={
"to": "+4915112345678",
},
)
response.raise_for_status()
print(response.json())const response = await fetch("https://api.smartchat.marketing/v1/newsletters/nwl_3c9e1f7a5b2d4e8f9a0b1c2d3e4f5a6b/test-send", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.SMARTCHAT_API_KEY}`,
"Idempotency-Key": crypto.randomUUID(),
"Content-Type": "application/json",
},
body: JSON.stringify({
"to": "+4915112345678"
}),
});
if (!response.ok) throw new Error(await response.text());
console.log(await response.json());Response (202):
{
"object": "newsletter_test_send",
"newsletter_id": "nwl_3c9e1f7a5b2d4e8f9a0b1c2d3e4f5a6b",
"to": "+4915112345678",
"status": "handed_to_whatsapp"
}#Response
Status 202. Every response has the headers Request-Id, SmartChat-Version and X-RateLimit-*.
| Name | Type | Description |
|---|---|---|
object | string | Always "newsletter_test_send". always newsletter_test_send |
newsletter_id | string | Newsletter ID. |
to | string | The phone number the test went to. up to 16 characters; format e164 |
status | string | WhatsApp accepted the message. Delivery is reported later and is not confirmed by this call. one of: handed_to_whatsapp |
#Errors
| Code | Status | When |
|---|---|---|
bad_request | 400 | The request could not be read. |
idempotency_key_invalid | 400 | The 'Idempotency-Key' header must be 1 to 255 visible ASCII characters. |
idempotency_key_required | 400 | This call needs an 'Idempotency-Key' header. |
missing_parameter | 400 | A required field is missing. |
unknown_parameter | 400 | A field is not known. |
api_key_expired | 401 | This API key has expired. |
api_key_invalid | 401 | This API key is not valid. |
api_key_revoked | 401 | This API key was revoked. |
authentication_required | 401 | No API key was sent. Send 'Authorization: Bearer <key>'. |
account_blocked | 403 | This account is blocked. |
insufficient_scope | 403 | This key lacks a required permission. |
ip_not_allowed | 403 | This IP address is not allowed for this key. |
subscription_locked | 403 | The subscription or payment state blocks this function. |
newsletter_not_found | 404 | No newsletter with this ID exists in this account. |
idempotency_in_progress | 409 | A request with this idempotency key is still running. |
contact_opted_out | 422 | The contact has unsubscribed. |
idempotency_key_reused | 422 | This idempotency key was already used with a different request. |
invalid_phone_number | 422 | The phone number is not valid E.164. |
number_suppressed | 422 | The number is on the suppression list. |
template_not_approved | 422 | The template is not approved. |
test_phone_not_set | 422 | The account has no test number. |
validation_failed | 422 | A field is not valid. |
whatsapp_not_connected | 422 | No WhatsApp number is connected. |
rate_limited | 429 | Too many requests. Wait and try again. |
internal_error | 500 | Something went wrong on our side. |
upstream_error | 502 | A connected service (for example WhatsApp) reported an error. |
service_unavailable | 503 | The service is temporarily unavailable. |
suppression_check_unavailable | 503 | The suppression list cannot be read, so nothing was sent. |
All errors use one format.