Get Contact List Details
Using the SDK
// Download the helper library from https://www.npmjs.com/package/dropcowboy
const { DropCowboy } = require("dropcowboy"); // Or, for ESM: import { DropCowboy } from "dropcowboy";
// Find your Team ID and Secret at dropcowboy.com/appv1/#/api
// and set the environment variables.
const teamId = process.env.DROPCOWBOY_TEAM_ID;
const secret = process.env.DROPCOWBOY_SECRET;
const client = new DropCowboy({ teamId: teamId, secret: secret });
async function getList(listId) {
const list = await client.getContactList(listId);
console.log(list);
};
getList("00000000-0000-0000-0000-000000000000");API Endpoint
Example Request
Required Headers
Required URL Path Parameters
Authorizations
x-team-id / x-secretstringRequired
Requires two headers: x-team-id and x-secret. Both must be sent with each request.
Path parameters
list_idstringRequired
Responses
200
List details including contact_count.
application/json
list_idstringOptional
The UUID of the list. Use this value in other calls to the contact list api endpoints. It is safe to cache this value client side in your app.
list_namestringOptional
A string containing the name of the list.
created_atintegerOptional
Milliseconds since epoch of when the list was created.
contact_countintegerOptional
The total number of contacts in the list.
get
/list/{list_id}200
List details including contact_count.
Example Response
Last updated
Was this helpful?