> ## Documentation Index
> Fetch the complete documentation index at: https://docs.voyantcloud.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Update List

> Update a marketing list's name, description, or settings.

## Method

`PATCH` `/v1/comms/lists/:id`

## Path Parameters

<ParamField path="id" type="string" required>The list ID.</ParamField>

## Headers

<ParamField header="Authorization" type="string" required>Bearer token (requires `comms:write`).</ParamField>
<ParamField header="Content-Type" type="string" required>`application/json`</ParamField>

## Body Parameters

<ParamField body="name" type="string">Updated name (max 255 characters).</ParamField>
<ParamField body="description" type="string">Updated description (max 1000 characters). Pass `null` to clear.</ParamField>
<ParamField body="doubleOptIn" type="boolean">Update double opt-in setting.</ParamField>

## Request Example

<RequestExample>
  ```bash cURL theme={null}
  curl -X PATCH "https://api.voyantcloud.com/v1/comms/lists/lists_01J0CBFPXW7SP2N8A9Q7T2048Q" \
    -H "Authorization: Bearer $VOYANT_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "name": "Weekly Newsletter",
      "description": "Updated description"
    }'
  ```

  ```javascript Node.js theme={null}
  const listId = "lists_01J0CBFPXW7SP2N8A9Q7T2048Q"
  const res = await fetch(`https://api.voyantcloud.com/v1/comms/lists/${listId}`, {
    method: "PATCH",
    headers: {
      Authorization: `Bearer ${process.env.VOYANT_API_KEY}`,
      "Content-Type": "application/json",
    },
    body: JSON.stringify({
      name: "Weekly Newsletter",
    }),
  })
  const list = await res.json()
  ```

  ```python Python theme={null}
  import os, requests

  list_id = "lists_01J0CBFPXW7SP2N8A9Q7T2048Q"
  resp = requests.patch(
    f"https://api.voyantcloud.com/v1/comms/lists/{list_id}",
    json={"name": "Weekly Newsletter"},
    headers={"Authorization": f"Bearer {os.environ['VOYANT_API_KEY']}"},
  )
  list_data = resp.json()
  ```
</RequestExample>

## Response Example

<ResponseExample>
  ```json 200 OK theme={null}
  {
    "id": "lists_01J0CBFPXW7SP2N8A9Q7T2048Q",
    "workspace_id": "workspaces_01HZYPM2QF2R8X9SZQ0J9SYBCN",
    "name": "Weekly Newsletter",
    "description": "Updated description",
    "source": "signup_form",
    "double_opt_in": true,
    "member_count": 1523,
    "created_at": "2025-01-08T10:22:31.000Z",
    "updated_at": "2025-02-02T15:30:00.000Z"
  }
  ```

  ```json 404 Not Found theme={null}
  {
    "error": "List not found"
  }
  ```
</ResponseExample>
