> ## 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.

# Move Conversations to or from Spam

> Move up to 100 conversations into the Spam folder or back to the inbox

Move conversations into the Spam folder, or back to the inbox when the spam scan got it wrong. Mail sent to your inbox addresses that the inbound spam or virus scan flags already lands in Spam on its own. Spam conversations are left out of [List Conversations](./list) unless you pass `spam=true`, and out of unread and open counts.

Only conversations that move are updated, so you can safely retry a request after a timeout.

## Request

<ParamField body="conversationIds" type="string[]" required>
  Conversation IDs to move, 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="spam" type="boolean" required>
  `true` moves the conversations to Spam; `false` moves them back to the inbox.
</ParamField>

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

## Response

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

<ResponseField name="spam" type="boolean">
  Where the conversations were moved: `true` for Spam, `false` for the inbox.
</ResponseField>

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

<ResponseField name="updated" type="integer">
  Number of conversations that moved.
</ResponseField>

<ResponseField name="unchanged" type="integer">
  Number of conversations that were already there.
</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 that moved, in request order.
</ResponseField>

<ResponseField name="unchangedIds" type="string[]">
  IDs that were already there, 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,
    "spam": false,
    "requested": 2,
    "updated": 1,
    "unchanged": 0,
    "notFound": 1,
    "updatedIds": ["conv_abc123"],
    "unchangedIds": [],
    "notFoundIds": ["conv_missing"]
  }
  ```

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

  ```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 non-boolean `spam`, or a missing or non-array `conversationIds`, returns `422`. Rejected requests change no conversations. The API key needs the `conversations:write` scope.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.