---
schema_version: "1"
id: a46ffbbea5bf05241ac6ffe9ea471ca49a6caf92a22f5674ce34e4e8724a0e65
title: Securing Flex Gateway APIs with Policies
collection: mulesoft
version: current
locale: en-us
portal_url: https://docs.salesforce.com/mulesoft/current/en-us/gateway/1.9/flex-gateway-secure-apis.md
canonical_url: https://docs.mulesoft.com/gateway/1.9/flex-gateway-secure-apis
source_site: docs.mulesoft.com
content_type: documentation
content_hash: 4386354d83604f53860c284d02f16eec1bf84e8df9f229892a984c767a6df168
description: MuleSoft Documentation Site
release: "1.9"
latest: false
---
---
product: Omni Gateway
version: 1.9
---

# Securing Flex Gateway APIs with Policies

> For the full documentation index, see: https://docs.mulesoft.com/llms.txt

Policies enforce rules when Flex Gateway processes requests, enabling you to secure and govern your
Flex Gateway APIs.

MuleSoft provides policies that you can apply to your APIs via Anypoint Platform or declarative
configuration files. The provided policies include rate limiting, caching, authentication,
authorization, threat protection, monitoring, and logging. For more information about
MuleSoft-provided policies, see the [Inbound Policies Directory](https://docs.mulesoft.com/gateway/1.9/policies-included-directory) and
[Outbound Policies Directory](https://docs.mulesoft.com/gateway/1.9/policies-outbound-directory).

To extend existing functionality or define new functionality, create custom policies based on your
specific business requirements and apply them to APIs. For information about creating custom
policies, see
[Omni Gateway Policy Development Kit (PDK) Overview](https://docs.mulesoft.com/pdk/latest/policies-pdk-overview).

Automated policies enable your API instance to comply with common security and logging requirements
by automatically applying the same set of policies to all APIs running in Flex Gateway. See
[Automated Policies](https://docs.mulesoft.com/gateway/1.9/policies-automated-overview) for more information.

To apply a policy for Managed Flex Gateway or Connected Mode, see
[Applying Policies for Managed Flex Gateways and Connected Mode](https://docs.mulesoft.com/gateway/1.9/flex-gateway-secure-conn).

To apply a policy in Local Mode, see [Applying Policies in Local Mode](https://docs.mulesoft.com/gateway/1.9/flex-gateway-secure-local).

For information about policy reordering, see [Ordering Policies](https://docs.mulesoft.com/gateway/1.9/policies-reorder).

For information about DataWeave support, see
[DataWeave Support in Flex Gateway Policies](https://docs.mulesoft.com/gateway/1.9/policies-flex-dataweave-support).

## See Also

- [Flex Gateway Overview](https://docs.mulesoft.com/gateway/1.9/)

- [Getting Started with Flex Gateway](https://docs.mulesoft.com/gateway/1.9/flex-gateway-getting-started-overview)
