younifyd
Menu

Attach Subscription Type To Contact

Add subscription to a contact

POST/contacts/{contact_id}/subscriptions

Use it in a workflow

  1. Add a step and choose the Intercom connector.
  2. Pick the Attach Subscription Type To Contact action (under Subscription Types).
  3. Fill in the fields below, then reference the result from later steps as {{attachSubscriptionTypeToContact.response.data}}.

Request

Path parameters

contact_idstringrequired

The unique identifier for the contact which is given by Intercom

Headers

Intercom-Versionstring

Intercom API version.</br>By default, it's equal to the version set in the app package.

One of1.01.11.21.31.42.02.12.22.32.42.52.62.72.82.92.102.112.122.132.142.152.16Default "2.16"

Request body

Enter the body as JSON in the step's Body field.

idstringrequired

The unique identifier for the subscription which is given by Intercom

consent_typestringrequired

The consent_type of a subscription, opt_out or opt_in.

json
{
  "id": "37846",
  "consent_type": "opt_in"
}

Response

Returns 200 with an object. Read it in later steps with {{attachSubscriptionTypeToContact.response.data.<field>}}.

typestring

The type of the object - subscription

idstring

The unique identifier representing the subscription type.

statestring

The state of the subscription type.

One oflivedraftarchived

default_translationobject

A translation object contains the localised details of a subscription type.

namestring

The localised name of the subscription type.

descriptionstring

The localised description of the subscription type.

localestring

The two character identifier for the language of the translation object.

translationsarray<object>

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

namestring

The localised name of the subscription type.

descriptionstring

The localised description of the subscription type.

localestring

The two character identifier for the language of the translation object.

consent_typestring

Describes the type of consent.

One ofopt_outopt_in

content_typesarray<string>

The message types that this subscription supports - can contain `email` or `sms_message`.

json
{
  "type": "subscription",
  "id": "123456",
  "state": "live",
  "default_translation": {
    "name": "Announcements",
    "description": "Offers, product and feature announcements",
    "locale": "en"
  },
  "translations": [
    {
      "name": "Announcements",
      "description": "Offers, product and feature announcements",
      "locale": "en"
    }
  ],
  "consent_type": "opt_in",
  "content_types": [
    "email"
  ]
}

Need more? See the Intercom guide for connection setup and behaviour shared by every action.