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

# Resend: Inboxes Set Thread Labels

> Set the labels of an inbox thread. Includes SDK V2 guidance, input constraints, response fields, and Deepline credit cost.

Set the labels of an inbox thread.

> [!NOTE]
>
> Tool ID: `resend_inboxes_set_thread_labels`

## Run this action

Use the TypeScript SDK for one call. Use `ctx.tools.execute(...)` inside a Play for durable calls, scheduled calls, or CSV processing.

```ts theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
import { Deepline } from 'deepline';

const deepline = await Deepline.connect();
const result = await deepline.tools.execute(
  'resend_inboxes_set_thread_labels',
  {
    "inbox_id": "inbox_123",
    "thread_id": "123e4567-e89b-42d3-a456-426614174000",
    "labels": [
      "123e4567-e89b-42d3-a456-426614174000"
    ]
  },
);

console.log(result.toolResponse.raw);
```

### CLI

```bash theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
deepline run resend_inboxes_set_thread_labels --input '{
  "inbox_id": "inbox_123",
  "thread_id": "123e4567-e89b-42d3-a456-426614174000",
  "labels": [
    "123e4567-e89b-42d3-a456-426614174000"
  ]
}'
```

## Example response

The static output schema lacks the details for a reliable example. Use `deepline describe resend_inboxes_set_thread_labels --json` for the complete live contract.

## Input reference

Replaces every label on the thread with the given labels, in one atomic change. Labels on the thread that are not in the list are taken off it. The labels themselves are kept. An empty array takes every label off the thread. The response lists every label on the thread after the change. A label ID that is not a label of the inbox returns a 404 `Label not found.`, and nothing changes. A thread that does not exist in the inbox returns a 404 `Thread not found.`.

| Name | Type | Required | Default | Details |
| - | - | - | - | - |
| `payload.inbox_id` | `string` | Yes | — | The Inbox ID or the inbox email address, such as `support@acme.com`. A value that contains `@` must be a valid email address, and any other value must be a UUID, or the request returns a 422. The address match is case-insensitive and never falls back to the inbox `name`. An address that matches no inbox returns a 404. |
| `payload.thread_id` | `string` | Yes | — | The Thread ID. Format: `uuid`. |
| `payload.labels` | `array` | Yes | — | The IDs of the labels the thread carries after the change. Up to 100 IDs, each a label of the inbox. Pass an empty array to take every label off the thread. Maximum items: 100. |

<details>
  <summary>Show raw input schema</summary>

  ### Input JSON Schema

  ```json theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
  {
    "type": "object",
    "description": "Replaces every label on the thread with the given labels, in one atomic change. Labels on the thread that are not in the list are taken off it. The labels themselves are kept. An empty array takes every label off the thread. The response lists every label on the thread after the change. A label ID that is not a label of the inbox returns a 404 `Label not found.`, and nothing changes. A thread that does not exist in the inbox returns a 404 `Thread not found.`.",
    "properties": {
      "inbox_id": {
        "type": "string",
        "description": "The Inbox ID or the inbox email address, such as `support@acme.com`. A value that contains `@` must be a valid email address, and any other value must be a UUID, or the request returns a 422. The address match is case-insensitive and never falls back to the inbox `name`. An address that matches no inbox returns a 404."
      },
      "thread_id": {
        "type": "string",
        "description": "The Thread ID.",
        "format": "uuid"
      },
      "labels": {
        "type": "array",
        "description": "The IDs of the labels the thread carries after the change. Up to 100 IDs, each a label of the inbox. Pass an empty array to take every label off the thread.",
        "maxItems": 100,
        "items": {
          "type": "string",
          "format": "uuid"
        }
      }
    },
    "required": [
      "inbox_id",
      "thread_id",
      "labels"
    ],
    "additionalProperties": false
  }
  ```
</details>

## Output reference

Standard tool result payload.

| Name | Type | Required | Default | Details |
| - | - | - | - | - |
| `result.data` | `object` | Yes | — | Provider response payload. |
| `result.data.object` | `string` | Yes | — | Type of the response object. |
| `result.data.data` | `array` | Yes | — | Every label on the thread after the change. |
| `result.data.data[].id` | `string` | Yes | — | The ID of the label. Format: `uuid`. |
| `result.data.data[].name` | `string` | Yes | — | The name of the label. |
| `result.data.data[].color` | `string` | Yes | — | The color of the label, as a `#RRGGBB` hex color in uppercase. Pattern: `^#[0-9A-Fa-f]&#123;6&#125;$`. |
| `result.meta` | `object` | No | — | Additional response metadata (status, paging). |

<details>
  <summary>Show raw output schema</summary>

  ### Output JSON Schema

  ```json theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
  {
    "type": "object",
    "description": "Standard tool result payload.",
    "properties": {
      "data": {
        "type": "object",
        "description": "Provider response payload.",
        "properties": {
          "object": {
            "type": "string",
            "description": "Type of the response object."
          },
          "data": {
            "type": "array",
            "description": "Every label on the thread after the change.",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "description": "The ID of the label.",
                  "format": "uuid"
                },
                "name": {
                  "type": "string",
                  "description": "The name of the label."
                },
                "color": {
                  "type": "string",
                  "description": "The color of the label, as a `#RRGGBB` hex color in uppercase.",
                  "pattern": "^#[0-9A-Fa-f]{6}$"
                }
              },
              "required": [
                "id",
                "name",
                "color"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "object",
          "data"
        ],
        "additionalProperties": false
      },
      "meta": {
        "type": "object",
        "description": "Additional response metadata (status, paging).",
        "additionalProperties": true
      }
    },
    "required": [
      "data"
    ],
    "additionalProperties": false
  }
  ```
</details>

## Deepline cost

* Pricing model: `fixed` (per call).
* Estimated Deepline credits: `0` per pricing unit.
* Provider-native pricing may still exist outside Deepline credit billing.

## Related documentation

* [Connect integrations](https://deepline.com/docs/integrations.md)
* [SDK V2 quickstart](https://deepline.com/docs/sdk-v2/quickstart.md)
* [SDK reference](https://deepline.com/docs/sdk-v2/sdk-reference.md)
* [Run tools across a CSV](https://deepline.com/docs/sdk-v2/batch-csv.md)


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