Skip to main content

Send Test Email

Send a test email for a specific campaign variant to a single recipient.


Endpoint

POST https://api.campaignlark.com/v1/campaigns/:id/test

Path Parameters

ParameterTypeRequiredDescription
idstringrequiredThe campaign ID.

Request Body

FieldTypeRequiredDescription
variant_typestringrequiredA or B.
recipientstringrequiredEmail address to send the test to.

Sample Request

POST https://api.campaignlark.com/v1/campaigns/64f1a2b3c4d5e6f7a8b9c0d1/test
Content-Type: application/json

{
"variant_type": "A",
"recipient": "test@example.com"
}

Response

Success — 200 OK

{
"error": null,
"data": "The test email has been scheduled successfully."
}

Errors

StatusMessageCause
400Please provide a campaign ID.id path param is missing.
400Invalid request body.Request body could not be parsed.
400Invalid variant type. Must be 'A' or 'B'.Variant type is not valid.
400Please provide a valid recipient email address.recipient is not a valid email.
400We could not find the campaign you are looking for.Campaign not found.
400Please configure a sender identity before sending test emails.No sender identity on the campaign.
400We could not find the variant you are looking for.Variant does not exist.
400The variant must have a subject before sending test emails.Variant has no subject.
400The variant must have email content before sending test emails.Variant has no body HTML.
429You are sending test emails too quickly. Please wait a moment and try again.Per-minute rate limit exceeded.
400You have exceeded the hourly test email limit. Please try again later.Per-hour rate limit exceeded.
400You have exceeded the daily test email limit. Please try again tomorrow.Per-day rate limit exceeded.