logo
CampaignsSend a test email
Campaigns

Send a test email

Personalizes an email and sends it synchronously via SMTP. Supports two modes:

  • Send to lead: Provide leadId — email is personalized with lead data and sent to the lead's email.
  • Send to custom email: Provide customEmail and optionally customVariables — useful for testing with your own inbox.

The email is sent synchronously — the response confirms delivery. Counts toward email usage quota. Requires an active subscription.

curl -X POST "https://api.sendkit.ai/v1/campaigns/example_string/send-test-email" \
  -H "Content-Type: application/json" \
  -H "X-Api-Key: YOUR_API_KEY" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -d '{
  "sequenceStep": 0,
  "mailboxId": "665b1c2d3e4f5a6b7c8d9e0f",
  "customEmail": "test@example.com",
  "customVariables": {
    "firstName": "John",
    "company": "Acme Corp"
  }
}'
{
  "success": true,
  "data": {
    "message": "Test email sent successfully",
    "messageId": "<abc123@smtp.gmail.com>",
    "recipient": "test@example.com",
    "mailbox": "sarah@sendkit.ai",
    "preview": {
      "subject": "Quick question, John",
      "body": "<p>Hi John,</p><p>I noticed Acme Corp is growing fast...</p>",
      "text": "Hi John,

I noticed Acme Corp is growing fast..."
    }
  }
}
POST
/v1/campaigns/{id}/send-test-email
POST
API Key (header: X-Api-Key)
X-Api-Keystring
Required

Platform API key (sk_user_...) or Workspace API key (sk_...)

Platform API key (sk_user_...) or Workspace API key (sk_...)
Bearer Token
Bearer Tokenstring
Required

API key as Bearer token

API key as Bearer token
Content-Typestring
Required

The media type of the request body

Options: application/json
sequenceStepinteger
Required

Zero-based index of the sequence step

mailboxIdstring
Required

Mailbox to send from

leadIdstring

Lead ID — send to this lead's email with their data

customEmailstring

Custom recipient email (alternative to leadId)

Format: email
customVariablesobject

Variable values when using customEmail (e.g. {"firstName":"John"})

variantstring

A/B variant label

contentOverrideobject

Override step content for unsaved drafts

Request Preview
Response

Response will appear here after sending the request

Authentication

header
X-Api-Keystring
Required

API Key for authentication. Platform API key (sk_user_...) or Workspace API key (sk_...)

header
Authorizationstring
Required

Bearer token. API key as Bearer token

Path Parameters

idstring
Required

Resource ID

Body

application/json
sequenceStepinteger
Required

Zero-based index of the sequence step

mailboxIdstring
Required

Mailbox to send from

leadIdstring

Lead ID — send to this lead's email with their data

customEmailstring

Custom recipient email (alternative to leadId)

customVariablesobject

Variable values when using customEmail (e.g. \\{"firstName":"John"\\})

variantstring

A/B variant label

contentOverrideobject

Override step content for unsaved drafts

Responses

successboolean
dataobject