Skip to Content

Send a campaign test

Sends one rendered draft email to the authenticated actor's email address, using optional contactId only for personalization.

POST
/v1/campaigns/test-send

Sends one rendered draft email to the authenticated actor's email address, using optional contactId only for personalization. Creates no campaign run. Normal sending permissions, billing, and delivery policies apply.

Authorization

apiKey
headerx-api-key<token>

Request Body

application/json
  1. body
content*||
audience*
contactId?|null

Response Body

CampaignTestSend

application/json
  1. response
id*MessageId
Match^msg_[0-9a-hjkmnp-tv-z]{16,24}$
Example Request
import { createClient } from "samva";

const samva = createClient({ apiKey: process.env.SAMVA_API_KEY! });

const result = await samva.campaigns.sendTest({
  "content": {
    "channel": "email",
    "email": {}
  },
  "audience": {
    "topicId": "example"
  }
});
Example Response
{
  "id": "string"
}

Related documentation