# Subscription groups
___

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

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

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

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

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  
↓  

Group: audit  
        1 matching subscription  
↓  

Default group (no group set)  
        1 matching subscription  
↓  

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](#which-subscription-receives-an-event-how-groups-work).
- 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](https://www.infobip.com/docs/subscriptions/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](https://www.infobip.com/docs/subscriptions/inbound-messages-subscription-routing#keyword-filters).

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.

| Subscription        | Subscription group            | Filter               | Notification profile          |
| ------------------- | ----------------------------- | -------------------- | ----------------------------- |
| `analytics-promo`   | `analytics`                   | Resource: `PromoSender` | Promo analytics webhook       |
| `analytics-alerts`  | `analytics`                   | Resource: `AlertSender` | Alert analytics webhook       |
| `analytics-all`     | `analytics`                   | None                 | Analytics webhook             |
| `audit-all`         | `audit`                       | None                 | Audit 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`**

| Subscription        | Subscription group | Result    | Reason                                                                 |
| ------------------- | ------------------ | --------- | ---------------------------------------------------------------------- |
| `analytics-promo`   | `analytics`        | Delivered | Matches the resource filter. It is the most specific match in the group. |
| `analytics-alerts`  | `analytics`        | Skipped   | The resource filter does not match the sender.                       |
| `analytics-all`     | `analytics`        | Skipped   | Matches, but `analytics-promo` is more specific.                       |
| `audit-all`         | `audit`            | Delivered | The 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`**

| Subscription        | Subscription group | Result    | Reason                                                                 |
| ------------------- | ------------------ | --------- | ---------------------------------------------------------------------- |
| `analytics-promo`   | `analytics`        | Skipped   | The resource filter does not match the sender.                       |
| `analytics-alerts`  | `analytics`        | Delivered | Matches the resource filter. It is the most specific match in the group. |
| `analytics-all`     | `analytics`        | Skipped   | Matches, but `analytics-alerts` is more specific.                      |
| `audit-all`         | `audit`            | Delivered | The 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**

| Subscription        | Subscription group | Result    | Reason                                                                 |
| ------------------- | ------------------ | --------- | ---------------------------------------------------------------------- |
| `analytics-promo`   | `analytics`        | Skipped   | The resource filter does not match the sender.                       |
| `analytics-alerts`  | `analytics`        | Skipped   | The resource filter does not match the sender.                       |
| `analytics-all`     | `analytics`        | Delivered | The only match in the group. It has no filter, so it matches every sender. |
| `audit-all`         | `audit`            | Delivered | The 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 group                                         |         |
| Two identical subscriptions in different groups                                       |         |
| Two identical subscriptions without a subscription group                              |         |
| Two identical subscriptions, one with a subscription group and one without              |         |

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](https://www.infobip.com/docs/subscriptions/manage/notification-profiles).

For step-by-step instructions in the web interface and the API, see [Deliver an event to more than one webhook](https://www.infobip.com/docs/subscriptions/manage#deliver-an-event-to-more-than-one-webhook-create). To change or remove a group later, see [Change or remove a subscription group](https://www.infobip.com/docs/subscriptions/manage#change-or-remove-a-subscription-group-view-edit).

___

## 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

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](https://www.infobip.com/docs/subscriptions/understanding-subscriptions#webhook-url-override-behavior-choosing-between-subscriptions-and-per-message-webhooks).

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](https://www.infobip.com/docs/subscriptions/inbound-messages-subscription-routing).

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

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

Related pages

[Manage webhook subscriptions](https://www.infobip.com/docs/subscriptions/manage)  
Create, update, and delete subscriptions.

[Manage notification profiles](https://www.infobip.com/docs/subscriptions/manage/notification-profiles)  
Configure where notifications are delivered.

[Understanding webhook subscriptions](https://www.infobip.com/docs/subscriptions/understanding-subscriptions)  
How subscriptions work, event selection, and filtering.

[Inbound messages: subscription routing](https://www.infobip.com/docs/subscriptions/inbound-messages-subscription-routing)  
How subscription groups apply to inbound messages.