Contacts
The people you email. A contact is keyed by email address; POST /v1/contacts creates or updates. fields hold anything you want in templates ({{first_name}}), topics hold per-topic marketing consent.
Contacts are also created automatically when you send to or record an event for a new address.
type Contact = {
id: string; // con_…
email: string;
external_id: string | null; // your user id
fields: Record<string, string | number | boolean | null>;
topics: Record<string, boolean>; // topic -> subscribed
lists: string[]; // contact list ids
status: "active" | "unsubscribed" | "bounced" | "complained";
flags: ("role_address" | "disposable_domain" | "no_mx")[];
ev: Record<string, { first: string; last: string; count: number }>; // event summary
created_at: string; updated_at: string;
};Create or update a contact
/v1/contactsCreates the contact, or updates it if the email already exists. Fields are merged; lists only adds.
contacts:writeBody
emailstringrequiredThe contact's address.
external_idstringYour own user id.
fieldsobjectValues for templates and audience filters, e.g.
{ first_name, plan }.topicsobjectTopic consent:
{ "product-updates": true }.listsstring[]List ids to add the contact to.
curl -X POST https://api.mailpark.io/v1/contacts \
-H "Authorization: Bearer $MAILPARK_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"email": "jane@example.com",
"external_id": "user_123",
"fields": {
"first_name": "Jane",
"plan": "trial"
}
}'{
"id": "con_7Yt1",
"email": "jane@example.com",
"external_id": "user_123",
"fields": {
"first_name": "Jane",
"plan": "trial"
},
"topics": {
"product-updates": true,
"onboarding": true
},
"lists": [
"lst_beta"
],
"status": "active",
"flags": [],
"ev": {
"signed_up": {
"first": "2026-10-20T09:00:00Z",
"last": "2026-10-20T09:00:00Z",
"count": 1
}
},
"created_at": "2026-10-20T09:00:00Z",
"updated_at": "2026-10-22T10:02:11Z"
}List contacts
/v1/contactsContacts, newest first.
logs:readQuery parameters
statusstringactive,unsubscribed,bouncedorcomplained.topicstringOnly contacts subscribed to this topic.
liststringOnly members of this list id.
limitintegerHow many to return, 1–100. Default 50.
cursorstringThe
next_cursorfrom the previous page.
curl 'https://api.mailpark.io/v1/contacts?status=active' \
-H "Authorization: Bearer $MAILPARK_API_KEY"{
"data": [
{
"id": "con_7Yt1",
"email": "jane@example.com",
"external_id": "user_123",
"fields": {
"first_name": "Jane",
"plan": "trial"
},
"topics": {
"product-updates": true,
"onboarding": true
},
"lists": [
"lst_beta"
],
"status": "active",
"flags": [],
"ev": {
"signed_up": {
"first": "2026-10-20T09:00:00Z",
"last": "2026-10-20T09:00:00Z",
"count": 1
}
},
"created_at": "2026-10-20T09:00:00Z",
"updated_at": "2026-10-22T10:02:11Z"
}
],
"next_cursor": null
}Get a contact
/v1/contacts/{id_or_email}One contact by id or email address.
Path parameters
id_or_emailstringrequiredcon_…or the email address.
curl https://api.mailpark.io/v1/contacts/jane%40example.com \
-H "Authorization: Bearer $MAILPARK_API_KEY"{
"id": "con_7Yt1",
"email": "jane@example.com",
"external_id": "user_123",
"fields": {
"first_name": "Jane",
"plan": "trial"
},
"topics": {
"product-updates": true,
"onboarding": true
},
"lists": [
"lst_beta"
],
"status": "active",
"flags": [],
"ev": {
"signed_up": {
"first": "2026-10-20T09:00:00Z",
"last": "2026-10-20T09:00:00Z",
"count": 1
}
},
"created_at": "2026-10-20T09:00:00Z",
"updated_at": "2026-10-22T10:02:11Z"
}Update a contact
/v1/contacts/{id_or_email}Changes fields, topics, external id or lists. Here lists replaces the contact's list memberships.
contacts:writePath parameters
id_or_emailstringrequiredcon_…or the email address.
Body
fieldsobjectMerged into the existing fields.
nullremoves a field.topicsobjectTopic consent to change.
external_idstringYour own user id.
listsstring[]The full set of list ids.
curl -X PATCH https://api.mailpark.io/v1/contacts/jane%40example.com \
-H "Authorization: Bearer $MAILPARK_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"fields": {
"plan": "pro"
},
"topics": {
"product-updates": false
}
}'{
"id": "con_7Yt1",
"email": "jane@example.com",
"external_id": "user_123",
"fields": {
"first_name": "Jane",
"plan": "pro"
},
"topics": {
"product-updates": false,
"onboarding": true
},
"lists": [
"lst_beta"
],
"status": "active",
"flags": [],
"ev": {
"signed_up": {
"first": "2026-10-20T09:00:00Z",
"last": "2026-10-20T09:00:00Z",
"count": 1
}
},
"created_at": "2026-10-20T09:00:00Z",
"updated_at": "2026-10-22T10:02:11Z"
}Delete a contact
/v1/contacts/{id_or_email}Removes the contact's personal data everywhere: fields, events, list memberships and enrollments. Use it for deletion requests.
contacts:writePath parameters
id_or_emailstringrequiredcon_…or the email address.
curl -X DELETE https://api.mailpark.io/v1/contacts/jane%40example.com \
-H "Authorization: Bearer $MAILPARK_API_KEY"{
"deleted": true,
"id": "con_7Yt1"
}Count contacts
/v1/contacts/summaryTotals: all contacts, subscribed (status active), and new in the last 30 days against the 30 before.
logs:readcurl https://api.mailpark.io/v1/contacts/summary \
-H "Authorization: Bearer $MAILPARK_API_KEY"{
"total": 4820,
"subscribed": 4511,
"new_30d": 612,
"new_prev_30d": 540
}