Get your API key
API reference

Lists

Static contact lists — curated broadcast audiences and their members.

Auth: Session token · Base URL: https://api.mailkite.dev

Endpoints

Each row expands to its request and response schema. The address bar follows along, so any endpoint can be linked to directly.

GET /api/lists List your contact lists (static, curated broadcast audiences), each with its member count.

List your contact lists (static, curated broadcast audiences), each with its member count.

Response body

array contact-list.json

A named list of contacts (lst_…), used as a broadcast audience. GET /api/lists/:id adds member_count; other responses return the bare row.

FieldTypeNotes
id req stringList id (lst_…).
user_id req stringOwning account (usr_…).
name req stringDisplay name, unique per account.
member_countintegerHow many contacts the list holds. Detail (GET one) responses only.
created_at req integerWhen the list was created, in Unix epoch milliseconds (UTC).
updated_at req integerWhen the list last changed, in Unix epoch milliseconds (UTC).
POST /api/lists Create a contact list. Returns the list with its id (lst_…); add contacts with addListContacts.

Create a contact list. Returns the list with its id (lst_…); add contacts with addListContacts.

Request body

create-list-request.json
FieldTypeNotes
name req string

Response body

contact-list.json

A named list of contacts (lst_…), used as a broadcast audience. GET /api/lists/:id adds member_count; other responses return the bare row.

FieldTypeNotes
id req stringList id (lst_…).
user_id req stringOwning account (usr_…).
name req stringDisplay name, unique per account.
member_countintegerHow many contacts the list holds. Detail (GET one) responses only.
created_at req integerWhen the list was created, in Unix epoch milliseconds (UTC).
updated_at req integerWhen the list last changed, in Unix epoch milliseconds (UTC).
GET /api/lists/:id Get one contact list with its member count.

Get one contact list with its member count.

Response body

contact-list.json

A named list of contacts (lst_…), used as a broadcast audience. GET /api/lists/:id adds member_count; other responses return the bare row.

FieldTypeNotes
id req stringList id (lst_…).
user_id req stringOwning account (usr_…).
name req stringDisplay name, unique per account.
member_countintegerHow many contacts the list holds. Detail (GET one) responses only.
created_at req integerWhen the list was created, in Unix epoch milliseconds (UTC).
updated_at req integerWhen the list last changed, in Unix epoch milliseconds (UTC).
PATCH /api/lists/:id Rename a contact list.

Rename a contact list.

Request body

update-list-request.json
FieldTypeNotes
name req string

Response body

contact-list.json

A named list of contacts (lst_…), used as a broadcast audience. GET /api/lists/:id adds member_count; other responses return the bare row.

FieldTypeNotes
id req stringList id (lst_…).
user_id req stringOwning account (usr_…).
name req stringDisplay name, unique per account.
member_countintegerHow many contacts the list holds. Detail (GET one) responses only.
created_at req integerWhen the list was created, in Unix epoch milliseconds (UTC).
updated_at req integerWhen the list last changed, in Unix epoch milliseconds (UTC).
DELETE /api/lists/:id Delete a contact list. The list is removed; the contacts themselves are kept.

Delete a contact list. The list is removed; the contacts themselves are kept.

Response body

ok-response.json

The uniform acknowledgement for deletes and other actions with nothing else to report.

FieldTypeNotes
ok req trueAlways true — a non-2xx error body is returned otherwise.
GET /api/lists/:id/contacts List the contacts that are members of a list, newest first. Optionally page with `before` (a `last_seen_at`/`created_at` cursor) and `limit`. Response is a bare array — paginate by passing the last row's `last_seen_at` (or `created_at`) as the next `before`.

List the contacts that are members of a list, newest first. Optionally page with `before` (a `last_seen_at`/`created_at` cursor) and `limit`. Response is a bare array — paginate by passing the last row's `last_seen_at` (or `created_at`) as the next `before`.

Response body

array contact.json

One address-book contact. Contacts accrue automatically from inbound/outbound mail and imports; role addresses (info@, support@) and consent state are tracked so broadcast audiences stay clean.

FieldTypeNotes
id req stringContact id.
user_id req stringOwning account (usr_…).
email req stringThe address, trimmed and lowercased.
namestring · nullDisplay name, when known.
first_namestring · nullFirst name, when known.
last_namestring · nullLast name, when known.
companystring · nullCompany, when known.
websitestring · nullWebsite URL, when known.
phonestring · nullPhone number, when known.
status req "active" · "unsubscribed" · "archived"Lifecycle state. Unsubscribed contacts are excluded from broadcast audiences.
source req stringWhere the contact came from: 'inbound', 'outbound', 'manual', 'import', or a connected provider ('google', 'microsoft', 'apple', …).
role0 · 11 for a role/non-personal address (info@, support@, …).
subscribed0 · 11 = marketing opt-in (tracked separately from suppression).
propertiesstring · nullUntyped custom fields as a JSON string, including { socials: {…} }.
external_idstring · nullYour identifier for this contact, when supplied.
first_seen_atinteger · nullFirst time mail was exchanged with this address, in Unix epoch milliseconds (UTC); null when it has never happened.
last_seen_atinteger · nullMost recent time mail was exchanged with this address, in Unix epoch milliseconds (UTC); null when it has never happened.
msg_countintegerHow many messages have been exchanged with this address.
created_at req integerWhen the contact was created, in Unix epoch milliseconds (UTC).
updated_at req integerWhen the contact last changed, in Unix epoch milliseconds (UTC).
POST /api/lists/:id/contacts Add contacts (by id, ctr_…) to a list. Returns how many were newly added; contacts already on the list are ignored.

Add contacts (by id, ctr_…) to a list. Returns how many were newly added; contacts already on the list are ignored.

Request body

add-list-contacts-request.json
FieldTypeNotes
contactIds req string[]

Response body

add-list-contacts-response.json

POST /api/lists/:id/contacts — how many contacts were actually added (already-present members don't count twice).

FieldTypeNotes
added req integerContacts newly added to the list.
DELETE /api/lists/:id/contacts/:contactId Remove one contact from a list (the contact itself is kept).

Remove one contact from a list (the contact itself is kept).

Response body

ok-response.json

The uniform acknowledgement for deletes and other actions with nothing else to report.

FieldTypeNotes
ok req trueAlways true — a non-2xx error body is returned otherwise.