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

https://api.dropcowboy.com/v1/list

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
200

Created. Returns list_id, list_name, created_at.

application/json
post
/list
200

Created. Returns list_id, list_name, created_at.


Example Response

The response will include list metadata.

Last updated

Was this helpful?