# Event format assignment
___

Event format assignment defines how inbound messages are structured and delivered to your webhook.

Each subscription automatically receives a default format, which is channel-specific to ensure consistent processing. If the default format does not meet your requirements, you can [select another supported format for available channels](#selectable-event-formats). This allows you to control the payload structure that is sent to your webhook.
___

## Default formats by channel

Each subscription automatically assigns a default format for handling inbound messages. These formats are channel-specific to ensure consistent processing of inbound messages.

Supported channels use the following predefined JSON-based formats to structure and process inbound messages:

| Channel | Format |
| --- | --- |
| Apple Messages for Business | `MO_OTT_CONTACT` |
| Facebook Messenger | `MO_OTT_MSISDN` |
| LINE | `MO_OTT_MSISDN` |
| MMS | `MO_MMS_2` |
| RCS | `MO_OTT_MSISDN` |
| SMS | `MO_JSON_2` |
| Viber Business Messages | `MO_OTT_MSISDN` |
| WhatsApp | `MO_OTT_CONTACT` |
| Zalo | `MO_OTT_MSISDN` |

___

## Selectable event formats

Use event formats to choose the payload in which you want to receive events to your webhook.

Event formats are currently available for selection for **Apple Messages for Business**, **Facebook Messenger**, **MMS**, **SMS**, **Open Channel**, **Blocklist**, and **Mobile Identity** events. If you need to change the format for other channels or events, contact [Support](https://www.infobip.com/contact).

You can choose between two options:
- **Static formats**: Fixed payload schema that corresponds to a specific API version (for example, SMS API v3 or MMS API v1). All events of that type are delivered in the selected schema, regardless of how the original message was sent.
- **Adaptive subscription format**: Dynamic schema where the system delivers the payload that matches the API you used to send the original message.

Select the categories below to see which formats are available for selection.

Channels

| Event | Format name | Format payload |
| --- | --- | --- |
| Delivery | `adaptive.subscription.format` | Payload is picked based on the API used in your submission |
| `delivery.apple-messages-for-business.v3.json` | Example:Receive AMB delivery reports |
| `delivery.apple-messages-for-business.v4.json` | Example:Receive delivery reports |
| Inbound message | `inbound-message.apple-messages-for-business.v1.json` | Example:Receive incoming message |
| `inbound-message.apple-messages-for-business.v2.json` | Example:Receive inbound messages |

Numbers and senders

| Event | Format name | Format payload |
| --- | --- | --- |
| Delivery | `adaptive.subscription.format` | Payload is picked based on the API used in your submission |
| `delivery.facebook.v5.json` | Example:Receive delivery reports |
| `delivery.facebook.v4.json` | Example:Receive Messenger delivery reports |
| Inbound message | `inbound-message.facebook.v1.json` | Example:Receive incoming message |
| `inbound-message.facebook.v2.json` | Example:Receive inbound message |
| Marketing opt-in | `marketing.facebook.v1.json` | Example:Receive Messenger Opt In Marketing event |
| Marketing opt-out | `marketing.facebook.v1.json` | Example:Receive Messenger Opt Out Marketing event |

Tools

| Event | Format name | Format payload |
| --- | --- | --- |
| Click | `tracking.sms.v1.json` | Example:Receive SMS tracking notifications |
| Delivery | `adaptive.subscription.format` | Payload is picked based on the API used in your submission |
| `delivery.sms.v2.json` | Example:Receive delivery status report |
| `delivery.sms.v3.json` | Example:Receive outbound SMS message report |
| `delivery.sms.v4.json` | Example:Receive outbound SMS message reports |
| `delivery.sms.v5.json` | Example:Receive delivery reports |
| Inbound message | `inbound-message.sms.v1.json` | Example:Receive inbound SMS messages |
| `inbound-message.sms.v2.json` | Example:Receive inbound messages |

| Event | Format name | Format payload |
| --- | --- | --- |
| Click | `tracking.mms.v1.json` | Example:Receive MMS tracking notifications |
| Delivery | `adaptive.subscription.format` | Payload is picked based on the API used in your submission |
| `delivery.mms.v1.json` | Example:Receive outbound MMS message report |
| `delivery.mms.v3.json` | Example:Receive delivery reports |
| `delivery.mms.v4.json` | Example:Receive MMS delivery reports |
| Inbound message | `inbound-message.mms.v1.json` | Example:Receive inbound MMS messages |
| `inbound-message.mms.v2.json` | Example:Receive inbound messages |

| Event | Format name | Format payload |
| --- | --- | --- |
| Delivery | `event.open-channel.v1.json` | Example:Receive Open Channel outbound Message |

| Event | Format name | Format payload |
| --- | --- | --- |
| Silent verification | `silent-verification.mobile-identity.v1.json` | Paylod is picked based on the API used in your submission.Example:Receive silent mobile verification result/Receive advanced silent mobile verification result |

| Event | Format name | Format payload |
| --- | --- | --- |
| Block | `event.blocklist.v1.json` | Example:Receive blocklist event |
| Unblock | `event.blocklist.v1.json` | Example:Receive blocklist event |

### How to select a different format

You can select a different format when [creating or editing a subscription](https://www.infobip.com/docs/cpaas-x/subscriptions-management/create-manage-subscriptions#create-and-manage-subscriptions).

#### Web interface

1. [Log in](https://portal.infobip.com/) and go to **Developer Tools** > **Subscriptions Management**.
2. Find your **SMS** or **MMS** subscription in the list.
3. Open the **three-dot menu** next to the subscription name and select **Edit**.
4. On the **Select events** screen, choose your preferred event format from the dropdown.
5. Save your subscription to apply the new settings.

#### API

You can configure event formats when [creating](https://www.infobip.com/docs/api/platform/subscriptions-api/subscription/create-subscription) or [updating](https://www.infobip.com/docs/api/platform/subscriptions-api/subscription/update-subscription) a subscription by including the format field in the events object.

Example without a format (default will be applied):

```json
"events": [
  "DELIVERY"
]
```

Example with a selected format:

```json
"events": [
  {
    "event": "DELIVERY",
    "format": "delivery.sms.v3.json"
  }
]
```

IMPORTANT
If the format field is not provided, the system automatically assigns the default format for that event and channel.

___