Add an Access application
Adds a new application to Access.
Security
API Token
The preferred authorization scheme for interacting with the Cloudflare API. Create a token.
Authorization: Bearer Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYYAPI Email + API Key
The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key.
X-Auth-Email: user@example.comThe previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys.
X-Auth-Key: 144c9defac04969c7bfad8efaa8ea194Accepted Permissions (at least one required)
Access: Apps and Policies WriteParametersExpand Collapse
params AccessApplicationNewParams
Body param: The primary hostname and path secured by Access. This domain will be displayed if the app is visible in the App Launcher.
Body param: The application type.
Path param: The Account ID to use for this endpoint. Mutually exclusive with the Zone ID.
Path param: The Zone ID to use for this endpoint. Mutually exclusive with the Account ID.
Body param: When set to true, users can authenticate to this application using their WARP session. When set to false this application will always require direct IdP authentication. This setting always overrides the organization setting for WARP authentication.
Body param: The identity providers your users can select when connecting to this application. Defaults to all IdPs configured in your account.
Body param: Displays the application in the App Launcher.
Body param: When set to true, users skip the identity provider selection step during login. You must specify only one identity provider in allowed_idps.
Body param: The custom error message shown to a user when they are denied access to the application.
Body param: The custom URL a user is redirected to when they are denied access to the application when failing identity-based rules.
Body param: The custom URL a user is redirected to when they are denied access to the application when failing non-identity rules.
Body param: The custom pages that will be displayed when applicable for this application
Destinations param.Field[[]AccessApplicationNewParamsSelfHostedApplicationDestination]OptionalBody param: List of destinations secured by Access. This supersedes self_hosted_domains to allow for more flexibility in defining different types of domains. If destinations are provided, then self_hosted_domains will be ignored.
Body param: List of destinations secured by Access. This supersedes self_hosted_domains to allow for more flexibility in defining different types of domains. If destinations are provided, then self_hosted_domains will be ignored.
AccessApplicationNewParamsSelfHostedApplicationDestinationsPublicDestination
The URI of the destination. Public destinations’ URIs can include a domain and path with wildcards.
AccessApplicationNewParamsSelfHostedApplicationDestinationsPrivateDestination
The hostname of the destination. Matches a valid SNI served by an HTTPS origin.
L4Protocol AccessApplicationNewParamsSelfHostedApplicationDestinationsPrivateDestinationL4ProtocolOptionalThe L4 protocol of the destination. When omitted, both UDP and TCP traffic will match.
The L4 protocol of the destination. When omitted, both UDP and TCP traffic will match.
Body param: Preemptively sets the Access session cookie on every hostname in a multi-hostname self-hosted application during the initial redirect chain, rather than setting it lazily on first visit. Defaults to true. Set to false to disable the eager redirect cookie behavior.
Body param: Enables the binding cookie, which increases security against compromised authorization tokens and CSRF attacks.
Body param: Enables the HttpOnly cookie attribute, which increases security against XSS attacks.
Body param: The image URL for the logo shown in the App Launcher dashboard.
Body param: Configures multi-factor authentication (MFA) settings.
Body param: Configures multi-factor authentication (MFA) settings.
AllowedAuthenticators []AccessApplicationNewParamsSelfHostedApplicationMfaConfigAllowedAuthenticatorOptionalLists the MFA methods that users can authenticate with.
Lists the MFA methods that users can authenticate with.
OAuthConfiguration param.Field[AccessApplicationNewParamsSelfHostedApplicationOAuthConfiguration]OptionalBody param: Beta: Optional configuration for managing an OAuth authorization flow controlled by Access. When set, Access will act as the OAuth authorization server for this application. Only compatible with OAuth clients that support RFC 8707 (Resource Indicators for OAuth 2.0). This feature is currently in beta.
Body param: Beta: Optional configuration for managing an OAuth authorization flow controlled by Access. When set, Access will act as the OAuth authorization server for this application. Only compatible with OAuth clients that support RFC 8707 (Resource Indicators for OAuth 2.0). This feature is currently in beta.
DynamicClientRegistration AccessApplicationNewParamsSelfHostedApplicationOAuthConfigurationDynamicClientRegistrationOptionalSettings for OAuth dynamic client registration.
Settings for OAuth dynamic client registration.
Whether the OAuth configuration is enabled for this application. When set to false, Access will not handle OAuth for this application. Defaults to true if omitted.
Body param: Allows options preflight requests to bypass Access authentication and go directly to the origin. Cannot turn on if cors_headers is set.
Body param: Enables cookie paths to scope an application’s JWT to the application path. If disabled, the JWT will scope to the hostname by default
Policies param.Field[[]AccessApplicationNewParamsSelfHostedApplicationPolicyUnion]OptionalBody param: The policies that Access applies to the application, in ascending order of precedence. Items can reference existing policies or create new policies exclusive to the application. Reusable and inline policies are mutually exclusive.
Body param: The policies that Access applies to the application, in ascending order of precedence. Items can reference existing policies or create new policies exclusive to the application. Reusable and inline policies are mutually exclusive.
AccessApplicationNewParamsSelfHostedApplicationPoliciesObject
Requires the user to request access from an administrator at the start of each session.
ConnectionRules AccessApplicationNewParamsSelfHostedApplicationPoliciesObjectConnectionRulesOptionalThe rules that define how users may connect to targets secured by your application.
The rules that define how users may connect to targets secured by your application.
RDP AccessApplicationNewParamsSelfHostedApplicationPoliciesObjectConnectionRulesRDPOptionalThe RDP-specific rules that define clipboard behavior for RDP connections.
The RDP-specific rules that define clipboard behavior for RDP connections.
Require this application to be served in an isolated browser for users matching this policy. ‘Client Web Isolation’ must be on for the account in order to use this feature.
MfaConfig AccessApplicationNewParamsSelfHostedApplicationPoliciesObjectMfaConfigOptionalConfigures multi-factor authentication (MFA) settings.
Configures multi-factor authentication (MFA) settings.
AllowedAuthenticators []AccessApplicationNewParamsSelfHostedApplicationPoliciesObjectMfaConfigAllowedAuthenticatorOptionalLists the MFA methods that users can authenticate with.
Lists the MFA methods that users can authenticate with.
The order of execution for this policy. Must be unique for each policy within an app.
A custom message that will appear on the purpose justification screen.
Body param: Allows matching Access Service Tokens passed HTTP in a single header with this name. This works as an alternative to the (CF-Access-Client-Id, CF-Access-Client-Secret) pair of headers. The header value will be interpreted as a json object similar to: { “cf-access-client-id”: “88bf3b6d86161464f6509f7219099e57.access.example.com”, “cf-access-client-secret”: “bdd31cbc4dec990953e39163fbbb194c93313ca9f0a6e420346af9d326b1d2a5” }
Body param: Sets the SameSite cookie setting, which provides increased security against CSRF attacks.
Body param: Configuration for provisioning to this application via SCIM. This is currently in closed beta.
Body param: Configuration for provisioning to this application via SCIM. This is currently in closed beta.
The UID of the IdP to use as the source for SCIM resources to provision to this application.
Authentication AccessApplicationNewParamsSelfHostedApplicationSCIMConfigAuthenticationUnionOptionalAttributes for configuring HTTP Basic authentication scheme for SCIM provisioning to an application.
Attributes for configuring HTTP Basic authentication scheme for SCIM provisioning to an application.
type SCIMConfigAuthenticationHTTPBasic struct{…}Attributes for configuring HTTP Basic authentication scheme for SCIM provisioning to an application.
Attributes for configuring HTTP Basic authentication scheme for SCIM provisioning to an application.
type SCIMConfigAuthenticationOAuthBearerToken struct{…}Attributes for configuring OAuth Bearer Token authentication scheme for SCIM provisioning to an application.
Attributes for configuring OAuth Bearer Token authentication scheme for SCIM provisioning to an application.
type SCIMConfigAuthenticationOauth2 struct{…}Attributes for configuring OAuth 2 authentication scheme for SCIM provisioning to an application.
Attributes for configuring OAuth 2 authentication scheme for SCIM provisioning to an application.
Client ID used to authenticate when generating a token for authenticating with the remote SCIM service.
Secret used to authenticate when generating a token for authenticating with the remove SCIM service.
AccessApplicationNewParamsSelfHostedApplicationSCIMConfigAuthenticationAccessSCIMConfigAuthenticationAccessServiceToken
AccessApplicationNewParamsSelfHostedApplicationSCIMConfigAuthenticationAccessSCIMConfigMultiAuthentication
type SCIMConfigAuthenticationHTTPBasic struct{…}Attributes for configuring HTTP Basic authentication scheme for SCIM provisioning to an application.
Attributes for configuring HTTP Basic authentication scheme for SCIM provisioning to an application.
type SCIMConfigAuthenticationOAuthBearerToken struct{…}Attributes for configuring OAuth Bearer Token authentication scheme for SCIM provisioning to an application.
Attributes for configuring OAuth Bearer Token authentication scheme for SCIM provisioning to an application.
type SCIMConfigAuthenticationOauth2 struct{…}Attributes for configuring OAuth 2 authentication scheme for SCIM provisioning to an application.
Attributes for configuring OAuth 2 authentication scheme for SCIM provisioning to an application.
Client ID used to authenticate when generating a token for authenticating with the remote SCIM service.
Secret used to authenticate when generating a token for authenticating with the remove SCIM service.
If false, propagates DELETE requests to the target application for SCIM resources. If true, sets ‘active’ to false on the SCIM resource. Note: Some targets do not support DELETE operations.
A list of mappings to apply to SCIM resources before provisioning them in this application. These can transform or filter the resources to be provisioned.
A list of mappings to apply to SCIM resources before provisioning them in this application. These can transform or filter the resources to be provisioned.
A SCIM filter expression that matches resources that should be provisioned to this application.
Operations SCIMConfigMappingOperationsOptionalWhether or not this mapping applies to creates, updates, or deletes.
Whether or not this mapping applies to creates, updates, or deletes.
Strictness SCIMConfigMappingStrictnessOptionalThe level of adherence to outbound resource schemas when provisioning to this mapping. ‘Strict’ removes unknown values, while ‘passthrough’ passes unknown values to the target.
The level of adherence to outbound resource schemas when provisioning to this mapping. ‘Strict’ removes unknown values, while ‘passthrough’ passes unknown values to the target.
A JSONata expression that transforms the resource before provisioning it in the application.
Body param: List of public domains that Access will secure. This field is deprecated in favor of destinations and will be supported until November 21, 2025. If destinations are provided, then self_hosted_domains will be ignored.
Body param: Returns a 401 status code when the request is blocked by a Service Auth policy.
Body param: The amount of time that tokens issued for this application will be valid. Must be in the format 300ms or 2h45m. Valid time units are: ns, us (or µs), ms, s, m, h. Note: unsupported for infrastructure type applications.
Body param: Enables automatic authentication through cloudflared.
Body param: The tags you want assigned to an application. Tags are used to filter applications in the App Launcher dashboard.
Body param: Determines if users can access this application via a clientless browser isolation URL. This allows users to access private domains without connecting to Gateway. The option requires Clientless Browser Isolation to be set up with policies that allow users of this application.
ReturnsExpand Collapse
type AccessApplicationNewResponse interface{…}
type AccessApplicationNewResponseSelfHostedApplication struct{…}
The primary hostname and path secured by Access. This domain will be displayed if the app is visible in the App Launcher.
Type ApplicationTypeThe application type.
The application type.
When set to true, users can authenticate to this application using their WARP session. When set to false this application will always require direct IdP authentication. This setting always overrides the organization setting for WARP authentication.
The identity providers your users can select when connecting to this application. Defaults to all IdPs configured in your account.
When set to true, users skip the identity provider selection step during login. You must specify only one identity provider in allowed_idps.
The custom error message shown to a user when they are denied access to the application.
The custom URL a user is redirected to when they are denied access to the application when failing identity-based rules.
The custom URL a user is redirected to when they are denied access to the application when failing non-identity rules.
The custom pages that will be displayed when applicable for this application
Destinations []AccessApplicationNewResponseSelfHostedApplicationDestinationOptionalList of destinations secured by Access. This supersedes self_hosted_domains to allow for more flexibility in defining different types of domains. If destinations are provided, then self_hosted_domains will be ignored.
List of destinations secured by Access. This supersedes self_hosted_domains to allow for more flexibility in defining different types of domains. If destinations are provided, then self_hosted_domains will be ignored.
type AccessApplicationNewResponseSelfHostedApplicationDestinationsPublicDestination struct{…}A public hostname that Access will secure. Public destinations support sub-domain and path. Wildcard ’*’ can be used in the definition.
A public hostname that Access will secure. Public destinations support sub-domain and path. Wildcard ’*’ can be used in the definition.
The URI of the destination. Public destinations’ URIs can include a domain and path with wildcards.
type AccessApplicationNewResponseSelfHostedApplicationDestinationsPrivateDestination struct{…}
The hostname of the destination. Matches a valid SNI served by an HTTPS origin.
L4Protocol AccessApplicationNewResponseSelfHostedApplicationDestinationsPrivateDestinationL4ProtocolOptionalThe L4 protocol of the destination. When omitted, both UDP and TCP traffic will match.
The L4 protocol of the destination. When omitted, both UDP and TCP traffic will match.
type AccessApplicationNewResponseSelfHostedApplicationDestinationsViaMcpServerPortalDestination struct{…}A MCP server id configured in ai-controls. Access will secure the MCP server if accessed through a MCP portal.
A MCP server id configured in ai-controls. Access will secure the MCP server if accessed through a MCP portal.
type AccessApplicationNewResponseSelfHostedApplicationDestinationsWorkerDestination struct{…}A specific Cloudflare Worker that Access will secure. All requests routed to the specified Worker, including its preview deployments, will be protected. The preview_worker and public destination types takes precedence, so you can create separate applications to override the policies for the Worker’s previews or specific paths.
A specific Cloudflare Worker that Access will secure. All requests routed to the specified Worker, including its preview deployments, will be protected. The preview_worker and public destination types takes precedence, so you can create separate applications to override the policies for the Worker’s previews or specific paths.
type AccessApplicationNewResponseSelfHostedApplicationDestinationsPreviewWorkerDestination struct{…}A specific Cloudflare Worker whose preview deployments Access will secure. Only requests routed to the preview deployments of the specified Worker will be protected. The public destination type takes precedence, so you can create separate applications to override the policies for specific paths.
A specific Cloudflare Worker whose preview deployments Access will secure. Only requests routed to the preview deployments of the specified Worker will be protected. The public destination type takes precedence, so you can create separate applications to override the policies for specific paths.
type AccessApplicationNewResponseSelfHostedApplicationDestinationsAllWorkersDestination struct{…}Protects all Cloudflare Workers on the account with Access, including their preview deployments. At most one destination of this type can exist per account. The worker, preview_worker, all_preview_workers, and public destination types take precedence, so you can create separate applications to override the policies for specific Workers, their previews, or specific paths.
Protects all Cloudflare Workers on the account with Access, including their preview deployments. At most one destination of this type can exist per account. The worker, preview_worker, all_preview_workers, and public destination types take precedence, so you can create separate applications to override the policies for specific Workers, their previews, or specific paths.
type AccessApplicationNewResponseSelfHostedApplicationDestinationsAllPreviewWorkersDestination struct{…}Protects the preview deployments of all Cloudflare Workers on the account with Access. At most one destination of this type can exist per account. The worker, preview_worker, and public destination types take precedence, so you can create separate applications to override the policies for specific Workers, their previews, or specific paths.
Protects the preview deployments of all Cloudflare Workers on the account with Access. At most one destination of this type can exist per account. The worker, preview_worker, and public destination types take precedence, so you can create separate applications to override the policies for specific Workers, their previews, or specific paths.
Preemptively sets the Access session cookie on every hostname in a multi-hostname self-hosted application during the initial redirect chain, rather than setting it lazily on first visit. Defaults to true. Set to false to disable the eager redirect cookie behavior.
Enables the binding cookie, which increases security against compromised authorization tokens and CSRF attacks.
Enables the HttpOnly cookie attribute, which increases security against XSS attacks.
MfaConfig AccessApplicationNewResponseSelfHostedApplicationMfaConfigOptionalConfigures multi-factor authentication (MFA) settings.
Configures multi-factor authentication (MFA) settings.
AllowedAuthenticators []AccessApplicationNewResponseSelfHostedApplicationMfaConfigAllowedAuthenticatorOptionalLists the MFA methods that users can authenticate with.
Lists the MFA methods that users can authenticate with.
OAuthConfiguration AccessApplicationNewResponseSelfHostedApplicationOAuthConfigurationOptionalBeta: Optional configuration for managing an OAuth authorization flow controlled by Access. When set, Access will act as the OAuth authorization server for this application. Only compatible with OAuth clients that support RFC 8707 (Resource Indicators for OAuth 2.0). This feature is currently in beta.
Beta: Optional configuration for managing an OAuth authorization flow controlled by Access. When set, Access will act as the OAuth authorization server for this application. Only compatible with OAuth clients that support RFC 8707 (Resource Indicators for OAuth 2.0). This feature is currently in beta.
DynamicClientRegistration AccessApplicationNewResponseSelfHostedApplicationOAuthConfigurationDynamicClientRegistrationOptionalSettings for OAuth dynamic client registration.
Settings for OAuth dynamic client registration.
Whether the OAuth configuration is enabled for this application. When set to false, Access will not handle OAuth for this application. Defaults to true if omitted.
Allows options preflight requests to bypass Access authentication and go directly to the origin. Cannot turn on if cors_headers is set.
Enables cookie paths to scope an application’s JWT to the application path. If disabled, the JWT will scope to the hostname by default
Policies []AccessApplicationNewResponseSelfHostedApplicationPolicyOptional
Requires the user to request access from an administrator at the start of each session.
ConnectionRules AccessApplicationNewResponseSelfHostedApplicationPoliciesConnectionRulesOptionalThe rules that define how users may connect to targets secured by your application.
The rules that define how users may connect to targets secured by your application.
RDP AccessApplicationNewResponseSelfHostedApplicationPoliciesConnectionRulesRDPOptionalThe RDP-specific rules that define clipboard behavior for RDP connections.
The RDP-specific rules that define clipboard behavior for RDP connections.
The action Access will take if a user matches this policy. Infrastructure application policies can only use the Allow action.
The action Access will take if a user matches this policy. Infrastructure application policies can only use the Allow action.