# Add subscription to a contact

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.

Endpoint: POST /contacts/{contact_id}/subscriptions
Version: Preview
Security: bearerAuth

## Header parameters:

  - `Intercom-Version` (string)
    Intercom API version.By default, it's equal to the version set in the app package.
    Enum: "1.0", "1.1", "1.2", "1.3", "1.4", "2.0", "2.1", "2.2", "2.3", "2.4", "2.5", "2.6", "2.7", "2.8", "2.9", "2.10", "2.11", "2.12", "2.13", "2.14", "Preview"

## Path parameters:

  - `contact_id` (string, required)
    The unique identifier for the contact which is given by Intercom
    Example: "63a07ddf05a32042dffac965"

## Request fields (application/json):

  - `id` (string, required)
    The unique identifier for the subscription which is given by Intercom
    Example: "37846"

  - `consent_type` (string, required)
    The consent_type of a subscription, opt_out or opt_in.
    Example: "opt_in"

## Response 200 fields (application/json):

  - `type` (string)
    The type of the object - subscription
    Example: "subscription"

  - `id` (string)
    The unique identifier representing the subscription type.
    Example: "123456"

  - `state` (string)
    The state of the subscription type.
    Enum: "live", "draft", "archived"

  - `default_translation` (object)
    A translation object contains the localised details of a subscription type.

  - `default_translation.name` (string)
    The localised name of the subscription type.
    Example: "Announcements"

  - `default_translation.description` (string)
    The localised description of the subscription type.
    Example: "Offers, product and feature announcements"

  - `default_translation.locale` (string)
    The two character identifier for the language of the translation object.
    Example: "en"

  - `translations` (array)
    An array of translations objects with the localised version of the subscription type in each available locale within your translation settings.

  - `consent_type` (string)
    Describes the type of consent.
    Enum: "opt_out", "opt_in"

  - `content_types` (array)
    The message types that this subscription supports - can contain email or sms_message.
    Enum: "email", "sms_message"

## Response 401 fields (application/json):

  - `type` (string, required)
    The type is error.list
    Example: "error.list"

  - `request_id` (string,null)
    Example: "f93ecfa8-d08a-4325-8694-89aeb89c8f85"

  - `errors` (array, required)
    An array of one or more error objects

  - `errors.code` (string, required)
    A string indicating the kind of error, used to further qualify the HTTP response code
    Example: "unauthorized"

  - `errors.message` (string,null)
    Optional. Human readable description of the error.
    Example: "Access Token Invalid"

  - `errors.field` (string,null)
    Optional. Used to identify a particular field or query parameter that was in error.
    Example: "email"


