POST /accounts/{account_id}/devices/policy

Creates a device settings profile to be applied to certain devices matching the criteria.

Servers

Path parameters

Name Type Required Description
account_id Yes

Request headers

Name Type Required Description
Content-Type String Yes The media type of the request body.

Default value: "application/json"

Request body fields

Name Type Required Description
auto_connect Number No

The amount of time in seconds to reconnect after having been disabled.

Default value: 0

description String No

A description of the policy.

virtual_networks Object No

Virtual network access settings for the device.

virtual_networks.allowed[] Array Yes

List of virtual network IDs the device is allowed to access. When virtual_networks is set, at least one entry is required.

virtual_networks.default String Yes

The default virtual network ID. Must be included in the allowed list.

exclude[] Array No

List of routes excluded in the WARP client's tunnel. Both 'exclude' and 'include' cannot be set in the same request.

switch_locked Boolean No

Whether to allow the user to turn off the WARP switch and disconnect the client.

Default value: false

include[] Array No

List of routes included in the WARP client's tunnel. Both 'exclude' and 'include' cannot be set in the same request.

tunnel_protocol String No

Determines which tunnel protocol to use.

match String Yes

The wirefilter expression to match devices. Available values: "identity.email", "identity.groups.id", "identity.groups.name", "identity.groups.email", "identity.service_token_uuid", "identity.saml_attributes", "network", "os.name", "os.version".

support_url String No

The URL to launch when the Send Feedback button is clicked.

allow_updates Boolean No

Whether to receive update notifications when a new version of the client is available.

Default value: false

lan_allow_subnet_size Number No

The size of the subnet for the local access network. Note that this field is omitted from the response if null or unset.

allow_mode_switch Boolean No

Whether to allow the user to switch WARP between modes.

Default value: false

disable_auto_fallback Boolean No

If the dns_server field of a fallback domain is not present, the client will fall back to a best guess of the default/system DNS resolvers unless this policy option is set to true.

Default value: false

register_interface_ip_with_dns Boolean No

Determines if the operating system will register WARP's local interface IP with your on-premises DNS server.

Default value: true

global_acceleration Object No

Global Acceleration settings for China. When configured, WARP clients connect to the Global Accelerator addresses instead of the default ones. Please contact your account representative to enable this feature on your account. See https://developers.cloudflare.com/china-network/concepts/global-acceleration/.

global_acceleration.api_endpoints[] Array Yes

IP:port entries for the API endpoints.

global_acceleration.wireguard_endpoints[] Array Yes

IP:port entries for the WireGuard tunnel endpoints. Either wireguard_endpoints or masque_endpoints must be provided.

global_acceleration.masque_endpoints[] Array Yes

IP:port entries for the MASQUE tunnel endpoints. Either wireguard_endpoints or masque_endpoints must be provided.

global_acceleration.enabled Boolean Yes

Global acceleration settings are used only when "enabled".

allowed_to_leave Boolean No

Whether to allow devices to leave the organization.

Default value: true

captive_portal Number No

Turn on the captive portal after the specified amount of time.

Default value: 180

service_mode_v2 Object No
service_mode_v2.port Number No

The port number when used with proxy mode.

service_mode_v2.mode String No

The mode to run the WARP client under.

name String Yes

The name of the device settings profile.

exclude_office_ips Boolean No

Whether to add Microsoft IPs to Split Tunnel exclusions.

Default value: false

sccm_vpn_boundary_support Boolean No

Determines whether the WARP client indicates to SCCM that it is inside a VPN boundary. (Windows only).

Default value: false

enabled Boolean No

Whether the policy will be applied to matching devices.

Default value: true

precedence Number Yes

The precedence of the policy. Lower values indicate higher precedence. Policies will be evaluated in ascending order of this field.

dns_search_suffixes[] Array No

List of DNS search suffixes to apply to clients. Suffixes are evaluated in order. Use an empty array to clear.

dns_search_suffixes[].description String No

A description of the DNS search suffix.

dns_search_suffixes[].suffix String Yes

The DNS search suffix to append when resolving short hostnames.

lan_allow_minutes Number No

The amount of time in minutes a user is allowed access to their LAN. A value of 0 will allow LAN access until the next WARP reconnection, such as a reboot or a laptop waking from sleep. Note that this field is omitted from the response if null or unset.

How to start integrating

  1. Add HTTP Task to your workflow definition.
  2. Search for the API you want to integrate with and click on the name.
    • This loads the API reference documentation and prepares the Http request settings.
  3. Click Test request to test run your request to the API and see the API's response.