GET /api/v1/contacts
Contacts of one list, paginated.
listId is required: a read is always scoped to one list, there is no organization-wide contact
listing. A request without it answers 400. Get your list ids from GET /api/v1/lists — see
Discovery.
tagId takes the id of a tag, not its name: call GET /api/v1/tags first and pick the id of
the tag whose name you are after.
The organization is never a parameter. It comes from the key. An
organizationId passed in the
query is ignored — you can only ever read your own audience. A listId belonging to another
organization answers 404, not an empty page.id, email, firstName, lastName,
phone, birthDate, locale, country, status, listId, list, tags, customFields, attribution and its createdAt / updatedAt dates. Nothing else — in
particular, the unsubscribe token of a contact is never exposed by this API.
Authorization
| Role in the organization | This endpoint |
|---|---|
OWNER | Allowed |
ADMIN | Allowed |
MEMBER | Allowed |
Query parameters
| Parameter | Type | Description |
|---|---|---|
listId | string | List to read. Contacts are always scoped to a list. |
status | string | pending, subscribed, unsubscribed, bounced, complained |
tagId | string | Only contacts carrying this tag — a tag id, not a name |
search | string | Matches email, first name or last name |
page | number | Defaults to 1 |
limit | number | Defaults to 20, capped at 100 |
Example
bash
curl -H "x-api-key: $AGENTMAIL_API_KEY" \
"https://www.agentsmail.io/api/v1/contacts?listId=$LIST_ID&status=subscribed&limit=50"Response
200 OK— the call succeeded.400 Bad Request— missing or invalid list or query parameters.404 Not Found— list absent or outside the organization.401 Unauthorized— missing or invalid key, or its owner left the organization.429 Too Many Requests— over 120 requests in a minute for this key.
Response fields
| Field | Type | Description |
|---|---|---|
success | boolean | Indicates if the operation was successful |
data[].id | string | Unique identifier for the contact |
data[].email | string | Its address — unique inside its list |
data[].firstName | string | null | What you know of the person |
data[].lastName | string | null | Same |
data[].phone | string | null | International number: leading +, then 8–15 digits, first digit nonzero. Spaces, parentheses, periods and hyphens are removed. Local numbers, 00 prefixes and extensions are rejected; reachability is not checked. |
data[].birthDate | string | null | Real calendar date YYYY-MM-DD, year 0001–9999, no later than today in UTC. Returned as a date-only string. |
data[].locale | string | null | Well-formed BCP 47 language tag, trimmed and canonicalized (for example fr-fr → fr-FR), up to 100 characters. Not limited to the interface languages. |
data[].country | string | null | Two ASCII letters, trimmed and uppercased (for example fr → FR). Only the shape is checked, not membership in a country-code registry. |
data[].status | string | pending, subscribed, unsubscribed, bounced, complained |
data[].listId | string | The list it belongs to |
data[].list | object | {id, name} of that list |
data[].tags | array | {id, name} of every tag carried |
data[].customFields | object | Custom field values of the contact, by key: text, number, boolean, or a date as an ISO string in UTC. {} when the contact has no value. Only custom fields defined in your organization settings appear |
data[].attribution | object | {firstTouch}: the contact's entry point with the earliest capturedAt, or null when it has none. Always present. The last touch and the history are on Get a contact |
data[].createdAt | string | ISO creation date |
data[].updatedAt | string | ISO date of the last change |
pagination | object | {total, page, limit, totalPages} |
Example response
json
{
"success": true,
"data": [
{
"id": "4d19c0a2",
"email": "ada@example.com",
"firstName": "Ada",
"lastName": "Lovelace",
"phone": null,
"birthDate": null,
"locale": null,
"country": null,
"status": "subscribed",
"listId": "0b7c51e8",
"list": {
"id": "0b7c51e8",
"name": "Newsletter"
},
"tags": [
{
"id": "7c2ef4b1",
"name": "vip"
}
],
"customFields": {
"utm_source": "meta",
"signup_at": "2026-11-15T00:00:00.000Z"
},
"attribution": {
"firstTouch": {
"event": "api",
"channel": "meta",
"utmSource": "meta",
"utmMedium": "paid",
"utmCampaign": "webi-nov-test1",
"utmContent": null,
"utmTerm": null,
"fbclid": null,
"gclid": null,
"referrer": null,
"landingUrl": null,
"extra": {},
"capturedAt": "2026-11-01T09:00:00.000Z"
}
},
"createdAt": "2026-08-23T10:22:05.000Z",
"updatedAt": "2026-08-23T10:22:05.000Z"
}
],
"pagination": {
"total": 1,
"page": 1,
"limit": 20,
"totalPages": 1
}
}Notes
phone,birthDate,localeandcountryare optional. Omission preserves an existing value;nullclears it. Omitted fields on a new contact arenull. Empty strings are rejected.- A phone number does not grant permission to send SMS or WhatsApp messages. These profile fields do not change subscription status or consent.