Create Contact List

This endpoint allows users to create a new list by providing a name for the 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

POST


Example Request

Required Headers

  • x-team-id - Your Team ID from API settings

  • x-secret - Your Secret Key from API settings

Required Body Parameters

  • list_name (string) - The name of the list to be created. This parameter is required.

Create contact list

post
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
chevron-right
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
/list
200

Created. Returns list_id, list_name, created_at.


Example Response

The response will include list metadata.

Last updated

Was this helpful?