# Lists from your code (/docs/leads/lists/api)

Authenticated with `?privateKey=YOUR_KEY` (see [Authentication](/docs/authentication)).

<Endpoints ops={["GET /admin/lists", "POST /admin/lists", "GET /admin/lists/{id}", "DELETE /admin/lists/{id}", "DELETE /admin/lists/{id}/items", "POST /admin/lists/export-csv/{listId}", "PUT /v3/lists/{listId}/name"]} />

<ApiPlayground
  ops={["GET /admin/lists", "POST /admin/lists", "GET /admin/lists/{id}", "DELETE /admin/lists/{id}", "DELETE /admin/lists/{id}/items", "POST /admin/lists/export-csv/{listId}", "PUT /v3/lists/{listId}/name"]}
  method="get"
  path="/admin/lists"
  tool="list_lists"
  args={`{
  "websiteId": "64b7f0a1c2d3e4f5a6b7c8d9",
  "listType": "contact"
}`}
/>

## Use case: Create a list and export it [#use-case-create-a-list-and-export-it]

`POST /admin/lists?listType=contact` with `{ "websiteId": …, "name": "Q4 founders" }`, then `POST /admin/lists/export-csv/{listId}?listType=contact` — the file is emailed to you.
