Create new subscription
This method allows you to create a new webhook subscription. You can subscribe to one or more of the available event types associated with the supported entities. Click here to see the complete list of supported event types.
Refer to the sample window on the right for subscription examples across different entities.
Sample Webhook Subscription Request
The following sample demonstrates how to submit an event subscription request. It's important to note that certain entities support event generation across all their instances. For example, to receive notifications whenever a preference is added to any filter in your MyPreferences account, include 'AllFilters' in the Filters array when subscribing to the preference.added event. If you prefer to receive events for only specific filters, provide the corresponding filter IDs in the Filters array instead.
- Preferences : [AllFilters]
- Consents: [AllConsents]
- Contacts: [AllContactTypes]
- Groups: [AllGroups]
- Custom Fields: [AllCustomFields]
{ "Name": "Webhook - Consent and Preference Updates", "Description": "consent and preference data updates", "LocaleID": "en_US", "Url": "https://eowju7xe3jismp9.m.mywehookURL.net/", "Subscriptions": [ { "Entity": "Contacts", "EventType": "contacts.alternateid.added", "ContactTypes": [ "AllContactTypes" ] }, { "Entity": "Consents", "EventType": "consent.added", "ConsentTypes": [ "AllConsents" ] }, { "Entity": "Consents", "EventType": "consent.deactivated", "ConsentTypes": [ "AllConsents" ] }, { "Entity": "Consents", "EventType": "consent.elementassociation.created", "ConsentTypes": [ "AllConsents" ] }, { "Entity": "Consents", "EventType": "consent.elementassociation.updated", "ConsentTypes": [ "AllConsents" ] }, { "Entity": "Consents", "EventType": "consent.filterassociation.created", "ConsentTypes": [ "AllConsents" ] }, { "Entity": "Consents", "EventType": "consent.filterassociation.updated", "ConsentTypes": [ "AllConsents" ] }, { "Entity": "Consents", "EventType": "consent.elementassociation.deactivated", "ConsentTypes": [ "AllConsents" ] }, { "Entity": "Consents", "EventType": "consent.filterassociation.deactivated", "ConsentTypes": [ "AllConsents" ] }, { "Entity": "Consents", "EventType": "consent.updated", "ConsentTypes": [ "AllConsents" ] }, { "Entity": "Contacts", "EventType": "contacts.address.added", "ContactTypes": [ "AllContactTypes" ] }, { "Entity": "Contacts", "EventType": "contacts.address.deleted", "ContactTypes": [ "AllContactTypes" ] }, { "Entity": "Contacts", "EventType": "contacts.address.updated", "ContactTypes": [ "AllContactTypes" ] }, { "Entity": "Contacts", "EventType": "contacts.email.added", "ContactTypes": [ "AllContactTypes" ] }, { "Entity": "Contacts", "EventType": "contacts.email.deleted", "ContactTypes": [ "AllContactTypes" ] }, { "Entity": "Contacts", "EventType": "contacts.email.updated", "ContactTypes": [ "AllContactTypes" ] }, { "Entity": "Contacts", "EventType": "contacts.phone.updated", "ContactTypes": [ "Personal", "Work" ] }, { "Entity": "CustomFields", "EventType": "customfield.added", "CustomFields": [ "AllCustomFields" ] }, { "Entity": "CustomFields", "EventType": "customfield.deleted", "CustomFields": [ "AllCustomFields" ] }, { "Entity": "CustomFields", "EventType": "customfield.updated", "CustomFields": [ "AllCustomFields" ] }, { "Entity": "Groups", "EventType": "group.added", "Groups": [ "AllGroups" ] }, { "Entity": "Groups", "EventType": "group.deactivated", "Groups": [ "AllGroups" ] }, { "Entity": "Groups", "EventType": "group.updated", "Groups": [ "AllGroups" ] }, { "Entity": "Preferences", "EventType": "preference.added", "Filters": [ "AllFilters" ] }, { "Entity": "Preferences", "EventType": "preference.archived", "Filters": [ "AllFilters" ] }, { "Entity": "Preferences", "EventType": "preference.updated", "Filters": [ "AllFilters" ] }, { "Entity": "ProfileActions", "EventType": "profile.created" }, { "Entity": "ProfileActions", "EventType": "profile.updated" }, { "Entity": "ProfileActions", "EventType": "profile.deleted" }, { "Entity": "Tags", "EventType": "tag.added" }, { "Entity": "Tags", "EventType": "tag.deleted" }, { "Entity": "StandardFields", "EventType": "standardfield.defaultlocale.updated" }, { "Entity": "StandardFields", "EventType": "standardfield.registrationstatus.updated" } ], "IsMinimized": false, "State": "Active", "IsActive": true}Header Parameters
Authorization token
Type of the data being sent in the request or the data that is expected in the response. Supports application/json.
Path Parameters
This is your organization’s MyPreferences account Id.
Body Parameters
Name of the subscription.
Description of the subscription.
LocaleId used to return localized name and description for the event.
URL associated with the subscription to receive POST requests for events. Only secure (htttps) URL's are supported
The status of the subscription whether it's active and sending notifications, paused, or inactive. If you don't specify a state with your request, the default state of "Paused" will be applied.
ActivePausedIf set to true, the event notifications will only include the main event information without any data associated with it. Receiving systems must retrieve the data by other means.
Indicates whether the webhook subscription is active or not. Deactivating a subscription will result in its deletion. Please deactivate a subscription only when you no longer wish to receive event notifications. If you wish to temporarily pause event notifications, you can achieve this by using the 'State' parameter and setting it to 'Paused'.
If set to true, the system delivers events generated during the paused period, up to a maximum of 15 days, prior to resumption.
Collection of event subscriptions. Check out subscription examples for various entities in the upper right corner.
Show child attributes
Type Name associated with an active AlternateId Type. If available, will be returned instead of the profileId.
Response
Response Attributes
System generated read-only value that uniquely identifies the webhook subscription.
Name of the webhook subscription.
Description of the webhook subscription
LocaleId used to return localized name and description for the event.
Url associated with the subscription to receive HTTP POST requests. Only HTTPS URL's are supported.
Collection of event subscriptions.
Show child attributes
The status of the subscription whether it's active and sending notifications, paused, or inactive.
If set to true, the event notifications will only include the main event information without any data associated with it. Receiving systems must retrieve the data by other means.
Indicates whether the webhook subscription is active or not.
Type Name associated with an active AlternateId Type. If available, will be returned instead of the profileId.
Tags
The object or resource associated with the event (e.g., Preference, Consent, Custom Field, etc.).
TagsThe specific type of event you are subscribing to (e.g., preference.added, customfield.updated)
Contacts
Contacts Show child attributes
Profile
ProfileActionsPreferences
PreferencesFilter ID's associated with the Filters you want to subscribe. When subscribing to all Filters, specify 'AllFilters'
Show child attributes
StandardFields
StandardFieldsConsents
ConsentsType Names of the Consents you want to subscribe. When subscribing to all Consents, specify 'AllConsents'
Show child attributes
Groups
GroupsNames of the Groups you want to subscribe. When subscribing to all Groups, specify 'AllGroups'
Show child attributes
CustomFields
CustomFieldsNames of the custom fields you want to subscribe. When subscribing to all custom fields, specify 'AllCustomFields'