Skip to main content
POST
/
email
/
campaigns
/
{campaignId}
/
preview
Preview campaign
curl --request POST \
  --url https://www.dench.com/api/v1/email/campaigns/{campaignId}/preview \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "sample": 5
}'
{
  "campaignId": "ecmp_abc123",
  "previews": [
    {
      "recipientId": "ecr_abc123",
      "to": "ada@lovelace.dev",
      "subject": "Hi Ada",
      "htmlBody": "<p>Hi Ada, saw your work at Lovelace Labs.</p>"
    }
  ]
}

Authorizations

Authorization
string
header
required

Workspace-scoped Dench API key from workspace settings. This is the same key used by DENCH_API_KEY in sandboxes.

Path Parameters

campaignId
string
required

Body

application/json
sample
integer

Number of rendered previews to return (default 5).

Required range: -9007199254740991 <= x <= 9007199254740991

Response

Successful response

campaignId
string
required
previews
object[]
required