Intercom API (2.11)
The intercom API reference.
https://api.intercom.io/
https://api.eu.intercom.io/
https://api.au.intercom.io/
Request
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.
The unique identifier for the subscription which is given by Intercom
- The production API server
https://api.intercom.io/contacts/{contact_id}/subscriptions
- The european API server
https://api.eu.intercom.io/contacts/{contact_id}/subscriptions
- The australian API server
https://api.au.intercom.io/contacts/{contact_id}/subscriptions
- curl
- Node.js
- Ruby
- PHP
- Python
- Java
- Go
- C#
- R
curl -i -X POST \
https://api.intercom.io/contacts/63a07ddf05a32042dffac965/subscriptions \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'Content-Type: application/json' \
-H 'Intercom-Version: 2.11' \
-d '{
"id": 108,
"consent_type": "opt_in"
}'
Successful
A translation object contains the localised details of a subscription type.
The localised name of the subscription type.
The localised description of the subscription type.
An array of translations objects with the localised version of the subscription type in each available locale within your translation settings.
The localised name of the subscription type.
The localised description of the subscription type.
{ "type": "subscription", "id": "108", "state": "live", "consent_type": "opt_in", "default_translation": { "name": "Newsletters", "description": "Lorem ipsum dolor sit amet", "locale": "en" }, "translations": [ { … } ], "content_types": [ "sms_message" ] }
- The production API server
https://api.intercom.io/contacts/{contact_id}/subscriptions/{subscription_id}
- The european API server
https://api.eu.intercom.io/contacts/{contact_id}/subscriptions/{subscription_id}
- The australian API server
https://api.au.intercom.io/contacts/{contact_id}/subscriptions/{subscription_id}
- curl
- Node.js
- Ruby
- PHP
- Python
- Java
- Go
- C#
- R
curl -i -X DELETE \
https://api.intercom.io/contacts/63a07ddf05a32042dffac965/subscriptions/37846 \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'Intercom-Version: 2.11'
Successful
A translation object contains the localised details of a subscription type.
The localised name of the subscription type.
The localised description of the subscription type.
An array of translations objects with the localised version of the subscription type in each available locale within your translation settings.
The localised name of the subscription type.
The localised description of the subscription type.
{ "type": "subscription", "id": "124", "state": "live", "consent_type": "opt_in", "default_translation": { "name": "Newsletters", "description": "Lorem ipsum dolor sit amet", "locale": "en" }, "translations": [ { … } ], "content_types": [ "sms_message" ] }