curl --request GET \ --url https://onlyautomator.com/api/marketing/templates
Copy
{ "success": true, "templates": [ { "id": "welcome-template", "name": "Welcome Email", "description": "Sent to new users when they sign up", "thumbnail": "https://assets.onlyautomator.com/templates/welcome-thumb.png", "html_content": "<html><body><h1>Welcome, {{name}}!</h1><p>Thank you for joining OnlyAutomator...</p></body></html>", "created_at": "2023-01-15T10:30:45Z", "updated_at": "2023-03-22T14:15:30Z" } ]}
Marketing API
Email Templates
Get, create, and manage email templates
GET
/
api
/
marketing
/
templates
Email Templates
Copy
curl --request GET \ --url https://onlyautomator.com/api/marketing/templates
Copy
{ "success": true, "templates": [ { "id": "welcome-template", "name": "Welcome Email", "description": "Sent to new users when they sign up", "thumbnail": "https://assets.onlyautomator.com/templates/welcome-thumb.png", "html_content": "<html><body><h1>Welcome, {{name}}!</h1><p>Thank you for joining OnlyAutomator...</p></body></html>", "created_at": "2023-01-15T10:30:45Z", "updated_at": "2023-03-22T14:15:30Z" } ]}
This endpoint allows you to retrieve the list of available email templates and their details. Email templates are used for various communications with your users, including welcome emails, notifications, and marketing campaigns.
{ "success": true, "templates": [ { "id": "welcome-template", "name": "Welcome Email", "description": "Sent to new users when they sign up", "thumbnail": "https://assets.onlyautomator.com/templates/welcome-thumb.png", "html_content": "<html><body><h1>Welcome, {{name}}!</h1><p>Thank you for joining OnlyAutomator...</p></body></html>", "created_at": "2023-01-15T10:30:45Z", "updated_at": "2023-03-22T14:15:30Z" }, { "id": "password-reset", "name": "Password Reset", "description": "Sent when a user requests a password reset", "thumbnail": "https://assets.onlyautomator.com/templates/password-reset-thumb.png", "html_content": "<html><body><h1>Reset Your Password</h1><p>Click the link below to reset your password...</p></body></html>", "created_at": "2023-01-15T10:35:20Z", "updated_at": "2023-01-15T10:35:20Z" } ]}
Email templates support dynamic variables that are replaced with actual values when the email is sent. Variables are enclosed in double curly braces: {{variable_name}}.