REST API
People records: email (unique per user), optional names, phone, custom_fields JSON.
/api/v1/contactsAll contacts for the user. Optional query segment_id lists members of that segment (404 if segment missing).
Authentication: Authorization: Bearer with your Mailofly API key
Query parameters
| Field | Type | Description |
|---|---|---|
| segment_id | uuid? | Filter to contacts in this segment. |
curl -sS -X GET "https://www.mailofly.com/api/v1/contacts" \
-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/contactsEmail is unique per user. Optional names, phone, custom_fields JSON.
Authentication: Authorization: Bearer with your Mailofly API key
Request body
{
"email": "hello@example.com",
"first_name": "Hello",
"last_name": "World",
"custom_fields": { "company": "Acme" }
}curl -sS -X POST "https://www.mailofly.com/api/v1/contacts" \
-H "Accept: application/json" \
-H "Authorization: Bearer mf_live_your_key_here" \
-H "Content-Type: application/json" \
-d '{"email":"hello@example.com","first_name":"Hello","last_name":"World","custom_fields":{"company":"Acme"}}'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/contacts/{id}Fetch one contact.
Authentication: Authorization: Bearer with your Mailofly API key
Path parameters
| Field | Type | Description |
|---|---|---|
| id | uuid | Contact id. |
curl -sS -X GET "https://www.mailofly.com/api/v1/contacts/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/contacts/{id}status may be subscribed or unsubscribed.
Authentication: Authorization: Bearer with your Mailofly API key
Path parameters
| Field | Type | Description |
|---|---|---|
| id | uuid | Contact id. |
Request body
{ "status": "unsubscribed" }curl -sS -X PATCH "https://www.mailofly.com/api/v1/contacts/00000000-0000-0000-0000-000000000001" \
-H "Accept: application/json" \
-H "Authorization: Bearer mf_live_your_key_here" \
-H "Content-Type: application/json" \
-d '{"status":"unsubscribed"}'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/contacts/{id}Deletes the contact record.
Authentication: Authorization: Bearer with your Mailofly API key
Path parameters
| Field | Type | Description |
|---|---|---|
| id | uuid | Contact id. |
curl -sS -X DELETE "https://www.mailofly.com/api/v1/contacts/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 }