Design Studio emails

Send a test email

Sends a test email to a real inbox through your sending domain using the content saved to Design Studio. The test includes the tracking pixel and link parameters a real send would add, so you can see your email as it would appear in an actual email client. To get the rendered HTML back in the API response instead, use Preview an email.

  • If you already linked the email to a workflow, then keep in mind that what's saved to Design Studio may differ from what's published to the linked workflow. Make sure you publish your changes when you're ready to push them to your linked workflow.

  • If your email has translations, you have to send this request separately for each language variant. Pass the ID of the specific translation you want to test, which you can retrieve from List email translations.

  • If the email contains liquid variables, you can provide sample data in the request body to check how the liquid renders. Without sample data, the send still succeeds, but each variable renders as an empty string and the response includes a warning. A variable with a fallback filter like default renders its fallback instead. A liquid syntax error, like a missing close tag, always fails the request.

Your account has a set number of test emails you can send per day. This endpoint counts towards that quota. Learn more in Plan features.

post/v1/design_studio/emails/{id}/test_send

Path parameters

idstring uuid required

The UUID of the email. If your email has translations, this is the ID of a specific language variant.

Request body

tostring[] required

The email addresses you want to send the test to. You can send to up to 25 addresses per request; up to three addresses on a trial account; or a single address (the account owner's address or your workspace's delivery address) if your account isn't verified yet.

customer_idstring nullable

The person whose profile attributes fill in customer.* liquid variables. Pass the person's cio_id or the id that identifies them in your workspace. If nobody matches, the request fails. When you omit this field and don't pass customer values, the email renders with empty customer.* values and the response includes a warning.

customerobject nullable

Sample profile attributes for customer.* liquid variables, as a flat object of values. Encode a nested value as a JSON string. You can pass this alongside customer_id: Customer.io uses the profile's attributes, and a value here overrides the profile's value for the same key.

eventobject nullable

Sample event data for event.* liquid variables. The event key references trigger data for event-triggered automations.

triggerobject nullable

Sample trigger data for trigger.* liquid variables. The trigger key references trigger data for these specific workflows: API-triggered broadcasts or transactional messages.

laxboolean

Set to true to render a liquid variable your sample data doesn't cover as an empty string rather than failing the request. Only applies when you pass customer_id or customer; without sample data, the email renders this way anyway and the response includes a warning.

prepend_testboolean

Set to true to add [TEST] to the start of the subject line.

trackedboolean

Set to true to add a tracking pixel or false to leave it out. If you don't pass this field, Customer.io uses the tracking setting of the workflow message the email is linked to, and adds the pixel when the email isn't linked to a workflow message. Customer.io never adds the pixel for unverified accounts.

Response

Test accepted for delivery

node_idstring uuid

The email node that was tested.

node_type'EMAIL'

The response represents an email.

languagestring

The language code if the message is a language variant. Omitted for the default-language node.

acceptedboolean

Always true in a 200 response. Anything that stops the send returns a 4xx instead. Acceptance isn't proof of delivery.

tostring[]

The recipients the test was sent to.

subjectstring

The rendered subject line, including the [TEST] prefix if you set prepend_test.

fromstring

The rendered From header the test was sent with.

warningsstring[]

The ways this test differs from a real send. Customer.io delivered the email anyway, so read these before you trust what landed in the inbox. You might see that no profile data was available, that context a test send can't supply rendered as empty strings (like campaign.* or message.* on an email that isn't linked to a workflow), that Customer.io ignored a routing key like recipient or from_address in your event or trigger data, or that a recipient field in the template failed to render. That last one doesn't change who got the test: it goes only to the addresses in to. Omitted when there's nothing to report.

Changes

Changed in 1 of the 13 revisions of this API.1