Expose a third-party API through MuleSoft when you need one place to apply your own security, rate limits and logging, and when your callers should not know or care who is behind it. Use Flex Gateway when the gateway should run in your own network or near the API, and a proxy on a Mule runtime when you already run runtimes there and the API needs no extra logic. Use the decision flow below, then check the cost against your contract.
When to expose third-party APIs through Mule
This question came up in buyer conversations about health data and partner feeds. Put an API behind your own gateway when:
- You must apply your own controls that the third party does not offer: your token rules, client limits and audit log
- Callers should see one address and one contract, so you can swap the supplier later without changing every client
- You need evidence of who called what and when, in your own logs
- The third-party contract limits your usage and you want to throttle callers before they reach it
- You want to hide credentials, so callers never hold the third party's key
Do not put an API behind your gateway when a direct call is simpler and the controls above are not needed. Each hop adds delay, cost and one more thing to run.
Decision flow
- Do callers need controls the third party does not give you? No: call it directly, and stop. Yes: go on.
- Must the gateway run inside your own network, or next to the target? Yes: use a gateway you host, such as Flex Gateway. No: go on.
- Do you already run Mule runtimes in the right place, with spare capacity and the people to run them? Yes: a proxy on the runtime may be enough. No: go on.
- Does the API need transformation or orchestration, such as combining two calls? Yes: build it as an application on a Mule runtime and put a gateway in front. No: a gateway with policies is enough.
- Is the traffic regulated, with a need for audit logging of every call? Yes: apply logging policies at the gateway and send logs to your own store.
Flex Gateway vs standard proxies
Names and options have changed over time, so read the current gateway documentation and API Manager documentation before you finalise a design.
| Question | Flex Gateway | Proxy on a Mule runtime |
|---|---|---|
| What it is | A lightweight gateway for APIs, which MuleSoft says can front Mule and non-Mule services | An application on a Mule runtime that passes traffic through, managed from API Manager |
| Where it runs | Where you place it, such as containers or Linux hosts, in your network or cloud | On runtimes you already run |
| Best for | Many APIs across locations, non-Mule back ends, perimeter placement | Estates already invested in Mule runtimes |
| Operating load | A new component to deploy, patch and monitor | Uses existing runtime operations |
| Policy management | Central through API Manager, or locally defined files, depending on mode | Central through API Manager |
| Extra logic | Policies only, plus custom policy options | Full flow capability when you need it |
Policy placement
Put each policy where it does the most good for the least cost.
| Policy | Where | Why |
|---|---|---|
| Client authentication and token checks | Gateway, at the edge | Reject early, before load reaches back ends |
| Rate limiting and quotas | Gateway | Protects the third party and your contract |
| IP allow lists | Gateway or network layer | Cheapest at the first hop |
| Request and response logging | Gateway, forwarded to your log store | One consistent audit trail |
| Payload transformation | Mule application | Needs full language support |
| Business rules and orchestration | Mule application | Not a gateway job |
Avoid applying the same control at three layers with different settings. Choose an owner for each policy, and test that the strictest rule is the one that applies. Policy detail is in the security policy checklist.
Cost and operations impact
- Licence: gateways and proxies can count against different units in your contract. Check which units your agreement counts before choosing, and see the vCore sizing worksheet.
- Infrastructure: a gateway you host needs hosts or containers, patching and monitoring. A proxy on an existing runtime uses capacity you already pay for, and may push you into a bigger size.
- People: one more component means one more thing in the monitoring runbook.
- Failure risk: a gateway sits in the path of every call. Run it in more than one instance, and decide what happens when it is down.
A worked situation is in the use case on third-party APIs for a health network.
Questions we hear
What is MuleSoft Flex Gateway? A lightweight API gateway from MuleSoft that you can run in your own network or cloud. Check MuleSoft's documentation for the current modes and policy support.
Do I need a gateway to call a third-party API? No. A direct call is fine when the third party's own controls are enough. Add a gateway when you need your own policies, logging or a stable contract for callers.
Can one gateway protect APIs that are not built on Mule? Yes, that is a main use of a gateway. Confirm current support for your back ends in MuleSoft's documentation.
Which costs less? It depends on how your contract counts usage and on what capacity you already have. Model both against your order form before you decide.
A first engagement
Duczer East offers a gateway placement review: we map the third-party APIs you expose, decide where each policy should run, and hand back a design with the cost and operations effect of each choice.
Sources checked November 27, 2026:



