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

# How to Restrict API Access with an IP Allowlist

An IP allowlist adds a second layer of protection to the Maestra Platform API, on top of your [secret key](https://help.maestra.io/api-integrations/how-to-create-and-configure-an-integration-point.md). Even if someone gets hold of the key, requests from unknown IP addresses are rejected and your customer data stays safe.

> [!WARNING]
>
> This feature isn't available on every account. Ask your account manager whether it can be turned on for yours.

## Who can set it up

To edit the allowlist, you need these permissions:

* `View integrations`
* `Edit integrations`
* `Manage API IP allowlist`

By default, the **Owners** and **Security engineer** [permission groups](https://help.maestra.io/administration/staff/what-security-groups-are-available.md) have all three. You can grant them to other users if needed.

## Which integration points support it

The allowlist works in integration points of these types:

* Website
* iOS / Android app
* Analytics data
* Other

> [accordion] Why other integration points don't support it
>
> * **Webhook integration** — only sends outgoing requests from Maestra Platform to external services, such as a CRM.
> * **Product feeds** — doesn't accept incoming requests. Maestra Platform fetches the feed from a URL itself.
> * **Ad accounts** — the IP list is fixed to the addresses of the integration provider.

## How to set it up

**1. Open the integration point**

Go to **Integrations** and open the integration point.

**2. Add your IP addresses**

In the **IP access settings** block, enter your infrastructure's addresses, one per line. See the [allowed format](#ip-list-format) below.

**3. Choose which requests to check**

If you need to, tick **Check IP addresses only in requests with a secret key**. See [how this option works](#the-check-ip-addresses-only-in-requests-with-a-secret-key-option).

**4. Save**

Click **Save** in the block, then **Save** on the integration page.

> [!NOTE]
>
> The allowlist starts rejecting requests from IPs that aren't on it **5 minutes** after you save the integration point.

Integration points with an IP allowlist show a **shield icon** in the list.

### IP list format

**Supported:**

* Single IPv4 addresses: `130.193.65.96`.
* CIDR subnets in canonical form: `130.193.65.96/30`.
* Comments after `#` on the same line: `130.193.65.96 # prod load balancer, New York`.
* Up to **100 lines** per integration point.
* Lines up to **120 characters** long.

> [accordion] How to write a CIDR entry in canonical form
>
> **"Round" masks** (`/8`, `/16`, `/24`, `/32`):
>
> | Mask | Allowed values | Correct | Incorrect |
> | - | - | - | - |
> | `/32` | **Always** canonical | `1.2.3.4/32` | — |
> | `/24` | Last octet is 0 | `1.2.3.0/24` | `1.2.3.7/24` |
> | `/16` | Last two octets are 0 | `1.2.0.0/16` | `1.2.3.0/16` |
> | `/8` | **Last three octets are 0** | `1.0.0.0/8` | `1.2.0.0/8` |
>
> **Other masks:**
>
> | Mask | Allowed last-octet values | Correct | Incorrect |
> | - | - | - | - |
> | `/31` | Any **even** number (0, 2, 4, 6, 8, …) | `1.2.3.4/31` | `1.2.3.5/31` |
> | `/30` | Multiple of **4** (0, 4, 8, 12, …) | `1.2.3.8/30` | `1.2.3.9/30` |
> | `/29` | Multiple of **8** (0, 8, 16, 24, …) | `1.2.3.16/29` | `1.2.3.20/29` |
> | `/28` | Multiple of **16** (0, 16, 32, 48, …) | `1.2.3.32/28` | `1.2.3.40/28` |
> | `/27` | Multiple of **32** (0, 32, 64, 96, 128, 160, 192, 224) | `1.2.3.64/27` | `1.2.3.80/27` |
> | `/26` | Multiple of **64** (0, 64, 128, 192) | `1.2.3.128/26` | `1.2.3.130/26` |
> | `/25` | Only **0 or 128** | `1.2.3.128/25` | `1.2.3.64/25` |

**Not supported:**

* Ranges with a dash: `130.193.65.96 — 130.193.65.97`.
* Several entries on one line: `130.193.65.96/30, 130.193.65.92 # prod load balancer, New York`.
* Special-purpose addresses such as `10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16` — the allowlist only works with public IPs.
* The `/0` mask (it would allow access from any IP).

> [accordion] Special-purpose addresses that aren't allowed
>
> | CIDR | Category |
> | - | - |
> | `0.0.0.0/8` | Reserved, RFC 1122 |
> | `10.0.0.0/8` | Private, RFC 1918 |
> | `100.64.0.0/10` | CGNAT, RFC 6598 |
> | `127.0.0.0/8` | Loopback, RFC 1122 |
> | `169.254.0.0/16` | Link-local, RFC 3927 |
> | `172.16.0.0/12` | Private, RFC 1918 |
> | `192.0.0.0/24` | Protocol assignments, RFC 6890 |
> | `192.0.2.0/24` | Documentation, RFC 5737 |
> | `192.88.99.0/24` | Deprecated, RFC 7526 |
> | `192.168.0.0/16` | Private, RFC 1918 |
> | `198.18.0.0/15` | Benchmarking, RFC 2544 |
> | `198.51.100.0/24` | Documentation, RFC 5737 |
> | `203.0.113.0/24` | Documentation, RFC 5737 |
> | `224.0.0.0/4` | Multicast, RFC 5771 |
> | `240.0.0.0/4` | Reserved / Class E, RFC 1112 |
> | `255.255.255.255/32` | Broadcast, RFC 919 |

### The "Check IP addresses only in requests with a secret key" option

This checkbox decides which requests the allowlist checks:

| State | What's checked | When to use it |
| - | - | - |
| **Unticked** | Every incoming request to the integration point, including requests without a secret key and events from the JS tracker. | When all traffic to the integration point comes from your own infrastructure. **Not recommended** for Website or iOS / Android app integrations — calls from them can't be fully proxied. |
| **Ticked (default)** | Only requests with the main secret key. Requests from end users, such as JS tracker events, pass without an IP check. | For most Website or iOS / Android app integrations, where requests come from the shopper's IP rather than a server — for example, product views or changes to a customer's lists. |

> [!NOTE]
>
> Requests with a **test** secret key are **never** checked. That way, account managers and support can debug promotions and integrations.

## What happens when a request is blocked

Maestra Platform checks the actual IP address of the server that sent the request. The same IP shows up in the `X-Forwarded-For` header.

A rejected request returns a 403 status with this response:

```
Incorrect IP address 1.2.3.4 for endpoint '<system name>'
```

Here, `1.2.3.4` is the sender's actual IP, and `<system name>` is the integration point's system name.

If lots of requests get blocked, issues are opened on your account.

## Change history

Every change to the IP list — who made it and when — is logged in the **Event log**. To see the changes, click the **Change history** link, or filter the event log by the *IP access settings edit* event type.


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