The intercom API reference.
https://api.intercom.io/
https://api.eu.intercom.io/
https://api.au.intercom.io/
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
https://api.intercom.io/contacts/{contact_id}/subscriptions
https://api.eu.intercom.io/contacts/{contact_id}/subscriptions
https://api.au.intercom.io/contacts/{contact_id}/subscriptions
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.7' \
-d '{
"id": 16,
"consent_type": "opt_in"
}'
{ "type": "subscription", "id": "16", "state": "live", "consent_type": "opt_in", "default_translation": { "name": "Newsletters", "description": "Lorem ipsum dolor sit amet", "locale": "en" }, "translations": [ { … } ], "content_types": [ "sms_message" ] }
https://api.intercom.io/contacts/{contact_id}/subscriptions/{id}
https://api.eu.intercom.io/contacts/{contact_id}/subscriptions/{id}
https://api.au.intercom.io/contacts/{contact_id}/subscriptions/{id}
curl -i -X DELETE \
https://api.intercom.io/contacts/63a07ddf05a32042dffac965/subscriptions/37846 \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'Intercom-Version: 2.7'
{ "type": "subscription", "id": "32", "state": "live", "consent_type": "opt_in", "default_translation": { "name": "Newsletters", "description": "Lorem ipsum dolor sit amet", "locale": "en" }, "translations": [ { … } ], "content_types": [ "sms_message" ] }