Skip to Content
SendlySendly
API ReferenceEmails

Send a sandbox test email

POST
/api/v1/emails/test

Prove that sending works — before any domain, DNS record or verification exists.

The message is sent FROM this project's sandbox address (sandbox_address on GET /api/v1/projects) and can only reach ONE recipient: the project owner's own verified account email, which is also what to defaults to — or, for a keyless start's key, the address that start confirmed with POST /api/v1/keyless/verify. Naming any other recipient answers 403, and naming a from answers 422 — the sender is resolved server-side and a request that expects a different one is refused rather than quietly re-addressed.

That restriction is the reason emails:test is a separate, non-sensitive scope: a call under it cannot put mail in a stranger's inbox, so it can sit in a default grant where emails:send may not. It is not a way to send real mail cheaply — use POST /api/v1/emails for that.

Sandbox sends are capped per project per day, and the response's sandbox: true marks the receipt so a relayed summary cannot pass a test send off as a real one.

Requires the emails:test scope — Send test emails to your own address from the Sendly sandbox.

headerAuthorizationBearer <API Key>

API key authentication. Use a sk_* (FULL) or pk_* (SENDING_ONLY) key as the bearer token. Public keys (pk_*) are restricted to the email-send endpoints and the self-serve list subscribe/unsubscribe pair; every other endpoint — event tracking included — answers 403 for them. In scope terms (used by /api/v1/* operations): FULL keys hold every scope; SENDING_ONLY keys hold only emails:send.

application/json
  1. body

Body for POST /api/v1/emails/test. subject and body are required; to defaults to the project owner's verified email, and from is refused.

to?string

Where to send it. Optional — it defaults to the project owner's own verified account email, which is the only address a sandbox send may reach. Any other value is refused.

Formatemail
subject*string
Length1 <= length <= 998
body*string

HTML body. Merge tags are rendered as on any other send.

Length1 <= length
from?string

NOT ACCEPTED. The sender is always this project's sandbox address, resolved server-side; naming one here is refused rather than ignored, so a request that expects a different sender never gets a success it would misread. Read sandbox_address from GET /api/v1/projects to learn the address, or from off this response.

Response Body

Test email queued

application/json
  1. response

Receipt for a sandbox test send.

id*string

The Email row this send created.

Formatuuid
status*string

Delivery status at the moment of the response — PENDING for a send still queued.

Value in"PENDING""SENDING""SENT""DELIVERED""RECEIVED""BOUNCED""FAILED""REJECTED""RENDERING_FAILURE""DELIVERY_DELAY""CANCELLED"
to*string

The recipient the message was queued for.

Formatemail
from*string

This project's sandbox sender — resolved server-side, never from the body.

Formatemail
sandbox*true

Always true. It is here so a model relaying this result cannot describe a test send as a real one: the message came from the shared sandbox domain and could only reach the project owner's own inbox.

Value intrue
test_allowance*|

Where the project stands against its free test emails (sends from the sandbox address with no domain and no billing). Null once the project has a verified domain or a subscription: from then on test sends meet only the daily cap. When remaining reaches 0, the next test send is refused with quota_exhausted and next: add_domain.

Example Request
curl -X POST 'https://api.sendly.now/api/v1/emails/test' \  -H 'Content-Type: application/json' \  -d '{  "subject": "string",  "body": "string"}'
Example Response
{  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "status": "PENDING",  "to": "user@example.com",  "from": "user@example.com",  "sandbox": true,  "test_allowance": {    "limit": 0,    "used": 0,    "remaining": 0  }}