> For the complete documentation index, see [llms.txt](https://drop-cowboy.gitbook.io/drop-cowboy-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://drop-cowboy.gitbook.io/drop-cowboy-docs/api/contact-lists/delete-contact-list.md).

# Delete Contact List

This endpoint allows users to delete a specific list by providing the unique identifier `list_id`.

***

### Using the SDK <a href="#using-the-sdk" id="using-the-sdk"></a>

```javascript
// 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 deleteList(listId) {
      const list = await client.deleteContactList(listId);

      console.log(list);
};

deleteList("00000000-0000-0000-0000-000000000000");
```

***

### API Endpoint <a href="#api-endpoint" id="api-endpoint"></a>

DELETE

```bash
https://api.dropcowboy.com/v1/list/{list_id}
```

***

### Example Request <a href="#example-request" id="example-request"></a>

#### Required Headers

* `x-team-id` - Your Team ID from API settings
* `x-secret` - Your Secret Key from API settings

#### Required URL Path Parameters

* `list_id` (string) - The unique identifier of the list that you wish to delete. This parameter is required.

## DELETE /list/{list\_id}

> Delete contact list

```json
{"openapi":"3.1.0","info":{"title":"Drop Cowboy Public API","version":"1.0.0"},"servers":[{"url":"https://api.dropcowboy.com/v1"}],"security":[{"teamSecretAuth":[]}],"components":{"securitySchemes":{"teamSecretAuth":{"type":"apiKey","in":"header","name":"x-team-id / x-secret","description":"Requires two headers: `x-team-id` and `x-secret`.   Both must be sent with each request.\n"}}},"paths":{"/list/{list_id}":{"delete":{"summary":"Delete contact list","parameters":[{"name":"list_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"200 OK on success"}}}}}}
```

***

### Example Response <a href="#example-response" id="example-response"></a>

The response will have a 200 OK status code and a payload with the deleted `list_id` on successful deletion.

```json
{
    "list_id": "00000000-0000-0000-0000-000000000000"
}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://drop-cowboy.gitbook.io/drop-cowboy-docs/api/contact-lists/delete-contact-list.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
