CTRLK

Additional resources

Subscription groups

|

View as Markdown

A subscription group is an optional label on a webhook subscription that lets you deliver the same event to more than one webhook. Each group receives its own copy of every matching event. For example, one delivery report can reach your analytics platform, your audit archive, and your monitoring tool at the same time.

Without groups, each event is delivered to one subscription. With groups, you create one subscription per destination and place each one in a different group.


When to use subscription groups

Reporting and compliance

Reporting and compliance

Keep your application on its own webhook and send a copy of every delivery report or inbound message to your analytics platform, data warehouse, or compliance archive.

Monitoring

Monitoring

Deliver events to your application and, in parallel, to a monitoring or alerting endpoint that watches for failures or volume spikes.

Migration

Migration

Send events to your legacy system and your replacement system at the same time. Validate the replacement integration before you switch over.

Teams and tools

Teams and tools

Give your CRM, your support desk, or each internal team or regional system its own webhook for the same event, instead of one shared endpoint, so that every team works from the same data.



How subscription groups work [#how-groups-work]

When an event occurs, Infobip evaluates the subscriptions in each group separately.


How one event reaches several webhooks


Event: DELIVERY
↓

Group: analytics
1 matching subscription

↓

Analytics webhook

Group: audit
1 matching subscription

↓

Audit archive webhook

Default group (no group set)
1 matching subscription

↓

Its own webhook


Subscription groups follow these rules:

  • One subscription per group: In each group, only one subscription receives the event. If more than one subscription in a group matches, the most specific one receives it.
    See Which subscription receives an event.
  • One delivery per group: Each group that has a matching subscription receives its own copy of the event.
  • Independent delivery: Each group has its own delivery and retry cycle. A slow or failing endpoint in one group does not block or delay delivery to the other groups.
  • Default group: If you do not set a subscription group, the subscription belongs to the default group. This includes all subscriptions created without a group.
  • Destination: The notification profile of each subscription defines where its copy is delivered. Subscriptions in different groups can use the same notification profile or different ones.
  • Event format: Each subscription uses its own event format. Subscriptions in different groups can deliver the same event in different formats.
    See Manage event formats.

Which subscription receives an event [#which-subscription-receives-an-event-how-groups-work]

A subscription matches an event only when the channel, the event, and all of its filters match. A filter that does not match disqualifies the subscription.

When more than one subscription in the same group matches, Infobip selects the most specific one. Filters are ranked from highest to lowest:

  1. Application
  2. Entity
  3. Keyword (inbound messages only)
  4. Resource
  5. User

A subscription that matches a higher-ranked filter is selected over any subscription that matches only lower-ranked filters. For example, a subscription with an application filter is selected over a subscription with resource and user filters.

For keyword filters, an exact keyword match (ORDER) ranks above a starts-with match (ORDER*), and a longer keyword ranks above a shorter one. Keyword length never outranks a different filter. For details, see Filter inbound messages by keyword.

If two subscriptions are equally specific, the subscription created first is selected.


In this example, you have four subscriptions for the same channel. All four subscribe to the DELIVERY event. Two of them use a resource filter, which matches the sender of the message.

SubscriptionSubscription groupFilterNotification profile
analytics-promoanalyticsResource: PromoSenderPromo analytics webhook
analytics-alertsanalyticsResource: AlertSenderAlert analytics webhook
analytics-allanalyticsNoneAnalytics webhook
audit-allauditNoneAudit archive webhook

For each delivery report, Infobip evaluates the analytics group and the audit group separately. In each group, one subscription receives the event. In the following tables, that subscription is marked as Delivered. The other subscriptions in the group are marked as Skipped and do not receive the event.


Message sent from PromoSender

SubscriptionSubscription groupResultReason
analytics-promoanalyticsDeliveredDeliveredMatches the resource filter. It is the most specific match in the group.
analytics-alertsanalyticsSkippedSkippedThe resource filter does not match the sender.
analytics-allanalyticsSkippedSkippedMatches, but analytics-promo is more specific.
audit-allauditDeliveredDeliveredThe only subscription in the group. It has no filter, so it matches every sender.

The promo analytics webhook and the audit archive webhook each receive one copy.


Message sent from AlertSender

SubscriptionSubscription groupResultReason
analytics-promoanalyticsSkippedSkippedThe resource filter does not match the sender.
analytics-alertsanalyticsDeliveredDeliveredMatches the resource filter. It is the most specific match in the group.
analytics-allanalyticsSkippedSkippedMatches, but analytics-alerts is more specific.
audit-allauditDeliveredDeliveredThe only subscription in the group. It has no filter, so it matches every sender.

The alert analytics webhook and the audit archive webhook each receive one copy.


Message sent from a different sender

SubscriptionSubscription groupResultReason
analytics-promoanalyticsSkippedSkippedThe resource filter does not match the sender.
analytics-alertsanalyticsSkippedSkippedThe resource filter does not match the sender.
analytics-allanalyticsDeliveredDeliveredThe only match in the group. It has no filter, so it matches every sender.
audit-allauditDeliveredDeliveredThe only subscription in the group. It has no filter, so it matches every sender.

The analytics webhook and the audit archive webhook each receive one copy.

NOTE

An event delivered to more than one group is charged once, regardless of the number of groups that receive it.


Which duplicate subscriptions are allowed [#which-duplicate-subscriptions-are-allowed-how-groups-work]

Each subscription must be unique within its subscription group. The system rejects a subscription with the same channel, events, filters (including keywords), and subscription group as an existing subscription. The same channel, events, and filters are allowed in different groups.

Scenario (same channel, events, and filters)Allowed
Two identical subscriptions in the same groupRejected
Two identical subscriptions in different groupsAllowed
Two identical subscriptions without a subscription groupRejected
Two identical subscriptions, one with a subscription group and one withoutAllowed
NOTE

To deliver an event to more than one webhook, the subscriptions must belong to different groups. Two subscriptions in the same group do not both receive the same event.



Limits and availability [#limits]

Subscription groups have the following limits and availability:

  • Subscription groups per account: Up to 10 distinct groups, across all channels. The default group counts toward this limit.
  • Webhooks per event: Up to 10, one for each group.
  • Subscription group length: Up to 255 characters.
  • Supported channels and events: All channels, services, and events that support subscriptions.

If a request exceeds the limit, the system rejects it with the error Maximum number of distinct subscription groups (10) reached.



Set up subscription groups [#set-up]

You need a notification profile for each destination. You can create new profiles or reuse existing ones. See Manage notification profiles.

For step-by-step instructions in the web interface and the API, see Deliver an event to more than one webhook. To change or remove a group later, see Change or remove a subscription group.



When delivery to groups changes [#considerations]

In the following cases, an event does not reach your groups the way the rules above describe:

Message-level webhook URLs

Message-level webhook URLs

A webhook URL set in the message request, such as notifyURL, overrides all subscriptions for that message, including all subscription groups. The event is delivered only to the URL in the request.
See Webhook URL override behavior.

Inbound messages

Inbound messages

Subscription groups apply to inbound messages when the resource uses Apply subscription as the inbound action. If the resource forwards inbound messages to a URL configured on the resource, the message goes only to that URL. It bypasses all subscriptions, including all groups.
See Inbound messages: subscription routing.

Duplicate events at your endpoint

Duplicate events at your endpoint

If two groups use the same notification profile, the webhook URL receives the same event twice. Use different notification profiles unless you intend to receive duplicates.

Subscriptions moved to another group

Subscriptions moved to another group

Moving a subscription into a group where a different subscription already matches the same events changes which subscription receives those events. Review the subscriptions in the target group before you move a subscription.



Related pages

Manage webhook subscriptions
Create, update, and delete subscriptions.

Manage notification profiles
Configure where notifications are delivered.

Understanding webhook subscriptions
How subscriptions work, event selection, and filtering.

Inbound messages: subscription routing
How subscription groups apply to inbound messages.


Was this page helpful?