> ## Documentation Index
> Fetch the complete documentation index at: https://docs.bbrands.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Gateways

> What a gateway is, which origin can fire each event (Horizon itself or an integration with an API key) and how to read the gateways list, with the events and API keys of each gateway.

## At a glance

| Field | Value |
| - | - |
| Status | **Available** |
| Route | `/{locale}/notification/gateways` |
| Menu | Notifications › Catalog › **Gateways** |
| Role | Notification Admin, Operator, Editor and Marketing (read only) |
| Permission | `notification-gateway:find-all`; linking a gateway to an API key needs `api-key-notification-gateway:update` (Administrator) |
| Feature flag | None |
| Last verified | 2026-11-12 against `develop` (`679a4e0c5`) plus PR for issue #2201 |

## What it is for

A gateway is the **door** a notification comes in through. Horizon's own flows (a coupon redeemed, a contract
signed) come in through a **system** gateway, one per domain. Another company's system that sends notifications
through Horizon with an API key comes in through an **external** gateway. The gateway tells you who fired a
notification and limits what each integration may send.

## How to get there

* In the sidebar, open **Catalog › Gateways**.
* The events a gateway may fire are in its **Allowed events** column; the other way round, the gateways that may
  fire one event are on that event's detail, field **Gateways allowed**
  ([Event detail](https://docs.bbrands.io/enterprise/notifications/catalog/detail.md)).

## What you see

![Gateways screen: search by name or identifier, Sort by Identifier, Add filter and Refresh now; a table with Name and identifier, Kind, Description, Allowed events, API keys, Status and Created: Horizon · Autenticación horizon-auth, Horizon · Club Maihue horizon-club with club.coupon.expiry-due +2, Horizon · Contratos, Horizon · Maihue Lunch, Horizon · Pagos horizon-payment with payment.charge.failed +3 and Horizon · Suscripciones of kind System, with No API keys, and Café Los Andes (demo) partner-cafe-los-andes of kind External, with the event club.coupon.redeemed and the API key Café Los Andes · caja (demo), all Active.](https://mintcdn.com/bbrands/60Dos-kygsMSvNkG/images/enterprise-notifications-screens/gateways/list.en.desktop.webp?fit=max\&auto=format\&n=60Dos-kygsMSvNkG\&q=85\&s=16dad5a56225016e12449d1ae053bfe3)

The system gateways of each domain and one external integration.

| # | Element | What it does |
| - | - | - |
| 1 | **Search by name or identifier** | Finds a gateway by its name or its identifier (`horizon-club`) |
| 2 | **Sort by** | **Identifier** (default), **Name**, **Kind** or **Created** |
| 3 | **Add filter** | **Kind** (System or External) and **Status** (Active or Inactive) |
| 4 | **Name** | The gateway's name and, below, its identifier |
| 5 | **Kind** | **System** (Horizon's own flows) or **External** (an integration with an API key) |
| 6 | **Description** | What it is used for |
| 7 | **Allowed events** | The events the gateway may fire, in one line: the first event key (cut if it is long) and a "+N" chip when there are more, for example `payment.charge.failed` +3; hover the cell to read the full list. "No events" when it has none |
| 8 | **API keys** | The active API keys that send through the gateway, by name (never a secret), in one line: the first name and "+N" when there are more; hover the cell for the full list. "No API keys" when none is linked, as in every system gateway |
| 9 | **Status** | **Active** or **Inactive**. An inactive gateway lets nothing in |
| 10 | **Created** | When it was created |

The list is read-only: nobody creates or edits gateways from this screen.

### Who can fire each event

| Origin (as shown in Usage) | Gateway | Which events |
| - | - | - |
| **System**, **Cron** | The event's system gateway, `horizon-<domain>` (for example `horizon-club` for every Club Maihue event) | Every catalog event, from Horizon's own flows and scheduled jobs |
| **User** | A gateway linked to the event, or the one the staff member names | Events open to an external gateway, sent from Horizon Enterprise by staff |
| **API key** | One of the external gateways linked to the API key | Only events linked to that gateway. Today no catalog event is open to an external gateway: **Gateways allowed** shows **—** on every event |

The system gateways today are `horizon-auth`, `horizon-club`, `horizon-contract`, `horizon-device`,
`horizon-email-campaign`, `horizon-export`, `horizon-maihue-lunch`, `horizon-maihue-onboarding`,
`horizon-maihue-street`, `horizon-payment`, `horizon-short-link`, `horizon-signature` and `horizon-subscription`,
plus two of the former platform (`horizon-legacy-backfill`, `horizon-legacy-dispatch`).

## Step by step

### Find which gateway fired an event

**1. Open the event**

In the [catalog](https://docs.bbrands.io/enterprise/notifications/catalog/list.md), open the event and its
[Usage](https://docs.bbrands.io/enterprise/notifications/catalog/usage-and-history.md) tab.

**2. Read Origins and Gateways observed**

**Origins** says whether it came from the system, a user, a cron or an API key; **Gateways observed** says
through which gateway and how many times.

**3. Look the gateway up**

Search its identifier in **Catalog › Gateways** to read its name, kind, status, the events it may fire and the
API keys that send through it.

### Let an integration send an event

**1. Ask the technology team**

An event is opened to an external gateway in its code declaration; the catalog then shows the gateway under
**Gateways allowed**.

**2. Link the gateway to the API key**

An Administrator opens **Permissions › API Keys**, the integration's key, tab **Gateways**, and picks the gateway
in **Notification gateways**. You see **Gateways updated**: "The key may only send notifications through the
chosen gateways."

**3. Check the list**

In **Catalog › Gateways**, the gateway's row shows the event under **Allowed events** and the key under
**API keys**.

## Business rules

| ID | Rule |
| - | - |
| R-01 | Every catalog event has exactly one system gateway, its domain's; Horizon's own flows always fire it through that gateway |
| R-02 | A system gateway is reserved for Horizon: an API key can never send through one |
| R-03 | An API key sends only through the external gateways linked to it; any other gateway is refused with "no permission" (403) |
| R-04 | An integration can fire a catalog event only if the event is linked to one of its gateways; otherwise the request is refused with `event-not-allowed` (403) and nothing is sent |
| R-05 | A template can also be limited to some origins and gateways; a request outside them is refused |
| R-06 | An inactive gateway lets nothing in, from any origin |
| R-07 | The gateway is stored on every occurrence, so the dashboard and the event usage can be filtered by it |

## States and messages

| State | What you see | Why | What to do |
| - | - | - | - |
| No gateways | **No gateways**: "No gateway matches the filters." | Nothing fits the search or the filters | Remove a filter |
| System | **System** chip | One of Horizon's own gateways | Nothing |
| External | **External** chip (blue) | An integration with an API key | Read the events it may fire in **Allowed events** and its keys in **API keys** |
| No links | "No events" or "No API keys" | No event is open to the gateway, or no active key is linked to it | Nothing, unless an integration should be sending through it |
| Inactive | **Inactive** | The gateway was turned off | Ask the technology team why |

## Errors

| Message | Cause | Backend code | Support action |
| - | - | - | - |
| The list shows an error with **Retry** | The gateways could not be loaded | 5xx | Press **Retry** |
| The screen says you have no permission | Missing `notification-gateway:find-all` | 403 | Ask for a notification role |
| An integration gets `event-not-allowed` | The event is not linked to any of the key's gateways | 403 (API) | Open the event to the gateway and link it to the key |
| An integration gets a gateway error | The gateway is unknown, inactive, a system one or not linked to the key | 403 or 422 (API) | Check the gateway and the key's **Gateways** tab |

## Why it works this way

An API key proves who the integration is; the gateway limits what it may do. Splitting the two lets one company's
key send only its own notifications, through its own door, and keeps Horizon's system gateways out of reach. Since
every occurrence records its gateway, you can always answer "who sent this?".

## Technical detail

| Aspect | Detail |
| - | - |
| Screen | `frontend/horizon-enterprise/app/components/screens/notification/gateways/notification-gateways-screen.tsx` |
| API | `GET /api/v3/notification/gateway` (`notification-gateway:find-all`), table `notification_gateway` (`kind` `system` or `external`); each row carries `events` (active links of `notification_event_gateway` to live events) and `api_keys` (active, unrevoked keys of `api_key_notification_gateway`, name only), REQ-22.AC-6 of notification/user-manual |
| Event links | `notification_event_gateway`, written from the `gateways` of each registry event (`lib/notification/event/notification-event.types.ts`); system gateway in `systemGateway` |
| API checks | `lib/notification/core/notification-intake.ts` (gateway of the key, never `system`, template origins and gateways) and `lib/notification/api/notification-event-item.ts` (`event-not-allowed`) |
| API key link | `PUT /api/v3/permission/api-key/{id}/gateway`; screen `components/screens/permission/api-keys/api-key-gateways-tab.tsx` |
| Origins | `api_key`, `cron`, `system`, `user` (`NOTIFICATION_ORIGINS`) |
| Texts | `messages/{es,en}.json` › `modules.notification.gateways` and `modules.notification.gatewayKind` |

## FAQ and support cases

> [accordion] Which events can the integration of a merchant send?
>
> Search its gateway here and read **Allowed events** (hover the cell for the full list). Each event's detail also
> lists its gateways under **Gateways allowed**.

> [accordion] Can I turn a gateway off from here?
>
> No, the screen is read-only. Ask the technology team.

> [accordion] Why do all Club events come through horizon-club?
>
> Each domain has its own system gateway, so the dashboard can separate the volume of each business.

## Related and history

* [Event detail](https://docs.bbrands.io/enterprise/notifications/catalog/detail.md)
* [Usage and history](https://docs.bbrands.io/enterprise/notifications/catalog/usage-and-history.md)
* [Glossary](https://docs.bbrands.io/enterprise/notifications/getting-started/glossary.md)

| Date | Change |
| - | - |
| 2026-11-11 | First version |
| 2026-11-12 | The list shows the allowed events and the API keys of each gateway (issue #2201 fixed) |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.