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

# Update Conversation Statuses

> Open or close up to 100 conversations in one request

Open or close several conversations at once, for example every conversation on one page of [List Conversations](./list). Only conversations whose status changes are updated, so you can safely retry a request after a timeout: conversations that already have the status are reported as unchanged.

Closed conversations are reopened automatically when the subscriber replies or when you send a new outbound message.

## Request

<ParamField body="conversationIds" type="string[]" required>
  Conversation IDs to update, up to 100 distinct IDs. Surrounding whitespace is
  trimmed, and blank or repeated IDs are ignored before the limit is checked. At
  least one non-blank ID is required.
</ParamField>

<ParamField body="status" type="string" required>
  New status for every listed conversation: `open` or `closed`.
</ParamField>

```bash theme={null}
curl -X POST "https://api.sequenzy.com/api/v1/conversations/bulk/status" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"conversationIds": ["conv_abc123", "conv_def456", "conv_missing"], "status": "closed"}'
```

## Response

<ResponseField name="success" type="boolean">
  `true` when the request was processed.
</ResponseField>

<ResponseField name="status" type="string">
  The status that was applied: `open` or `closed`.
</ResponseField>

<ResponseField name="requested" type="integer">
  Number of distinct conversation IDs in the request.
</ResponseField>

<ResponseField name="updated" type="integer">
  Number of conversations whose status changed.
</ResponseField>

<ResponseField name="unchanged" type="integer">
  Number of conversations that already had the status.
</ResponseField>

<ResponseField name="notFound" type="integer">
  Number of IDs that do not exist in your company. They are skipped; the rest of
  the request still applies.
</ResponseField>

<ResponseField name="updatedIds" type="string[]">
  IDs whose status changed, in request order.
</ResponseField>

<ResponseField name="unchangedIds" type="string[]">
  IDs that already had the status, in request order.
</ResponseField>

<ResponseField name="notFoundIds" type="string[]">
  IDs that do not exist in your company, in request order.
</ResponseField>

<ResponseExample>
  ```json 200 theme={null}
  {
    "success": true,
    "status": "closed",
    "requested": 3,
    "updated": 1,
    "unchanged": 1,
    "notFound": 1,
    "updatedIds": ["conv_abc123"],
    "unchangedIds": ["conv_def456"],
    "notFoundIds": ["conv_missing"]
  }
  ```

  ```json 400 theme={null}
  {
    "error": "Provide at least one conversation ID"
  }
  ```

  ```json 400 (too many IDs) theme={null}
  {
    "error": "Provide at most 100 conversation IDs"
  }
  ```

  ```json 422 theme={null}
  {
    "type": "validation",
    "on": "body",
    "property": "/status",
    "message": "Expected union value",
    "summary": "Property 'status' must be one of: open, closed"
  }
  ```

  ```json 401 theme={null}
  {
    "success": false,
    "error": "Unauthorized"
  }
  ```

  ```json 403 theme={null}
  {
    "success": false,
    "error": "API key is missing required scope: conversations:write"
  }
  ```
</ResponseExample>

Requests whose `conversationIds` array has no usable IDs or more than 100 distinct IDs return `400`. A missing or unknown `status`, or a missing or non-array `conversationIds`, returns `422`. Rejected requests change no conversations. The API key needs the `conversations:write` scope.
