Send a campaign test
POST /campaigns/:id/test — send the saved campaign as one test email to up to five addresses.
/campaigns/:id/testSends the campaign’s saved content as one ordinary email to up to 5 addresses, so you can check it in a real inbox before sending to the audience. The subject starts with [Test] . Merge tags render the way they would for a contact with no name and no properties (custom variables use their fallback values), and the unsubscribe links are inert samples. The test changes nothing on the campaign: no status change, and nobody is recorded as a recipient.
It goes through the same path as POST /emails: the from domain must be verified, a domain-restricted key must allow it, suppressed addresses are skipped, and it counts against your email quota. It honours Idempotency-Key. Needs an API key that can send.
tostring | string[]requiredOne to five addresses: an array, or one string separated by commas, semicolons, spaces or new lines.
curl -X POST 'https://www.senddart.com/api/campaigns/CAMPAIGN_ID/test' \
-H 'Authorization: Bearer mb_xxxxxxxxx' \
-H 'Content-Type: application/json' \
-d '{ "to": ["you@yourdomain.com"] }'{
"object": "email",
"id": "4ef9a417-02e9-4d39-ad75-9611e0fcc33c",
"to": ["you@yourdomain.com"]
}id is the test email, which you can read with GET /emails/:id. Errors: validation_error (422) for no address, more than five, an invalid address, or a campaign without a from, a subject or a body; not_found for a campaign that is not yours; and the same send errors as POST /emails.