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

# Intercom: Attach Tag To Contact

> Add a tag to an Intercom contact. Includes SDK V2 guidance, input constraints, response fields, and Deepline credit cost.

Add a tag to an Intercom contact.

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

## 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(
  'intercom_attach_tag_to_contact',
  {
    "contact_id": "contact_123",
    "id": "id_123"
  },
);

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

### CLI

```bash theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
deepline tools execute intercom_attach_tag_to_contact --input '{
  "contact_id": "contact_123",
  "id": "id_123"
}' --json
```

## Example response

The SDK returns this shape at `result.toolResponse.raw`. The example values illustrate the response.

```json theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
{
  "data": {
    "type": "example",
    "id": "id_123",
    "name": "Example"
  }
}
```

Use `deepline describe intercom_attach_tag_to_contact --json` for the latest machine-readable contract.

## Input reference

You can tag a specific contact. This will return a tag object for the tag that was added to the contact.

| Name | Type | Required | Default | Details |
| - | - | - | - | - |
| `payload.contact_id` | `string` | Yes | — | The unique identifier for the contact which is given by Intercom |
| `payload.id` | `string` | Yes | — | The unique identifier for the tag which is given by Intercom |

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

  ### Input JSON Schema

  ```json theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
  {
    "type": "object",
    "description": "You can tag a specific contact. This will return a tag object for the tag that was added to the contact.",
    "properties": {
      "contact_id": {
        "type": "string",
        "description": "The unique identifier for the contact which is given by Intercom"
      },
      "id": {
        "type": "string",
        "description": "The unique identifier for the tag which is given by Intercom"
      }
    },
    "required": [
      "contact_id",
      "id"
    ],
    "additionalProperties": false
  }
  ```
</details>

## Output reference

Standard tool result payload.

| Name | Type | Required | Default | Details |
| - | - | - | - | - |
| `result.data` | `object` | Yes | — | A tag allows you to label your contacts, companies, and conversations and list them using that tag. |
| `result.data.type` | `string` | No | — | value is "tag" |
| `result.data.id` | `string` | No | — | The id of the tag |
| `result.data.name` | `string` | No | — | The name of the tag |
| `result.data.applied_at` | `integer \| null` | No | — | The time when the tag was applied to the object. Only present when the tag is returned as part of a tagging operation on a contact, conversation, or ticket. Format: `date-time`. |
| `result.data.applied_by` | `object \| null` | No | — | reference to another object |
| `result.data.applied_by.type` | `string` | No | — | — |
| `result.data.applied_by.id` | `string \| null` | No | — | — |
| `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": "A tag allows you to label your contacts, companies, and conversations and list them using that tag.",
        "properties": {
          "type": {
            "type": "string",
            "description": "value is \"tag\""
          },
          "id": {
            "type": "string",
            "description": "The id of the tag"
          },
          "name": {
            "type": "string",
            "description": "The name of the tag"
          },
          "applied_at": {
            "type": [
              "integer",
              "null"
            ],
            "description": "The time when the tag was applied to the object. Only present when the tag is returned as part of a tagging operation on a contact, conversation, or ticket.",
            "format": "date-time"
          },
          "applied_by": {
            "type": [
              "object",
              "null"
            ],
            "description": "reference to another object",
            "properties": {
              "type": {
                "type": "string"
              },
              "id": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "additionalProperties": false
          }
        },
        "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

* [Intercom provider guide](https://deepline.com/docs/providers/intercom/guide.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.