Create Contact List
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 createList() {
const list = await client.createContactList({ list_name: "My Contacts" });
console.log(list);
};
createList();API Endpoint
Example Request
Required Headers
Required Body Parameters
Authorizations
x-team-id / x-secretstringRequired
Requires two headers: x-team-id and x-secret. Both must be sent with each request.
Body
list_namestringRequired
Responses
200
Created. Returns list_id, list_name, created_at.
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.
post
/list200
Created. Returns list_id, list_name, created_at.
Example Response
Last updated
Was this helpful?