cURL
curl --request POST \ --url https://api.example.com/v1/templates \ --header 'Content-Type: application/json' \ --data ' { "name": "<string>", "subject": "<string>", "html": "<string>", "text": "<string>" } '
Create a new email template.
{{variable}}
curl -X POST https://www.unosend.co/api/v1/templates \ -H "Authorization: Bearer un_xxxxxxxxxx" \ -H "Content-Type: application/json" \ -d '{ "name": "Welcome Email", "subject": "Welcome to {{company_name}}, {{first_name}}!", "html": "<h1>Welcome, {{first_name}}!</h1><p>Thanks for joining {{company_name}}.</p>" }'
{ "id": "tpl_abc123", "name": "Welcome Email", "subject": "Welcome to {{company_name}}, {{first_name}}!", "html": "<h1>Welcome, {{first_name}}!</h1><p>Thanks for joining {{company_name}}.</p>", "created_at": "2024-01-15T10:30:00.000Z" }