---
title: Delete Token
---

[Skip to content](#_top)

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

[Accounts](https://developers.cloudflare.com/api/python/resources/accounts)

[Tokens](https://developers.cloudflare.com/api/python/resources/accounts/subresources/tokens)

Copy Markdown

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

---

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

# Delete Token

accounts.tokens.delete(strtoken\_id, TokenDeleteParams\*\*kwargs) -> [TokenDeleteResponse](<https://developers.cloudflare.com/api/python/resources/accounts#(resource)%20accounts.tokens%20%3E%20(model)%20token_delete_response%20%3E%20(schema)>)

DELETE/accounts/{account\_id}/tokens/{token\_id}

Destroy an Account Owned API token.

##### Security

API Token

The preferred authorization scheme for interacting with the Cloudflare API. [Create a token](https://developers.cloudflare.com/fundamentals/api/get-started/create-token/).

**Example:**`Authorization: Bearer Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY`

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

`Account API Tokens Write`

##### ParametersExpand Collapse

account\_id: str

Account identifier tag.

maxLength32

minLength32

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

token\_id: str

Token identifier tag.

maxLength32

[Link to this property](<#(resource)%20accounts.tokens%20%3E%20(method)%20delete%20%3E%20(params)%20default%20%3E%20(param)%20token_id%20%3E%20(schema)>)

##### ReturnsExpand Collapse

<details>

<summary>

class TokenDeleteResponse: …

</summary>

id: str

Identifier

maxLength32

minLength32

<a href="#(resource)%20accounts.tokens%20%3E%20(model)%20token_delete_response%20%3E%20(schema)%20%3E%20(property)%20id">Link to this property</a>

</details>

[Link to this property](<#(resource)%20accounts.tokens%20%3E%20(model)%20token_delete_response%20%3E%20(schema)>)

### Delete Token

Python

HTTPTypeScriptPythonGoTerraform

```
import os
from cloudflare import Cloudflare

client = Cloudflare(
    api_token=os.environ.get("CLOUDFLARE_API_TOKEN"),  # This is the default and can be omitted
)
token = client.accounts.tokens.delete(
    token_id="ed17574386854bf78a67040be0a770b0",
    account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
print(token.id)
```

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": {
    "id": "023e105f4ecef8ad9ca31a8372d0c353"
  }
}
```

##### 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": {
    "id": "023e105f4ecef8ad9ca31a8372d0c353"
  }
}
```