Skip to main content
POST
Personalize Campaign Email

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

X-Internal-Api-Key
string | null

Path Parameters

campaign_id
string<uuid>
required

Body

application/json

Request to personalize content for a campaign lead.

Email is the default channel (backward-compat). A LinkedIn AI personalization request (epic 2) sets channel="linkedin"; for that channel job_id is OPTIONAL (synthetic / None — used only for metadata/logging, NEVER for settlement) and the response omits the email-only subject/sender_email/recipient_email fields.

campaign_lead_id
string<uuid>
required

The campaign lead ID

step_index
integer
required

The step index in the campaign

Required range: x >= 0
variant_label
string
required

The variant label for A/B testing

sender_profile_id
string<uuid>
required

The sender profile ID to use

job_id
string<uuid> | null

The outbound job ID

channel
string
default:email

Channel: 'email' (default) or 'linkedin'

Response

Successful Response

Response containing personalized content.

Email responses carry the full email shape (subject + sender/recipient email). LinkedIn responses OMIT those email-only fields (they are None) and return only personalized_body + credits_consumed (+ all_claims_ungrounded). The email fields are OPTIONAL so the LinkedIn shape validates; an email response is byte-for-byte identical to the pre-epic-2 shape because the worker always populates them.

campaign_lead_id
string<uuid>
required

The campaign lead ID

personalized_body
string
required

Personalized body

credits_consumed
integer
required

Credits consumed for personalization

job_id
string<uuid> | null

The outbound job ID

personalized_subject
string | null

Personalized email subject (email channel only)

sender_email
string | null

Sender email from profile (email channel only)

recipient_email
string | null

Recipient email address (email channel only)

all_claims_ungrounded
boolean
default:false

W3-D1: True when the message made factual claims and every one is ungrounded. The Lambda worker's pre-send quality gate treats this as a typed terminal no-send.