cURL request
curl https://studio.pixelixe.com/api/graphic/automation/v2 \
-d 'json={
"document_uid": "personalization_template_uid",
"api_key": "YOUR_API_KEY",
"format": "json",
"image_type": "png",
"custom_field": "campaign-retention-2026:user-48372",
"modifications": [
{
"element_name": "greeting",
"type": "text",
"text": "Hi Sarah,"
},
{
"element_name": "headline",
"type": "text",
"text": "Renew now and keep your Pro plan active",
"font-size": "auto",
"color": "#0f172a"
},
{
"element_name": "subheadline",
"type": "text",
"text": "Upgrade to annual billing before April 21 and save 20%"
},
{
"element_name": "segment-chip",
"type": "text",
"text": "Retention campaign | FR"
},
{
"element_name": "hero-image",
"type": "image",
"image_url": "https://cdn.example.com/campaigns/renewal/annual-upgrade-card.png",
"width": "cover",
"height": "cover"
},
{
"element_name": "accent",
"type": "shape",
"background-color": "#f26b4a"
}
]
}'
JSON response
{
"status": "success",
"created_at": "04-01-2026_11-18-22-401",
"uid": "personalization_template_uid",
"custom_field": "campaign-retention-2026:user-48372",
"image_url": "https://studio.pixelixe.com/storage/file/.../crm-image-personalization.png"
}
Implementation note: use format: "json" when you want a hosted image_url that your CRM, ESP, or campaign system can store next to a contact or send job. Switch to format: "image" for a raw binary response, or format: "html" when you want to reopen the generated variant in the editor.