For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Help CenterAPI KeysStatusSign In
GuidesAPI ReferenceChangelog
GuidesAPI ReferenceChangelog
  • Introduction
    • Getting started
  • Email API
  • Transactional SMS
  • Transactional WhatsApp
  • Marketing Campaigns
  • Contact Management
      • POSTCreate a list
      • GETGet a list's details
      • GETGet all the lists
      • PUTUpdate a list
      • DELDelete a list
      • GETGet contacts in a list
      • POSTDelete a contact from a list
      • POSTAdd existing contacts to a list
  • Events
    • GETGet events
    • POSTCreate an event
    • POSTCreate events in batch
  • Object Management
  • Accounts and Settings
  • Sales CRM
  • Conversations
  • Ecommerce
  • Loyalty
LogoLogo
Help CenterAPI KeysStatusSign In
Contact ManagementLists

Get contacts in a list

GET
https://api.brevo.com/v3/contacts/lists/:listId/contacts
GET
/v3/contacts/lists/:listId/contacts
1import { BrevoClient } from "@getbrevo/brevo";
2
3async function main() {
4 const client = new BrevoClient({
5 apiKey: "YOUR_API_KEY_HERE",
6 });
7 await client.contacts.getContactsFromList(1, {});
8}
9main();
1{
2 "contacts": [
3 {
4 "attributes": {
5 "DOB": "2010-12-31",
6 "FIRSTNAME": "Alex",
7 "GENDER": "Kid",
8 "LASTNAME": "Pain"
9 },
10 "createdAt": "2017-05-12T12:30:00Z",
11 "emailBlacklisted": false,
12 "id": 45,
13 "listIds": [
14 12,
15 9,
16 20
17 ],
18 "modifiedAt": "2017-05-12T12:30:00Z",
19 "smsBlacklisted": true,
20 "whatsappBlacklisted": false,
21 "email": "alex.pain@example.com",
22 "listUnsubscribed": [
23 1,
24 2
25 ]
26 },
27 {
28 "attributes": {
29 "DOB": "1986-06-21",
30 "FIRSTNAME": "John",
31 "GENDER": "Men",
32 "LASTNAME": "Smith"
33 },
34 "createdAt": "2017-05-12T12:30:00Z",
35 "emailBlacklisted": true,
36 "id": 32,
37 "listIds": [
38 12
39 ],
40 "modifiedAt": "2017-05-12T12:30:00Z",
41 "smsBlacklisted": false,
42 "whatsappBlacklisted": false,
43 "email": "john.smith@example.com",
44 "listUnsubscribed": [
45 1
46 ]
47 },
48 {
49 "attributes": {
50 "DOB": "1988-11-02",
51 "FIRSTNAME": "Helen",
52 "GENDER": "Women",
53 "LASTNAME": "Rose",
54 "SMS": "3375599887766"
55 },
56 "createdAt": "2017-05-12T12:30:00Z",
57 "emailBlacklisted": true,
58 "id": 65,
59 "listIds": [
60 12,
61 9,
62 20
63 ],
64 "modifiedAt": "2017-05-12T12:30:00Z",
65 "smsBlacklisted": false,
66 "whatsappBlacklisted": false,
67 "email": "helen.rose@example.com",
68 "listUnsubscribed": [
69 1
70 ]
71 }
72 ],
73 "count": 17655
74}

Retrieve all contacts belonging to a specific list, identified by its list ID. Results are paginated with a default of 50 contacts per page (maximum 500) and sorted in descending order of creation. You can optionally filter contacts by their modification date using the modifiedSince parameter.

Was this page helpful?
Previous

Delete a contact from a list

Next
Built with

Authentication

api-keystring

The API key should be passed in the request headers as api-key for authentication.

Path parameters

listIdlongRequired
Id of the list

Query parameters

modifiedSincestringOptional

Filter (urlencoded) the contacts modified after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result.

limitlongOptional1-500Defaults to 50
Number of documents per page
offsetlongOptionalDefaults to 0
Index of the first document of the page
sortenumOptionalDefaults to desc

Sort the results in the ascending/descending order of record creation. Default order is descending if sort is not passed

Allowed values:

Response

Contact informations
contactslist of objects
countlong
Number of contacts

Errors

400
Bad Request Error
404
Not Found Error
429
Too Many Requests Error