REST API
name is required; subject and body (HTML or text) are optional on create (default empty strings).
/api/v1/templatesLists email templates (name, subject, body HTML).
Authentication: Authorization: Bearer with your Mailofly API key
curl -sS -X GET "https://www.mailofly.com/api/v1/templates" \
-H "Accept: application/json" \
-H "Authorization: Bearer mf_live_your_key_here"Requests use https://www.mailofly.com
Response
Try it sends the request through this app to https://www.mailofly.com (no browser CORS issues).
Click Try it to run the example against the live API.
Example responses
{ "data": [ … ] }/api/v1/templatesname is required; subject and body (HTML or text) default to empty strings.
Authentication: Authorization: Bearer with your Mailofly API key
Request body
{
"name": "Welcome",
"subject": "Hi there",
"body": "<p>Thanks for joining.</p>"
}curl -sS -X POST "https://www.mailofly.com/api/v1/templates" \
-H "Accept: application/json" \
-H "Authorization: Bearer mf_live_your_key_here" \
-H "Content-Type: application/json" \
-d '{"name":"Welcome","subject":"Hi there","body":"<p>Thanks for joining.</p>"}'Requests use https://www.mailofly.com
Response
Try it sends the request through this app to https://www.mailofly.com (no browser CORS issues).
Click Try it to run the example against the live API.
Example responses
{ "data": { … } }/api/v1/templates/{id}Fetch one template.
Authentication: Authorization: Bearer with your Mailofly API key
Path parameters
| Field | Type | Description |
|---|---|---|
| id | uuid | Template id. |
curl -sS -X GET "https://www.mailofly.com/api/v1/templates/00000000-0000-0000-0000-000000000001" \
-H "Accept: application/json" \
-H "Authorization: Bearer mf_live_your_key_here"Requests use https://www.mailofly.com
Response
Try it sends the request through this app to https://www.mailofly.com (no browser CORS issues).
Click Try it to run the example against the live API.
Example responses
{ "data": { … } }/api/v1/templates/{id}Partial update of name, subject, body.
Authentication: Authorization: Bearer with your Mailofly API key
Path parameters
| Field | Type | Description |
|---|---|---|
| id | uuid | Template id. |
Request body
{ "subject": "Updated" }curl -sS -X PATCH "https://www.mailofly.com/api/v1/templates/00000000-0000-0000-0000-000000000001" \
-H "Accept: application/json" \
-H "Authorization: Bearer mf_live_your_key_here" \
-H "Content-Type: application/json" \
-d '{"subject":"Updated"}'Requests use https://www.mailofly.com
Response
Try it sends the request through this app to https://www.mailofly.com (no browser CORS issues).
Click Try it to run the example against the live API.
Example responses
{ "data": { … } }/api/v1/templates/{id}Deletes the template.
Authentication: Authorization: Bearer with your Mailofly API key
Path parameters
| Field | Type | Description |
|---|---|---|
| id | uuid | Template id. |
curl -sS -X DELETE "https://www.mailofly.com/api/v1/templates/00000000-0000-0000-0000-000000000001" \
-H "Accept: application/json" \
-H "Authorization: Bearer mf_live_your_key_here"Requests use https://www.mailofly.com
Response
Try it sends the request through this app to https://www.mailofly.com (no browser CORS issues).
Click Try it to run the example against the live API.
Example responses
{ "ok": true }