---
title: Delete Device DEX test
---

[Skip to content](#_top)

[API Reference](https://developers.cloudflare.com/api)

[Zero Trust](https://developers.cloudflare.com/api/resources/zero_trust)

[Devices](https://developers.cloudflare.com/api/resources/zero_trust/subresources/devices)

[DEX Tests](https://developers.cloudflare.com/api/resources/zero_trust/subresources/devices/subresources/dex_tests)

Copy Markdown

Open in **Claude**Open in **ChatGPT**Open in **Cursor**

---

**Copy Markdown****View as Markdown**

# Delete Device DEX test

DELETE/accounts/{account\_id}/dex/devices/dex\_tests/{dex\_test\_id}

Delete a Device DEX test. Returns the remaining device dex tests for the account.

##### Security

<details>

<summary>API Token</summary>



The preferred authorization scheme for interacting with the Cloudflare API. <a href="https://developers.cloudflare.com/fundamentals/api/get-started/create-token/">Create a token</a>.

**Example:**<code>Authorization: Bearer Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY</code>

</details>

<details>

<summary>API Email + API Key</summary>



The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key.

**Example:**<code>X-Auth-Email: user@example.com</code>

The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys.

**Example:**<code>X-Auth-Key: 144c9defac04969c7bfad8efaa8ea194</code>

</details>

##### Accepted Permissions (at least one required)

`Cloudflare DEX Write`

##### P ath ParametersExpand Collapse

account\_id: string

Unique identifier linked to an account.

maxLength32

[Link to this property](<#(resource)%20zero_trust.devices.dex_tests%20%3E%20(method)%20delete%20%3E%20(params)%20default%20%3E%20(param)%20account_id%20%3E%20(schema)>)

dex\_test\_id: string

API Resource UUID tag.

maxLength36

[Link to this property](<#(resource)%20zero_trust.devices.dex_tests%20%3E%20(method)%20delete%20%3E%20(params)%20default%20%3E%20(param)%20dex_test_id%20%3E%20(schema)>)

##### ReturnsExpand Collapse

<details>

<summary>

errors: array of object {code, message, documentation\_url, source }

</summary>

code: number

minimum1000

<a href="#(resource)%20zero_trust.devices.dex_tests%20%3E%20(method)%20delete%20%3E%20(network%20schema)%20%3E%20(property)%20errors%20%3E%20(items)%20%3E%20(property)%20code">Link to this property</a>

message: string

<a href="#(resource)%20zero_trust.devices.dex_tests%20%3E%20(method)%20delete%20%3E%20(network%20schema)%20%3E%20(property)%20errors%20%3E%20(items)%20%3E%20(property)%20message">Link to this property</a>

documentation\_url: optional string

<a href="#(resource)%20zero_trust.devices.dex_tests%20%3E%20(method)%20delete%20%3E%20(network%20schema)%20%3E%20(property)%20errors%20%3E%20(items)%20%3E%20(property)%20documentation_url">Link to this property</a>

<details>

<summary>

source: optional object {pointer }

</summary>

pointer: optional string

<a href="#(resource)%20zero_trust.devices.dex_tests%20%3E%20(method)%20delete%20%3E%20(network%20schema)%20%3E%20(property)%20errors%20%3E%20(items)%20%3E%20(property)%20source%20%3E%20(property)%20pointer">Link to this property</a>

</details>

<a href="#(resource)%20zero_trust.devices.dex_tests%20%3E%20(method)%20delete%20%3E%20(network%20schema)%20%3E%20(property)%20errors%20%3E%20(items)%20%3E%20(property)%20source">Link to this property</a>

</details>

[Link to this property](<#(resource)%20zero_trust.devices.dex_tests%20%3E%20(method)%20delete%20%3E%20(network%20schema)%20%3E%20(property)%20errors>)

<details>

<summary>

messages: array of object {code, message, documentation\_url, source }

</summary>

code: number

minimum1000

<a href="#(resource)%20zero_trust.devices.dex_tests%20%3E%20(method)%20delete%20%3E%20(network%20schema)%20%3E%20(property)%20messages%20%3E%20(items)%20%3E%20(property)%20code">Link to this property</a>

message: string

<a href="#(resource)%20zero_trust.devices.dex_tests%20%3E%20(method)%20delete%20%3E%20(network%20schema)%20%3E%20(property)%20messages%20%3E%20(items)%20%3E%20(property)%20message">Link to this property</a>

documentation\_url: optional string

<a href="#(resource)%20zero_trust.devices.dex_tests%20%3E%20(method)%20delete%20%3E%20(network%20schema)%20%3E%20(property)%20messages%20%3E%20(items)%20%3E%20(property)%20documentation_url">Link to this property</a>

<details>

<summary>

source: optional object {pointer }

</summary>

pointer: optional string

<a href="#(resource)%20zero_trust.devices.dex_tests%20%3E%20(method)%20delete%20%3E%20(network%20schema)%20%3E%20(property)%20messages%20%3E%20(items)%20%3E%20(property)%20source%20%3E%20(property)%20pointer">Link to this property</a>

</details>

<a href="#(resource)%20zero_trust.devices.dex_tests%20%3E%20(method)%20delete%20%3E%20(network%20schema)%20%3E%20(property)%20messages%20%3E%20(items)%20%3E%20(property)%20source">Link to this property</a>

</details>

[Link to this property](<#(resource)%20zero_trust.devices.dex_tests%20%3E%20(method)%20delete%20%3E%20(network%20schema)%20%3E%20(property)%20messages>)

success: true

Whether the API call was successful.

[Link to this property](<#(resource)%20zero_trust.devices.dex_tests%20%3E%20(method)%20delete%20%3E%20(network%20schema)%20%3E%20(property)%20success>)

<details>

<summary>

result: optional object {dex\_tests }

</summary>

<details>

<summary>

dex\_tests: optional array of <a href="https://developers.cloudflare.com/api/resources/zero_trust#(resource)%20zero_trust.devices.dex_tests%20%3E%20(model)%20schema_http%20%3E%20(schema)">SchemaHTTP</a> { data, enabled, interval, 7 more }

</summary>

<details>

<summary>

data: <a href="https://developers.cloudflare.com/api/resources/zero_trust#(resource)%20zero_trust.devices.dex_tests%20%3E%20(model)%20schema_data%20%3E%20(schema)">SchemaData</a> { host, kind, method }

The configuration object which contains the details for the WARP client to conduct the test.

</summary>

host: string

The desired endpoint to test.

<a href="#(resource)%20zero_trust.devices.dex_tests%20%3E%20(model)%20schema_http%20%3E%20(schema)%20%3E%20(property)%20data%20%2B%20(resource)%20zero_trust.devices.dex_tests%20%3E%20(model)%20schema_data%20%3E%20(schema)%20%3E%20(property)%20host">Link to this property</a>

<details>

<summary>

kind: "http"or "traceroute"

The type of test.

</summary>

One of the following:

"http"

<a href="#(resource)%20zero_trust.devices.dex_tests%20%3E%20(model)%20schema_http%20%3E%20(schema)%20%3E%20(property)%20data%20%2B%20(resource)%20zero_trust.devices.dex_tests%20%3E%20(model)%20schema_data%20%3E%20(schema)%20%3E%20(property)%20kind%20%3E%20(member)%200">Link to this property</a>

"traceroute"

<a href="#(resource)%20zero_trust.devices.dex_tests%20%3E%20(model)%20schema_http%20%3E%20(schema)%20%3E%20(property)%20data%20%2B%20(resource)%20zero_trust.devices.dex_tests%20%3E%20(model)%20schema_data%20%3E%20(schema)%20%3E%20(property)%20kind%20%3E%20(member)%201">Link to this property</a>

</details>

<a href="#(resource)%20zero_trust.devices.dex_tests%20%3E%20(model)%20schema_http%20%3E%20(schema)%20%3E%20(property)%20data%20%2B%20(resource)%20zero_trust.devices.dex_tests%20%3E%20(model)%20schema_data%20%3E%20(schema)%20%3E%20(property)%20kind">Link to this property</a>

method: optional "GET"

The HTTP request method type.

<a href="#(resource)%20zero_trust.devices.dex_tests%20%3E%20(model)%20schema_http%20%3E%20(schema)%20%3E%20(property)%20data%20%2B%20(resource)%20zero_trust.devices.dex_tests%20%3E%20(model)%20schema_data%20%3E%20(schema)%20%3E%20(property)%20method">Link to this property</a>

</details>

<a href="#(resource)%20zero_trust.devices.dex_tests%20%3E%20(method)%20delete%20%3E%20(network%20schema)%20%3E%20(property)%20result%20%2B%20(resource)%20zero_trust.devices.dex_tests%20%3E%20(model)%20schema_http%20%3E%20(schema)%20%3E%20(property)%20data">Link to this property</a>

enabled: boolean

Determines whether or not the test is active.

<a href="#(resource)%20zero_trust.devices.dex_tests%20%3E%20(method)%20delete%20%3E%20(network%20schema)%20%3E%20(property)%20result%20%2B%20(resource)%20zero_trust.devices.dex_tests%20%3E%20(model)%20schema_http%20%3E%20(schema)%20%3E%20(property)%20enabled">Link to this property</a>

interval: string

How often the test will run.

<a href="#(resource)%20zero_trust.devices.dex_tests%20%3E%20(method)%20delete%20%3E%20(network%20schema)%20%3E%20(property)%20result%20%2B%20(resource)%20zero_trust.devices.dex_tests%20%3E%20(model)%20schema_http%20%3E%20(schema)%20%3E%20(property)%20interval">Link to this property</a>

name: string

The name of the DEX test. Must be unique.

<a href="#(resource)%20zero_trust.devices.dex_tests%20%3E%20(method)%20delete%20%3E%20(network%20schema)%20%3E%20(property)%20result%20%2B%20(resource)%20zero_trust.devices.dex_tests%20%3E%20(model)%20schema_http%20%3E%20(schema)%20%3E%20(property)%20name">Link to this property</a>

created: optional string

Date the test was created, in RFC 3339 format.

formatdate-time

<a href="#(resource)%20zero_trust.devices.dex_tests%20%3E%20(method)%20delete%20%3E%20(network%20schema)%20%3E%20(property)%20result%20%2B%20(resource)%20zero_trust.devices.dex_tests%20%3E%20(model)%20schema_http%20%3E%20(schema)%20%3E%20(property)%20created">Link to this property</a>

description: optional string

Additional details about the test.

<a href="#(resource)%20zero_trust.devices.dex_tests%20%3E%20(method)%20delete%20%3E%20(network%20schema)%20%3E%20(property)%20result%20%2B%20(resource)%20zero_trust.devices.dex_tests%20%3E%20(model)%20schema_http%20%3E%20(schema)%20%3E%20(property)%20description">Link to this property</a>

<details>

<summary>

target\_policies: optional array of object {id, default, name }

DEX rules targeted by this test

</summary>

id: string

The id of the DEX rule.

maxLength36

<a href="#(resource)%20zero_trust.devices.dex_tests%20%3E%20(method)%20delete%20%3E%20(network%20schema)%20%3E%20(property)%20result%20%2B%20(resource)%20zero_trust.devices.dex_tests%20%3E%20(model)%20schema_http%20%3E%20(schema)%20%3E%20(property)%20target_policies%20%3E%20(items)%20%3E%20(property)%20id">Link to this property</a>

default: optional boolean

Whether the DEX rule is the account default.

<a href="#(resource)%20zero_trust.devices.dex_tests%20%3E%20(method)%20delete%20%3E%20(network%20schema)%20%3E%20(property)%20result%20%2B%20(resource)%20zero_trust.devices.dex_tests%20%3E%20(model)%20schema_http%20%3E%20(schema)%20%3E%20(property)%20target_policies%20%3E%20(items)%20%3E%20(property)%20default">Link to this property</a>

name: optional string

The name of the DEX rule.

<a href="#(resource)%20zero_trust.devices.dex_tests%20%3E%20(method)%20delete%20%3E%20(network%20schema)%20%3E%20(property)%20result%20%2B%20(resource)%20zero_trust.devices.dex_tests%20%3E%20(model)%20schema_http%20%3E%20(schema)%20%3E%20(property)%20target_policies%20%3E%20(items)%20%3E%20(property)%20name">Link to this property</a>

</details>

<a href="#(resource)%20zero_trust.devices.dex_tests%20%3E%20(method)%20delete%20%3E%20(network%20schema)%20%3E%20(property)%20result%20%2B%20(resource)%20zero_trust.devices.dex_tests%20%3E%20(model)%20schema_http%20%3E%20(schema)%20%3E%20(property)%20target_policies">Link to this property</a>

targeted: optional boolean

<a href="#(resource)%20zero_trust.devices.dex_tests%20%3E%20(method)%20delete%20%3E%20(network%20schema)%20%3E%20(property)%20result%20%2B%20(resource)%20zero_trust.devices.dex_tests%20%3E%20(model)%20schema_http%20%3E%20(schema)%20%3E%20(property)%20targeted">Link to this property</a>

test\_id: optional string

The unique identifier for the test.

maxLength32

<a href="#(resource)%20zero_trust.devices.dex_tests%20%3E%20(method)%20delete%20%3E%20(network%20schema)%20%3E%20(property)%20result%20%2B%20(resource)%20zero_trust.devices.dex_tests%20%3E%20(model)%20schema_http%20%3E%20(schema)%20%3E%20(property)%20test_id">Link to this property</a>

updated: optional string

Date the test was last updated, in RFC 3339 format.

formatdate-time

<a href="#(resource)%20zero_trust.devices.dex_tests%20%3E%20(method)%20delete%20%3E%20(network%20schema)%20%3E%20(property)%20result%20%2B%20(resource)%20zero_trust.devices.dex_tests%20%3E%20(model)%20schema_http%20%3E%20(schema)%20%3E%20(property)%20updated">Link to this property</a>

</details>

<a href="#(resource)%20zero_trust.devices.dex_tests%20%3E%20(method)%20delete%20%3E%20(network%20schema)%20%3E%20(property)%20result%20%2B%20(resource)%20zero_trust.devices.dex_tests%20%3E%20(model)%20dex_test_delete_response%20%3E%20(schema)%20%3E%20(property)%20dex_tests">Link to this property</a>

</details>

[Link to this property](<#(resource)%20zero_trust.devices.dex_tests%20%3E%20(method)%20delete%20%3E%20(network%20schema)%20%3E%20(property)%20result>)

### Delete Device DEX test

HTTP

HTTPTypeScriptPythonGoTerraform

```
curl https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/dex/devices/dex_tests/$DEX_TEST_ID \
    -X DELETE \
    -H "Authorization: Bearer $CLOUDFLARE_API_TOKEN"
```

200 example

```
{
  "errors": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "messages": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "success": true,
  "result": {
    "dex_tests": [
      {
        "data": {
          "host": "https://dash.cloudflare.com",
          "kind": "http",
          "method": "GET"
        },
        "enabled": true,
        "interval": "30m",
        "name": "HTTP dash health check",
        "created": "2023-10-11T00:00:00Z",
        "description": "Checks the dash endpoint every 30 minutes",
        "target_policies": [
          {
            "id": "f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
            "default": true,
            "name": "name"
          }
        ],
        "targeted": true,
        "test_id": "372e67954025e0ba6aaa6d586b9e0b59",
        "updated": "2023-10-11T00:00:00Z"
      }
    ]
  }
}
```

##### Returns Examples

200 example

```
{
  "errors": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "messages": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "success": true,
  "result": {
    "dex_tests": [
      {
        "data": {
          "host": "https://dash.cloudflare.com",
          "kind": "http",
          "method": "GET"
        },
        "enabled": true,
        "interval": "30m",
        "name": "HTTP dash health check",
        "created": "2023-10-11T00:00:00Z",
        "description": "Checks the dash endpoint every 30 minutes",
        "target_policies": [
          {
            "id": "f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
            "default": true,
            "name": "name"
          }
        ],
        "targeted": true,
        "test_id": "372e67954025e0ba6aaa6d586b9e0b59",
        "updated": "2023-10-11T00:00:00Z"
      }
    ]
  }
}
```