{"command":{"summary":false,"effect":"write","timeoutSeconds":30,"inputSchema":{"type":"object","description":"Adds a new application to Access.","properties":{"path":{"type":"object","properties":{"zone_id":{"$ref":"#/definitions/access_identifier"}},"required":["zone_id"],"additionalProperties":false},"body":{"$ref":"#/definitions/access_apps"}},"required":["path","body"],"additionalProperties":false,"definitions":{"access_identifier":{"description":"Identifier.","type":"string","maxLength":32,"examples":["023e105f4ecef8ad9ca31a8372d0c353"]},"access_apps":{"type":"object","anyOf":[{"allOf":[{"$ref":"#/definitions/access_basic_app_response_props-2"},{"$ref":"#/definitions/access_self_hosted_props-2"}],"title":"Self Hosted Application","type":"object"},{"allOf":[{"$ref":"#/definitions/access_basic_app_response_props-2"},{"$ref":"#/definitions/access_saas_props-2"}],"title":"SaaS Application","type":"object"},{"allOf":[{"$ref":"#/definitions/access_basic_app_response_props-2"},{"$ref":"#/definitions/access_ssh_props-2"}],"title":"Browser SSH Application","type":"object"},{"allOf":[{"$ref":"#/definitions/access_basic_app_response_props-2"},{"$ref":"#/definitions/access_vnc_props-2"}],"title":"Browser VNC Application","type":"object"},{"allOf":[{"$ref":"#/definitions/access_basic_app_response_props-2"},{"$ref":"#/definitions/access_app_launcher_props-2"}],"title":"App Launcher Application","type":"object"},{"allOf":[{"$ref":"#/definitions/access_basic_app_response_props-2"},{"$ref":"#/definitions/access_warp_props-2"}],"title":"Device Enrollment Permissions Application","type":"object"},{"allOf":[{"$ref":"#/definitions/access_basic_app_response_props-2"},{"$ref":"#/definitions/access_biso_props-2"}],"title":"Browser Isolation Permissions Application","type":"object"},{"allOf":[{"$ref":"#/definitions/access_basic_app_response_props-2"},{"$ref":"#/definitions/access_bookmark_props-2"}],"title":"Bookmark application","type":"object"}]},"access_basic_app_response_props-2":{"type":"object","properties":{"aud":{"$ref":"#/definitions/access_aud-2"},"created_at":{"$ref":"#/definitions/access_timestamp"},"id":{"$ref":"#/definitions/access_uuid"},"scim_config":{"$ref":"#/definitions/access_scim_config-2"},"updated_at":{"$ref":"#/definitions/access_timestamp"}}},"access_self_hosted_props-2":{"type":"object","properties":{"allow_iframe":{"$ref":"#/definitions/access_allow_iframe"},"allowed_idps":{"$ref":"#/definitions/access_allowed_idps"},"app_launcher_visible":{"$ref":"#/definitions/access_app_launcher_visible"},"auto_redirect_to_identity":{"$ref":"#/definitions/access_auto_redirect_to_identity-2"},"cors_headers":{"$ref":"#/definitions/access_cors_headers"},"custom_deny_message":{"$ref":"#/definitions/access_custom_deny_message"},"custom_deny_url":{"$ref":"#/definitions/access_custom_deny_url-2"},"domain":{"$ref":"#/definitions/access_domain-3"},"eager_redirect_cookie_setting":{"$ref":"#/definitions/access_eager_redirect_cookie_setting"},"enable_binding_cookie":{"$ref":"#/definitions/access_enable_binding_cookie"},"http_only_cookie_attribute":{"$ref":"#/definitions/access_http_only_cookie_attribute"},"logo_url":{"$ref":"#/definitions/access_logo_url"},"name":{"$ref":"#/definitions/access_name-8"},"options_preflight_bypass":{"$ref":"#/definitions/access_options_preflight_bypass-2"},"same_site_cookie_attribute":{"$ref":"#/definitions/access_same_site_cookie_attribute"},"service_auth_401_redirect":{"$ref":"#/definitions/access_service_auth_401_redirect"},"session_duration":{"$ref":"#/definitions/access_session_duration-2"},"skip_interstitial":{"$ref":"#/definitions/access_skip_interstitial"},"type":{"description":"The application type.","type":"string","examples":["self_hosted"]},"use_clientless_isolation_app_launcher_url":{"$ref":"#/definitions/access_use_clientless_isolation_app_launcher_url"}},"required":["type","domain"],"title":"Self Hosted Application"},"access_saas_props-2":{"type":"object","properties":{"allowed_idps":{"$ref":"#/definitions/access_allowed_idps"},"app_launcher_visible":{"$ref":"#/definitions/access_app_launcher_visible"},"auto_redirect_to_identity":{"$ref":"#/definitions/access_auto_redirect_to_identity-2"},"logo_url":{"$ref":"#/definitions/access_logo_url"},"name":{"$ref":"#/definitions/access_name-8"},"saas_app":{"type":"object","oneOf":[{"$ref":"#/definitions/access_saml_saas_app-2"},{"$ref":"#/definitions/access_oidc_saas_app-2"}]},"type":{"description":"The application type.","type":"string","examples":["saas"]}},"title":"SaaS Application"},"access_ssh_props-2":{"allOf":[{"$ref":"#/definitions/access_self_hosted_props-2"},{"properties":{"type":{"description":"The application type.","type":"string","examples":["ssh"]}},"type":"object"}]},"access_vnc_props-2":{"allOf":[{"$ref":"#/definitions/access_self_hosted_props-2"},{"properties":{"type":{"description":"The application type.","type":"string","examples":["vnc"]}},"type":"object"}]},"access_app_launcher_props-2":{"allOf":[{"$ref":"#/definitions/access_feature_app_props-2"},{"properties":{"type":{"description":"The application type.","type":"string","examples":["app_launcher"]}},"type":"object"}]},"access_warp_props-2":{"allOf":[{"$ref":"#/definitions/access_feature_app_props-2"},{"properties":{"type":{"description":"The application type.","type":"string","examples":["warp"]}},"type":"object"}]},"access_biso_props-2":{"allOf":[{"$ref":"#/definitions/access_feature_app_props-2"},{"properties":{"type":{"description":"The application type.","type":"string","examples":["biso"]}},"type":"object"}]},"access_bookmark_props-2":{"type":"object","properties":{"app_launcher_visible":{"type":"boolean","default":true},"domain":{"description":"The URL or domain of the bookmark.","type":"string","examples":["https://mybookmark.com"]},"logo_url":{"$ref":"#/definitions/access_logo_url"},"name":{"$ref":"#/definitions/access_name-8"},"type":{"description":"The application type.","type":"string","examples":["bookmark"]}},"required":["type","domain"],"title":"Bookmark Application"},"access_aud-2":{"description":"Audience tag.","type":"string","maxLength":64,"examples":["737646a56ab1df6ec9bddc7e5ca84eaf3b0768850f3ffb5d74f1534911fe3893"]},"access_timestamp":{"type":"string","format":"date-time","examples":["2014-01-01T05:20:00.12345Z"]},"access_uuid":{"description":"UUID.","type":"string","maxLength":36,"examples":["f174e90a-fafe-4643-bbbc-4a0ed4fc8415"]},"access_scim_config-2":{"description":"Configuration for provisioning to this application via SCIM. This is currently in closed beta.","type":"object","properties":{"authentication":{"oneOf":[{"$ref":"#/definitions/access_scim_config_single_authentication-2"},{"$ref":"#/definitions/access_scim_config_multi_authentication-2"}]},"deactivate_on_delete":{"description":"If false, we propagate DELETE requests to the target application for SCIM resources. If true, we only set `active` to false on the SCIM resource. This is useful because some targets do not support DELETE operations.","type":"boolean"},"enabled":{"description":"Whether SCIM provisioning is turned on for this application.","type":"boolean"},"idp_uid":{"description":"The UID of the IdP to use as the source for SCIM resources to provision to this application.","type":"string"},"mappings":{"description":"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.","type":"array","items":{"$ref":"#/definitions/access_scim_config_mapping"}},"remote_uri":{"description":"The base URI for the application's SCIM-compatible API.","type":"string"}},"required":["remote_uri","idp_uid"]},"access_allow_iframe":{"description":"Enables loading application content in an iFrame.","type":"boolean","examples":[true]},"access_allowed_idps":{"description":"The identity providers your users can select when connecting to this application. Defaults to all IdPs configured in your account.","type":"array","items":{"description":"The identity providers selected for application.","type":"string","examples":["699d98642c564d2e855e9661899b7252"]}},"access_app_launcher_visible":{"description":"Displays the application in the App Launcher.","type":"boolean","default":true,"examples":[true]},"access_auto_redirect_to_identity-2":{"description":"When set to `true`, users skip the identity provider selection step during login. You must specify only one identity provider in allowed_idps.","type":"boolean","default":false},"access_cors_headers":{"type":"object","properties":{"allow_all_headers":{"$ref":"#/definitions/access_allow_all_headers"},"allow_all_methods":{"$ref":"#/definitions/access_allow_all_methods"},"allow_all_origins":{"$ref":"#/definitions/access_allow_all_origins"},"allow_credentials":{"$ref":"#/definitions/access_allow_credentials"},"allowed_headers":{"$ref":"#/definitions/access_allowed_headers"},"allowed_methods":{"$ref":"#/definitions/access_allowed_methods"},"allowed_origins":{"$ref":"#/definitions/access_allowed_origins"},"max_age":{"$ref":"#/definitions/access_max_age"}}},"access_custom_deny_message":{"description":"The custom error message shown to a user when they are denied access to the application.","type":"string"},"access_custom_deny_url-2":{"description":"The custom URL a user is redirected to when they are denied access to the application.","type":"string"},"access_domain-3":{"description":"The domain and path that Access will secure.","type":"string","examples":["test.example.com/admin"]},"access_eager_redirect_cookie_setting":{"description":"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.","type":"boolean","default":true,"examples":[true]},"access_enable_binding_cookie":{"description":"Enables the binding cookie, which increases security against compromised authorization tokens and CSRF attacks.","type":"boolean","default":false},"access_http_only_cookie_attribute":{"description":"Enables the HttpOnly cookie attribute, which increases security against XSS attacks.","type":"boolean","default":true,"examples":[true]},"access_logo_url":{"description":"The image URL for the logo shown in the App Launcher dashboard.","type":"string","examples":["https://www.cloudflare.com/img/logo-web-badges/cf-logo-on-white-bg.svg"]},"access_name-8":{"description":"The name of the application.","type":"string","examples":["Admin Site"]},"access_options_preflight_bypass-2":{"description":"Allows options preflight requests to bypass Access authentication and go directly to the origin. Cannot turn on if cors_headers is set.","type":"boolean","default":false,"examples":[true]},"access_same_site_cookie_attribute":{"description":"Sets the SameSite cookie setting, which provides increased security against CSRF attacks.","type":"string","examples":["strict"]},"access_service_auth_401_redirect":{"description":"Returns a 401 status code when the request is blocked by a Service Auth policy.","type":"boolean","examples":[true]},"access_session_duration-2":{"description":"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.","type":"string","default":"24h","examples":["24h"]},"access_skip_interstitial":{"description":"Enables automatic authentication through cloudflared.","type":"boolean","examples":[true]},"access_use_clientless_isolation_app_launcher_url":{"description":"Determines if users can access this application via a clientless browser isolation URL.\nThis allows users to access private domains without connecting to Gateway. The option requires\nClientless Browser Isolation to be set up with policies that allow users of this application.\n","type":"boolean","default":false,"examples":[false]},"access_saml_saas_app-2":{"type":"object","properties":{"auth_type":{"description":"Optional identifier indicating the authentication protocol used for the saas app. Required for OIDC. Default if unset is \"saml\"","type":"string","enum":["saml","oidc"],"examples":["saml"]},"consumer_service_url":{"description":"The service provider's endpoint that is responsible for receiving and parsing a SAML assertion.","type":"string","examples":["https://example.com"]},"created_at":{"$ref":"#/definitions/access_timestamp"},"custom_attributes":{"type":"array","items":{"properties":{"friendly_name":{"description":"The SAML FriendlyName of the attribute.","type":"string","examples":["Last Name"]},"name":{"description":"The name of the attribute.","type":"string","examples":["family_name"]},"name_format":{"description":"A globally unique name for an identity or service provider.","type":"string","enum":["urn:oasis:names:tc:SAML:2.0:attrname-format:unspecified","urn:oasis:names:tc:SAML:2.0:attrname-format:basic","urn:oasis:names:tc:SAML:2.0:attrname-format:uri"],"examples":["urn:oasis:names:tc:SAML:2.0:attrname-format:basic"]},"required":{"description":"If the attribute is required when building a SAML assertion.","type":"boolean","examples":[true]},"source":{"type":"object","properties":{"name":{"description":"The name of the IdP attribute.","type":"string","examples":["last_name"]},"name_by_idp":{"description":"A mapping from IdP ID to attribute name.","type":"object","additionalProperties":{"type":"string"},"examples":[{"exampleIdPID1":"AttributeName1","exampleIdPID2":"AttributeName2"}]}}}},"type":"object"}},"idp_entity_id":{"description":"The unique identifier for your SaaS application.","type":"string","examples":["https://example.cloudflareaccess.com"]},"name_id_format":{"description":"The format of the name identifier sent to the SaaS application.","type":"string","enum":["id","email"],"examples":["id"]},"name_id_transform_jsonata":{"description":"A [JSONata](https://jsonata.org/) expression that transforms an application's user identities into a NameID value for its SAML assertion. This expression should evaluate to a singular string. The output of this expression can override the `name_id_format` setting.\n","type":"string","examples":["$substringBefore(email, '@') & '+sandbox@' & $substringAfter(email, '@')"]},"public_key":{"description":"The Access public certificate that will be used to verify your identity.","type":"string","examples":["example unique name"]},"sp_entity_id":{"description":"A globally unique name for an identity or service provider.","type":"string","examples":["example unique name"]},"sso_endpoint":{"description":"The endpoint where your SaaS application will send login requests.","type":"string","examples":["https://example.cloudflareaccess.com/cdn-cgi/access/sso/saml/b3f58a2b414e0b51d45c8c2af26fccca0e27c63763c426fa52f98dcf0b3b3bfd"]},"updated_at":{"$ref":"#/definitions/access_timestamp"}},"title":"SAML SaaS App"},"access_oidc_saas_app-2":{"type":"object","properties":{"access_token_lifetime":{"description":"The lifetime of the OIDC Access Token after creation. Valid units are m,h. Must be greater than or equal to 1m and less than or equal to 24h.","type":"string","examples":["5m"]},"allow_pkce_without_client_secret":{"description":"If client secret should be required on the token endpoint when authorization_code_with_pkce grant is used.","type":"boolean","examples":[true]},"app_launcher_url":{"description":"The URL where this applications tile redirects users","type":"string","examples":["https://example.com/login"]},"auth_type":{"description":"Identifier of the authentication protocol used for the saas app. Required for OIDC.","type":"string","enum":["saml","oidc"],"examples":["oidc"]},"client_id":{"description":"The application client id","type":"string","examples":["oidc client id"]},"client_secret":{"description":"The application client secret, only returned on POST request.","type":"string","examples":["oidc client secret"]},"created_at":{"$ref":"#/definitions/access_timestamp"},"custom_claims":{"type":"array","items":{"properties":{"name":{"description":"The name of the claim.","type":"string","examples":["family_name"]},"required":{"description":"If the claim is required when building an OIDC token.","type":"boolean","examples":[true]},"scope":{"description":"The scope of the claim.","type":"string","enum":["groups","profile","email","openid"],"examples":["profile"]},"source":{"type":"object","properties":{"name":{"description":"The name of the IdP claim.","type":"string","examples":["last_name"]},"name_by_idp":{"description":"A mapping from IdP ID to attribute name.","type":"array","items":{"properties":{"idp_id":{"description":"The UID of the IdP.","type":"string","examples":["exampleIdPID1"]},"source_name":{"description":"The name of the IdP provided attribute.","type":"string","examples":["AttributeName1"]}},"type":"object"}}}}},"type":"object"}},"grant_types":{"description":"The OIDC flows supported by this application","type":"array","items":{"enum":["authorization_code","authorization_code_with_pkce","refresh_tokens","hybrid","implicit"],"type":"string"},"examples":[["authorization_code"]]},"group_filter_regex":{"description":"A regex to filter Cloudflare groups returned in ID token and userinfo endpoint.","type":"string","examples":["^GROUP_FILTER-*$"]},"hybrid_and_implicit_options":{"type":"object","properties":{"return_access_token_from_authorization_endpoint":{"description":"If an Access Token should be returned from the OIDC Authorization endpoint","type":"boolean"},"return_id_token_from_authorization_endpoint":{"description":"If an ID Token should be returned from the OIDC Authorization endpoint","type":"boolean"}}},"public_key":{"description":"The Access public certificate that will be used to verify your identity.","type":"string","examples":["example unique name"]},"redirect_uris":{"description":"The permitted URL's for Cloudflare to return Authorization codes and Access/ID tokens","type":"array","items":{"type":"string"},"examples":[["https://example.com"]]},"refresh_token_options":{"type":"object","properties":{"lifetime":{"description":"How long a refresh token will be valid for after creation. Valid units are m,h,d. Must be longer than 1m.","type":"string","examples":["30d"]}}},"scopes":{"description":"Define the user information shared with access, \"offline_access\" scope will be automatically enabled if refresh tokens are enabled","type":"array","items":{"enum":["openid","groups","email","profile"],"type":"string"},"examples":[["openid","groups","email","profile"]]},"updated_at":{"$ref":"#/definitions/access_timestamp"}},"title":"OIDC SaaS App"},"access_feature_app_props-2":{"type":"object","properties":{"allowed_idps":{"$ref":"#/definitions/access_allowed_idps"},"auto_redirect_to_identity":{"$ref":"#/definitions/access_auto_redirect_to_identity-2"},"domain":{"$ref":"#/definitions/access_domain-3"},"name":{"$ref":"#/definitions/access_name-8"},"session_duration":{"$ref":"#/definitions/access_session_duration-2"},"type":{"$ref":"#/definitions/access_type-3"}},"required":["type"]},"access_scim_config_single_authentication-2":{"oneOf":[{"$ref":"#/definitions/access_scim_config_authentication_http_basic"},{"$ref":"#/definitions/access_scim_config_authentication_oauth_bearer_token-2"},{"$ref":"#/definitions/access_scim_config_authentication_oauth2"},{"$ref":"#/definitions/access_scim_config_authentication_access_service_token"}]},"access_scim_config_multi_authentication-2":{"description":"Multiple authentication schemes","type":"array","items":{"$ref":"#/definitions/access_scim_config_single_authentication-2"}},"access_scim_config_mapping":{"description":"Transformations and filters applied to resources before they are provisioned in the remote SCIM service.","type":"object","properties":{"enabled":{"description":"Whether or not this mapping is enabled.","type":"boolean"},"filter":{"description":"A [SCIM filter expression](https://datatracker.ietf.org/doc/html/rfc7644#section-3.4.2.2) that matches resources that should be provisioned to this application.","type":"string","examples":["title pr or userType eq \"Intern\""]},"operations":{"description":"Whether or not this mapping applies to creates, updates, or deletes.","type":"object","properties":{"create":{"description":"Whether or not this mapping applies to create (POST) operations.","type":"boolean"},"delete":{"description":"Whether or not this mapping applies to DELETE operations.","type":"boolean"},"update":{"description":"Whether or not this mapping applies to update (PATCH/PUT) operations.","type":"boolean"}}},"schema":{"description":"Which SCIM resource type this mapping applies to.","type":"string","examples":["urn:ietf:params:scim:schemas:core:2.0:User"]},"strictness":{"description":"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.","type":"string","enum":["strict","passthrough"]},"transform_jsonata":{"description":"A [JSONata](https://jsonata.org/) expression that transforms the resource before provisioning it in the application.","type":"string","examples":["$merge([$, {'userName': $substringBefore($.userName, '@') & '+test@' & $substringAfter($.userName, '@')}])"]}},"required":["schema"]},"access_allow_all_headers":{"description":"Allows all HTTP request headers.","type":"boolean","examples":[true]},"access_allow_all_methods":{"description":"Allows all HTTP request methods.","type":"boolean"},"access_allow_all_origins":{"description":"Allows all origins.","type":"boolean"},"access_allow_credentials":{"description":"When set to `true`, includes credentials (cookies, authorization headers, or TLS client certificates) with requests.","type":"boolean"},"access_allowed_headers":{"description":"Allowed HTTP request headers.","type":"array","items":{"type":"string"}},"access_allowed_methods":{"description":"Allowed HTTP request methods.","type":"array","items":{"enum":["GET","POST","HEAD","PUT","DELETE","CONNECT","OPTIONS","TRACE","PATCH"],"type":"string"},"examples":[["GET"]]},"access_allowed_origins":{"description":"Allowed origins.","type":"array","items":{"type":"string"},"examples":[["https://example.com"]]},"access_max_age":{"description":"The maximum number of seconds the results of a preflight request can be cached.","type":"number","maximum":86400,"minimum":-1,"examples":[-1]},"access_type-3":{"description":"The application type.","type":"string","enum":["self_hosted","saas","ssh","vnc","app_launcher","warp","biso","bookmark","dash_sso"],"examples":["self_hosted"]},"access_scim_config_authentication_http_basic":{"description":"Attributes for configuring HTTP Basic authentication scheme for SCIM provisioning to an application.","type":"object","properties":{"password":{"description":"Password used to authenticate with the remote SCIM service.","type":"string"},"scheme":{"description":"The authentication scheme to use when making SCIM requests to this application.","type":"string","enum":["httpbasic"]},"user":{"description":"User name used to authenticate with the remote SCIM service.","type":"string"}},"required":["scheme","user","password"],"title":"HTTP Basic"},"access_scim_config_authentication_oauth_bearer_token-2":{"description":"Attributes for configuring OAuth Bearer Token authentication scheme for SCIM provisioning to an application.","type":"object","properties":{"scheme":{"description":"The authentication scheme to use when making SCIM requests to this application.","type":"string","enum":["oauthbearertoken"]},"token":{"description":"Token used to authenticate with the remote SCIM service.","type":"string"}},"required":["scheme","token"],"title":"OAuth Bearer Token"},"access_scim_config_authentication_oauth2":{"description":"Attributes for configuring OAuth 2 authentication scheme for SCIM provisioning to an application.","type":"object","properties":{"authorization_url":{"description":"URL used to generate the auth code used during token generation.","type":"string"},"client_id":{"description":"Client ID used to authenticate when generating a token for authenticating with the remote SCIM service.","type":"string"},"client_secret":{"description":"Secret used to authenticate when generating a token for authenticating with the remove SCIM service.","type":"string"},"scheme":{"description":"The authentication scheme to use when making SCIM requests to this application.","type":"string","enum":["oauth2"]},"scopes":{"description":"The authorization scopes to request when generating the token used to authenticate with the remove SCIM service.","type":"array","items":{"type":"string"}},"token_url":{"description":"URL used to generate the token used to authenticate with the remote SCIM service.","type":"string"}},"required":["scheme","client_id","client_secret","authorization_url","token_url"],"title":"OAuth 2"},"access_scim_config_authentication_access_service_token":{"description":"Attributes for configuring Access Service Token authentication scheme for SCIM provisioning to an application.","type":"object","properties":{"client_id":{"description":"Client ID of the Access service token used to authenticate with the remote service.","type":"string"},"client_secret":{"description":"Client secret of the Access service token used to authenticate with the remote service.","type":"string"},"scheme":{"description":"The authentication scheme to use when making SCIM requests to this application.","type":"string","enum":["access_service_token"]}},"required":["scheme","client_id","client_secret"],"title":"Access Service Token"}}},"name":"Add an Access application","id":"cloudflare.zone-level-access-applications-add-a-bookmark-application","example":{"path":{"zone_id":"023e105f4ecef8ad9ca31a8372d0c353"},"body":{"type":"self_hosted","domain":"test.example.com/admin"}},"maxRequests":1}}