sendsend.email

Send a test email from a template

POST/v1/templates/{id}/test

Sends the template to one address so you can see it in a real inbox. It goes through the normal sending path, so it needs a verified from domain, counts toward your plan, and the key also needs emails:send. Test sends are left out of the template’s stats.

Required scope: templates:manage

Parameters

NameInDescription
idrequiredpathThe template id.

Request body

FieldType
fromrequiredstring
torequiredstring
versionoptionalinteger
languageoptionalstring
variablesoptionalobject

Unknown fields are rejected, so a typo never silently does nothing.

Example

curl -X POST 'https://api.sendsend.email/v1/templates/ID/test' \
  -H "Authorization: Bearer $SENDSEND_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
  "from": "Acme <hello@mail.acme.com>",
  "to": "me@acme.com",
  "variables": {
    "first_name": "Maria"
  }
}'

Response 202

{
  "id": "msg_8Xk2pQwLr0aVn3Zt",
  "object": "email",
  "status": "queued"
}

Errors

StatusCodeWhen
400validation_errorThe request body or parameters are invalid. The message says which field.
404not_foundNo such resource in this project.
401unauthorizedThe API key is missing, invalid or revoked.
403forbiddenThe key does not have the scope this endpoint needs.
429rate_limitedToo many requests. Wait for the number of seconds in the Retry-After header.

Every error has the same shape. See Errors.