DocsBuilding AppsInstalling IntercomAPI & Webhook ReferenceCanvas Kit Reference
DocsApp StoreForumBlogYour Apps

Attach a contact

Example Request & Response

$ curl https://api.intercom.io/contacts/<id>/subscriptions \
-X POST \
-H 'Authorization:Bearer <Your access token>' \
-H 'Accept:application/json' -d

{
  "id": "1",
  "consent_type": "opt_out"
}
HTTP/1.1 200 OK
{
  "type": "subscription",
  "id": "1",
  "state": "live",
  "default_translation": {
    "name": "Announcements",
    "description": "Offers, product and feature announcements",
    "locale": "en"
  },
  "translations": [
    {
      "name": "Ankündigungen",
      "description": "Angebote, Produkt- und Funktionsankündigungen",
      "locale": "de"
    },
    {
      "name": "Announcements",
      "description": "Offers, product and feature announcements",
      "locale": "en"
    }
  ]
  "consent_type": "opt_out"
}
Example Errors

HTTP/1.1 404 NOT FOUND
{
  "type": "error.list",
  "request_id": "9a3d0816-9707-4598-977e-c009ba630148",
  "errors": [
    {
      "code": "not_found",
      "message": "User Not Found"
    }
  ]
}
HTTP/1.1 404 NOT FOUND
{
  "type": "error.list",
  "request_id": "060932ab-ab9d-4f89-88f3-d0152d005873",
  "errors": [
    {
      "code": "not_found",
      "message": "Resource Not Found"
    }
  ]
}

You can opt out a single contact.

Request Path Parameter

Attribute

Type

Description

id

String

The unique identifier for the contact which is given by Intercom

Request Body Parameter

Attribute

Type

Description

id

String

The unique identifier for the subscription type which is given by Intercom

consent_type

String

The consent_type of the subscription, currently only opt_out is supported.

Response

This will return a Subscription Type model for the subscription type that was added to the contact.