Search + K

Command Palette

Search for a command to run...

Sign In

Create a device settings profile

POST /accounts/{account_id}/devices/policy
Copy endpoint
https://api.cloudflare.com/client/v4

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

Parameters

path Path Parameters

Name Type
account_id required
type TeamsDevicesIdentifier = unknown

Request Body

application/json required
{
allow_mode_switch?: TeamsDevicesAllowModeSwitch

Whether to allow the user to switch WARP between modes.

type TeamsDevicesAllowModeSwitch = boolean
;
allow_updates?: TeamsDevicesAllowUpdates

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

type TeamsDevicesAllowUpdates = boolean
;
allowed_to_leave?: TeamsDevicesAllowedToLeave

Whether to allow devices to leave the organization.

type TeamsDevicesAllowedToLeave = boolean
;
auto_connect?: TeamsDevicesAutoConnect

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

type TeamsDevicesAutoConnect = number
;
captive_portal?: TeamsDevicesCaptivePortal

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

type TeamsDevicesCaptivePortal = number
;
description?: TeamsDevicesSchemasDescription

A description of the policy.

type TeamsDevicesSchemasDescription = string
;
disable_auto_fallback?: TeamsDevicesDisableAutoFallback

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.

type TeamsDevicesDisableAutoFallback = boolean
;
enabled?: boolean;
exclude?: TeamsDevicesExcludeRequest

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

type TeamsDevicesExcludeRequest = TeamsDevicesSplitTunnel[]
;
exclude_office_ips?: TeamsDevicesExcludeOfficeIps

Whether to add Microsoft IPs to Split Tunnel exclusions.

type TeamsDevicesExcludeOfficeIps = boolean
;
include?: TeamsDevicesIncludeRequest

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

type TeamsDevicesIncludeRequest = TeamsDevicesSplitTunnelInclude[]
;
lan_allow_minutes?: TeamsDevicesLanAllowMinutes

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.

type TeamsDevicesLanAllowMinutes = number
;
lan_allow_subnet_size?: TeamsDevicesLanAllowSubnetSize

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

type TeamsDevicesLanAllowSubnetSize = number
;
match: TeamsDevicesSchemasMatch

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".

type TeamsDevicesSchemasMatch = string
;
name: string;
precedence: TeamsDevicesPrecedence

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

type TeamsDevicesPrecedence = number
;
register_interface_ip_with_dns?: TeamsDevicesRegisterInterfaceIpWithDns

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

type TeamsDevicesRegisterInterfaceIpWithDns = boolean
;
sccm_vpn_boundary_support?: TeamsDevicesSccmVpnBoundarySupport

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

type TeamsDevicesSccmVpnBoundarySupport = boolean
;
service_mode_v2?: TeamsDevicesServiceModeV2
interface TeamsDevicesServiceModeV2 {
mode?: string;
port?: number;
}
;
support_url?: TeamsDevicesSupportUrl

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

type TeamsDevicesSupportUrl = string
;
switch_locked?: TeamsDevicesSwitchLocked

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

type TeamsDevicesSwitchLocked = boolean
;
tunnel_protocol?: TeamsDevicesTunnelProtocol

Determines which tunnel protocol to use.

type TeamsDevicesTunnelProtocol = string
;
}

Responses

200 application/json

Create a device settings profile response.

type TeamsDevicesDeviceSettingsResponse = type TeamsDevicesApiResponseSingle = never & { result?: TeamsDevicesDeviceSettingsPolicy
interface TeamsDevicesDeviceSettingsPolicy {
allow_mode_switch?: TeamsDevicesAllowModeSwitch;
allow_updates?: TeamsDevicesAllowUpdates;
allowed_to_leave?: TeamsDevicesAllowedToLeave;
auto_connect?: TeamsDevicesAutoConnect;
captive_portal?: TeamsDevicesCaptivePortal;
default?: TeamsDevicesDefault;
description?: TeamsDevicesSchemasDescription;
disable_auto_fallback?: TeamsDevicesDisableAutoFallback;
enabled?: boolean;
exclude?: TeamsDevicesExclude;
exclude_office_ips?: TeamsDevicesExcludeOfficeIps;
fallback_domains?: TeamsDevicesFallbackDomains;
gateway_unique_id?: TeamsDevicesGatewayUniqueId;
include?: TeamsDevicesInclude;
lan_allow_minutes?: TeamsDevicesLanAllowMinutes;
lan_allow_subnet_size?: TeamsDevicesLanAllowSubnetSize;
match?: TeamsDevicesSchemasMatch;
name?: string;
policy_id?: TeamsDevicesSchemasUuid;
precedence?: TeamsDevicesPrecedence;
register_interface_ip_with_dns?: TeamsDevicesRegisterInterfaceIpWithDns;
sccm_vpn_boundary_support?: TeamsDevicesSccmVpnBoundarySupport;
service_mode_v2?: TeamsDevicesServiceModeV2;
support_url?: TeamsDevicesSupportUrl;
switch_locked?: TeamsDevicesSwitchLocked;
target_tests?: TeamsDevicesTargetDexTest[];
tunnel_protocol?: TeamsDevicesTunnelProtocol;
}
; }

Client Errors

4XX application/json

Create a device settings profile response failure.

type TeamsDevicesDeviceSettingsResponse = type TeamsDevicesApiResponseSingle = never & { result?: TeamsDevicesDeviceSettingsPolicy
interface TeamsDevicesDeviceSettingsPolicy {
allow_mode_switch?: TeamsDevicesAllowModeSwitch;
allow_updates?: TeamsDevicesAllowUpdates;
allowed_to_leave?: TeamsDevicesAllowedToLeave;
auto_connect?: TeamsDevicesAutoConnect;
captive_portal?: TeamsDevicesCaptivePortal;
default?: TeamsDevicesDefault;
description?: TeamsDevicesSchemasDescription;
disable_auto_fallback?: TeamsDevicesDisableAutoFallback;
enabled?: boolean;
exclude?: TeamsDevicesExclude;
exclude_office_ips?: TeamsDevicesExcludeOfficeIps;
fallback_domains?: TeamsDevicesFallbackDomains;
gateway_unique_id?: TeamsDevicesGatewayUniqueId;
include?: TeamsDevicesInclude;
lan_allow_minutes?: TeamsDevicesLanAllowMinutes;
lan_allow_subnet_size?: TeamsDevicesLanAllowSubnetSize;
match?: TeamsDevicesSchemasMatch;
name?: string;
policy_id?: TeamsDevicesSchemasUuid;
precedence?: TeamsDevicesPrecedence;
register_interface_ip_with_dns?: TeamsDevicesRegisterInterfaceIpWithDns;
sccm_vpn_boundary_support?: TeamsDevicesSccmVpnBoundarySupport;
service_mode_v2?: TeamsDevicesServiceModeV2;
support_url?: TeamsDevicesSupportUrl;
switch_locked?: TeamsDevicesSwitchLocked;
target_tests?: TeamsDevicesTargetDexTest[];
tunnel_protocol?: TeamsDevicesTunnelProtocol;
}
; }
& interface TeamsDevicesApiResponseCommonFailure {
errors: TeamsDevicesMessages
type TeamsDevicesMessages = { code: number;message: string; }[]
;
messages: TeamsDevicesMessages
type TeamsDevicesMessages = { code: number;message: string; }[]
;
result: null;
success: false;
}