---
title: Update application
---

[Skip to content](#_top)

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

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

[Resource Library](https://developers.cloudflare.com/api/python/resources/zero_trust/subresources/resource_library)

[Applications](https://developers.cloudflare.com/api/python/resources/zero_trust/subresources/resource_library/subresources/applications)

Copy Markdown

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

---

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

# Update application

zero\_trust.resource\_library.applications.update(intid, ApplicationUpdateParams\*\*kwargs) -> [ApplicationUpdateResponse](<https://developers.cloudflare.com/api/python/resources/zero_trust#(resource)%20zero_trust.resource_library.applications%20%3E%20(model)%20application_update_response%20%3E%20(schema)>)

PATCH/accounts/{account\_id}/resource-library/applications/{id}

Replace the network matchers for a custom application and create a new version.

##### 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>

##### ParametersExpand Collapse

account\_id: str

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

id: int

Returns the application ID.

formatint64

maximum4294967295

minimum0

[Link to this property](<#(resource)%20zero_trust.resource_library.applications%20%3E%20(method)%20update%20%3E%20(params)%20default%20%3E%20(param)%20id%20%3E%20(schema)>)

hostnames: Optional\[Sequence\[str]]

Hostnames matched by the application.

[Link to this property](<#(resource)%20zero_trust.resource_library.applications%20%3E%20(method)%20update%20%3E%20(params)%20default%20%3E%20(param)%20hostnames%20%3E%20(schema)>)

ip\_subnets: Optional\[Sequence\[str]]

IP subnets for this application. Custom application create and update requests accept IPv4 prefix lengths /8 through /32 and IPv6 prefix lengths /32 through /128.

[Link to this property](<#(resource)%20zero_trust.resource_library.applications%20%3E%20(method)%20update%20%3E%20(params)%20default%20%3E%20(param)%20ip_subnets%20%3E%20(schema)>)

port\_protocols: Optional\[Sequence\[str]]

Port and protocol pairs matched by the application.

[Link to this property](<#(resource)%20zero_trust.resource_library.applications%20%3E%20(method)%20update%20%3E%20(params)%20default%20%3E%20(param)%20port_protocols%20%3E%20(schema)>)

support\_domains: Optional\[Sequence\[str]]

Support domains matched by the application.

[Link to this property](<#(resource)%20zero_trust.resource_library.applications%20%3E%20(method)%20update%20%3E%20(params)%20default%20%3E%20(param)%20support_domains%20%3E%20(schema)>)

##### ReturnsExpand Collapse

<details>

<summary>

class ApplicationUpdateResponse: …

</summary>

id: int

Returns the application ID.

formatint64

maximum4294967295

minimum0

<a href="#(resource)%20zero_trust.resource_library.applications%20%3E%20(model)%20application_update_response%20%3E%20(schema)%20%3E%20(property)%20id">Link to this property</a>

application\_confidence\_score: float

Confidence score for the application. Returns -1 when no score is available.

formatfloat

<a href="#(resource)%20zero_trust.resource_library.applications%20%3E%20(model)%20application_update_response%20%3E%20(schema)%20%3E%20(property)%20application_confidence_score">Link to this property</a>

application\_source: str

Returns the application source.

<a href="#(resource)%20zero_trust.resource_library.applications%20%3E%20(model)%20application_update_response%20%3E%20(schema)%20%3E%20(property)%20application_source">Link to this property</a>

application\_type: str

Returns the application type.

<a href="#(resource)%20zero_trust.resource_library.applications%20%3E%20(model)%20application_update_response%20%3E%20(schema)%20%3E%20(property)%20application_type">Link to this property</a>

application\_type\_description: str

Returns the application type description.

<a href="#(resource)%20zero_trust.resource_library.applications%20%3E%20(model)%20application_update_response%20%3E%20(schema)%20%3E%20(property)%20application_type_description">Link to this property</a>

category\_id: int

Returns the category ID.

formatint64

maximum4294967295

minimum1

<a href="#(resource)%20zero_trust.resource_library.applications%20%3E%20(model)%20application_update_response%20%3E%20(schema)%20%3E%20(property)%20category_id">Link to this property</a>

created\_at: str

Returns the application creation time.

<a href="#(resource)%20zero_trust.resource_library.applications%20%3E%20(model)%20application_update_response%20%3E%20(schema)%20%3E%20(property)%20created_at">Link to this property</a>

gen\_ai\_score: float

GenAI score for the application. Returns -1 when no score is available.

formatfloat

<a href="#(resource)%20zero_trust.resource_library.applications%20%3E%20(model)%20application_update_response%20%3E%20(schema)%20%3E%20(property)%20gen_ai_score">Link to this property</a>

hostnames: List\[str]

Hostnames matched by the application.

<a href="#(resource)%20zero_trust.resource_library.applications%20%3E%20(model)%20application_update_response%20%3E%20(schema)%20%3E%20(property)%20hostnames">Link to this property</a>

human\_id: str

Returns the human readable ID.

<a href="#(resource)%20zero_trust.resource_library.applications%20%3E%20(model)%20application_update_response%20%3E%20(schema)%20%3E%20(property)%20human_id">Link to this property</a>

ip\_subnets: List\[str]

IP subnets for this application. Custom application create and update requests accept IPv4 prefix lengths /8 through /32 and IPv6 prefix lengths /32 through /128.

<a href="#(resource)%20zero_trust.resource_library.applications%20%3E%20(model)%20application_update_response%20%3E%20(schema)%20%3E%20(property)%20ip_subnets">Link to this property</a>

name: str

Returns the application name.

<a href="#(resource)%20zero_trust.resource_library.applications%20%3E%20(model)%20application_update_response%20%3E%20(schema)%20%3E%20(property)%20name">Link to this property</a>

port\_protocols: List\[str]

Port and protocol pairs matched by the application.

<a href="#(resource)%20zero_trust.resource_library.applications%20%3E%20(model)%20application_update_response%20%3E%20(schema)%20%3E%20(property)%20port_protocols">Link to this property</a>

support\_domains: List\[str]

Support domains matched by the application.

<a href="#(resource)%20zero_trust.resource_library.applications%20%3E%20(model)%20application_update_response%20%3E%20(schema)%20%3E%20(property)%20support_domains">Link to this property</a>

<details>

<summary>

supported: List\[Literal\["GATEWAY", "ACCESS", "CASB"]]

Cloudflare products that support this application.

</summary>

One of the following:

"GATEWAY"

<a href="#(resource)%20zero_trust.resource_library.applications%20%3E%20(model)%20application_update_response%20%3E%20(schema)%20%3E%20(property)%20supported%20%3E%20(items)%20%3E%20(member)%200">Link to this property</a>

"ACCESS"

<a href="#(resource)%20zero_trust.resource_library.applications%20%3E%20(model)%20application_update_response%20%3E%20(schema)%20%3E%20(property)%20supported%20%3E%20(items)%20%3E%20(member)%201">Link to this property</a>

"CASB"

<a href="#(resource)%20zero_trust.resource_library.applications%20%3E%20(model)%20application_update_response%20%3E%20(schema)%20%3E%20(property)%20supported%20%3E%20(items)%20%3E%20(member)%202">Link to this property</a>

</details>

<a href="#(resource)%20zero_trust.resource_library.applications%20%3E%20(model)%20application_update_response%20%3E%20(schema)%20%3E%20(property)%20supported">Link to this property</a>

updated\_at: str

Returns the application update time.

<a href="#(resource)%20zero_trust.resource_library.applications%20%3E%20(model)%20application_update_response%20%3E%20(schema)%20%3E%20(property)%20updated_at">Link to this property</a>

version: str

Returns the application version.

<a href="#(resource)%20zero_trust.resource_library.applications%20%3E%20(model)%20application_update_response%20%3E%20(schema)%20%3E%20(property)%20version">Link to this property</a>

application\_score\_composition: Optional\[object]

Returns the score composition breakdown for the application.

<a href="#(resource)%20zero_trust.resource_library.applications%20%3E%20(model)%20application_update_response%20%3E%20(schema)%20%3E%20(property)%20application_score_composition">Link to this property</a>

</details>

[Link to this property](<#(resource)%20zero_trust.resource_library.applications%20%3E%20(model)%20application_update_response%20%3E%20(schema)>)

### Update application

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
)
application = client.zero_trust.resource_library.applications.update(
    id=498,
    account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
print(application.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": 498,
    "application_confidence_score": 0.92,
    "application_source": "cloudflare",
    "application_type": "Human Resources",
    "application_type_description": "Applications used to manage employees and workforce tools.",
    "category_id": 12,
    "created_at": "2025-01-01T00:00:00Z",
    "gen_ai_score": 1.5,
    "hostnames": [
      "example.com",
      "foo.com"
    ],
    "human_id": "HR",
    "ip_subnets": [
      "192.168.1.0/24",
      "2001:db8::/48"
    ],
    "name": "HR",
    "port_protocols": [
      "tcp/80",
      "tcp/443"
    ],
    "support_domains": [
      "example.com",
      "foo.com"
    ],
    "supported": [
      "GATEWAY",
      "ACCESS"
    ],
    "updated_at": "2025-01-01T00:00:00Z",
    "version": "2025-01-01T00:00:00Z",
    "application_score_composition": {
      "categories": [
        {
          "confidence": 0.95,
          "name": "Security"
        }
      ],
      "plan": "free"
    }
  }
}
```

##### 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": 498,
    "application_confidence_score": 0.92,
    "application_source": "cloudflare",
    "application_type": "Human Resources",
    "application_type_description": "Applications used to manage employees and workforce tools.",
    "category_id": 12,
    "created_at": "2025-01-01T00:00:00Z",
    "gen_ai_score": 1.5,
    "hostnames": [
      "example.com",
      "foo.com"
    ],
    "human_id": "HR",
    "ip_subnets": [
      "192.168.1.0/24",
      "2001:db8::/48"
    ],
    "name": "HR",
    "port_protocols": [
      "tcp/80",
      "tcp/443"
    ],
    "support_domains": [
      "example.com",
      "foo.com"
    ],
    "supported": [
      "GATEWAY",
      "ACCESS"
    ],
    "updated_at": "2025-01-01T00:00:00Z",
    "version": "2025-01-01T00:00:00Z",
    "application_score_composition": {
      "categories": [
        {
          "confidence": 0.95,
          "name": "Security"
        }
      ],
      "plan": "free"
    }
  }
}
```