Write per-contact campaign variables (`{{ vars.nombre }}`), up to 500 contacts and 5,000 values per call
const url = 'https://api.replifier.com/v1/campaigns/cmp_01hx0000000000000000000000/personalization';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"entries":[{"contactId":"example","email":"example","vars":{"additionalProperty":"example"}}]}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.replifier.com/v1/campaigns/cmp_01hx0000000000000000000000/personalization \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "entries": [ { "contactId": "example", "email": "example", "vars": { "additionalProperty": "example" } } ] }'Each entry has contactId or email and vars: name (lowercase letters, digits and _, up to 40) → text of up to 2,000 characters, or null to remove it. Draft campaigns only. The text is PLAIN: it is escaped at compile time (never HTML) and does not allow {{ or }}. A contact that does not belong to the brand is rejected as contact_not_found. In the email use {{ vars.nombre | respaldo: "texto" }}: when there is no value, the fallback is rendered. Each value stores its source and the write is recorded in the audit log.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Example
cmp_01hx0000000000000000000000Request Bodyrequired
Section titled “Request Bodyrequired”object
object
object
Example generated
{ "entries": [ { "contactId": "example", "email": "example", "vars": { "additionalProperty": "example" } } ]}Responses
Section titled “Responses”Result
object
object
Example
{ "rejected": [ { "reason": "contact_not_found" } ]}Invalid data
object
object
Example
{ "error": { "code": "not_found" }}No session, expired session, or invalid, expired or revoked API key
object
object
Example
{ "error": { "code": "not_found" }}Not allowed, API key missing the scope, IP not allowed, or request rejected (csrf_rejected)
object
object
Example
{ "error": { "code": "not_found" }}Does not exist or is not visible to you
object
object
Example
{ "error": { "code": "not_found" }}Conflict
object
object
Example
{ "error": { "code": "not_found" }}Internal error
object
object
Example
{ "error": { "code": "not_found" }}