
An API proxy gives you a unique URL to send and receive data to and from Statsig servers. This reduces the likelihood of interception by client-side or DNS-side blockers, allowing your applications to receive the correct configuration and send more complete data.

{% callout type="info" %}
The Managed Proxy is available only for Pro or Enterprise tiers.

The Managed Proxy is a quick way to prevent ad-blocking. For lower-volume customers, or as a starting point before you configure the [Custom Proxy](/infrastructure/api_proxy/custom_proxy), the Managed Proxy provides a functional solution. The Custom Proxy is more robust and customizable.
{% /callout %}

## Why use a proxy

Many web browsers have tracking blockers installed. These blockers can block feature flags, experiments, and runtime dynamic config data, which excludes affected users from statistical analysis.

Using an application-specific proxy signals to tracking blockers that the proxy is a required component of your application.

## Set up a managed proxy

If your project is on the Pro or Enterprise tier, an option to create a unique proxy for your SDK appears in the *Settings > Project > Keys & Environments* tab:

{% figure %}
![Proxy creation option in Keys & Environments settings](/images/infrastructure/api_proxy/managed-proxy/5eec435d-8221-4f8c-a8e8-70b4f67e771c.png)
{% /figure %}

Selecting **Create a proxy** generates a new unique worker on AWS and returns a URL you can start using immediately.

{% figure %}
![Generated proxy URL configuration screen](/images/infrastructure/api_proxy/managed-proxy/0de0509c-1411-4ee4-9a0c-e533ef3fce01.png)
{% /figure %}

{% callout type="info" %}
Statsig hosts the managed proxy in the `ap-south-1` region. If you want it hosted in a different region, reach out to Statsig support.
{% /callout %}

## Using your proxy

After you set up a proxy, apply its URL to the SDK. For JavaScript client SDKs, use `StatsigOptions.networkConfig.api`. Go to [Statsig Options](/client/javascript-sdk#statsig-options) for JavaScript-specific options. Other SDKs may expose the proxy base URL differently, but the managed proxy URL serves the same purpose.

The following example shows initializing with a proxy in JavaScript:

```typescript
Statsig.initialize(mySdkKey, myUser, {
  networkConfig: {
    api: "https://my-statsig-proxy.com/v1",
  },
});
```

{% callout type="note" %}
In JavaScript, `networkConfig.api` is a base URL, not the same thing as `initializeUrl`. Use `initializeUrl` only when you want to override initialization independently. There is no generic `api` fallback option; endpoint failover is configured with `initializeFallbackUrls` and `logEventFallbackUrls`.
{% /callout %}
