> ## 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 Subscription Type To Contact: Inputs, Cost

> Add subscription to a contact. Includes inputs, outputs, pricing notes, Deepline CLI examples, and GTM automation guidance.

## Run in Enrichment Spreadsheet

<Info>
  Use this function as a column step in `deepline enrich`.
</Info>

```bash theme={null}
deepline enrich --input leads.csv --output leads.enriched.csv --with 'result=intercom_attach_subscription_type_to_contact:{"contact_id":"{{contact_id}}","id":"{{id}}","consent_type":"{{consent_type}}"}' --json
```

<Tip>
  Map payload values to spreadsheet columns with `{{column_name}}` placeholders.
</Tip>

## Input Schema

| Name                   | Type     | Required | Default | Description                                                           |
| ---------------------- | -------- | -------- | ------- | --------------------------------------------------------------------- |
| `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 subscription which is given by Intercom |
| `payload.consent_type` | `string` | Yes      |         | The consent\_type of a subscription, opt\_out or opt\_in.             |

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

  ### Input JSON Schema

  ```json theme={null}
  {
    "type": "object",
    "description": "You can add a specific subscription to a contact. In Intercom, we have two different subscription types based on user consent - opt-out and opt-in: 1.Attaching a contact to an opt-out subscription type will opt that user out from receiving messages related to that subscription type. 2.Attaching a contact to an opt-in subscription type will opt that user in to receiving messages related to that subscription type. This will return a subscription type model for the subscription type 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 subscription which is given by Intercom"
      },
      "consent_type": {
        "type": "string",
        "description": "The consent_type of a subscription, opt_out or opt_in."
      }
    },
    "required": [
      "contact_id",
      "id",
      "consent_type"
    ],
    "additionalProperties": false
  }
  ```
</details>

## Output Schema

| Name          | Type     | Required | Default | Description                                                                                                                 |
| ------------- | -------- | -------- | ------- | --------------------------------------------------------------------------------------------------------------------------- |
| `result.data` | `object` | Yes      |         | A subscription type lets customers easily opt out of non-essential communications without missing what's important to them. |
| `result.meta` | `object` | No       |         | Additional response metadata (status, paging).                                                                              |

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

  ### Output JSON Schema

  ```json theme={null}
  {
    "type": "object",
    "description": "Standard tool result payload.",
    "properties": {
      "data": {
        "type": "object",
        "description": "A subscription type lets customers easily opt out of non-essential communications without missing what's important to them.",
        "properties": {
          "type": {
            "type": "string",
            "description": "The type of the object - subscription"
          },
          "id": {
            "type": "string",
            "description": "The unique identifier representing the subscription type."
          },
          "state": {
            "type": "string",
            "description": "The state of the subscription type.",
            "enum": [
              "live",
              "draft",
              "archived"
            ]
          },
          "default_translation": {
            "type": "object",
            "description": "A translation object contains the localised details of a subscription type.",
            "properties": {
              "name": {
                "type": "string",
                "description": "The localised name of the subscription type."
              },
              "description": {
                "type": "string",
                "description": "The localised description of the subscription type."
              },
              "locale": {
                "type": "string",
                "description": "The two character identifier for the language of the translation object."
              }
            },
            "additionalProperties": false
          },
          "translations": {
            "type": "array",
            "description": "An array of translations objects with the localised version of the subscription type in each available locale within your translation settings.",
            "items": {
              "type": "object",
              "description": "A translation object contains the localised details of a subscription type.",
              "properties": {
                "name": {
                  "type": "string",
                  "description": "The localised name of the subscription type."
                },
                "description": {
                  "type": "string",
                  "description": "The localised description of the subscription type."
                },
                "locale": {
                  "type": "string",
                  "description": "The two character identifier for the language of the translation object."
                }
              },
              "additionalProperties": false
            }
          },
          "consent_type": {
            "type": "string",
            "description": "Describes the type of consent.",
            "enum": [
              "opt_out",
              "opt_in"
            ]
          },
          "content_types": {
            "type": "array",
            "description": "The message types that this subscription supports - can contain `email` or `sms_message`.",
            "items": {
              "type": "string",
              "enum": [
                "email",
                "sms_message"
              ]
            }
          }
        },
        "additionalProperties": false
      },
      "meta": {
        "type": "object",
        "description": "Additional response metadata (status, paging).",
        "additionalProperties": true
      }
    },
    "required": [
      "data"
    ],
    "additionalProperties": false
  }
  ```
</details>

## Advanced: Direct CLI

<Info>
  Use direct execution for single payload debugging.
</Info>

```bash theme={null}
deepline tools execute intercom_attach_subscription_type_to_contact --payload '{
  "contact_id": "string",
  "id": "string",
  "consent_type": "string"
}' --json
```

### CLI flags

| Flag                        | Description                                         |
| --------------------------- | --------------------------------------------------- |
| `--json`                    | Print machine-readable output.                      |
| `--wait`                    | Wait for terminal provider status when supported.   |
| `--debug`                   | Enable wait mode with additional status/log output. |
| `--wait-timeout SECONDS`    | Max seconds to wait in wait mode.                   |
| `--poll-interval SECONDS`   | Polling interval in seconds during wait mode.       |
| `--timeout SECONDS`         | Request timeout in seconds.                         |
| `--connect-timeout SECONDS` | Connection timeout in seconds.                      |

## Cost

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