---
title: Update application
---

[Skip to content](#%5Ftop) 

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

[Zero Trust](https://developers.cloudflare.com/api/python/resources/zero%5Ftrust)

[Resource Library](https://developers.cloudflare.com/api/python/resources/zero%5Ftrust/subresources/resource%5Flibrary)

[Applications](https://developers.cloudflare.com/api/python/resources/zero%5Ftrust/subresources/resource%5Flibrary/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%5Ftrust#%28resource%29%20zero%5Ftrust.resource%5Flibrary.applications%20%3E%20%28model%29%20application%5Fupdate%5Fresponse%20%3E%20%28schema%29)

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

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

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

API Email + API Key

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

**Example:**`X-Auth-Email: user@example.com`

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

**Example:**`X-Auth-Key: 144c9defac04969c7bfad8efaa8ea194`

##### ParametersExpand Collapse 

account\_id: str

id: int

Returns the application ID.

formatint64

maximum4294967295

minimum0

hostnames: Optional\[Sequence\[str\]\]

Hostnames matched by the application.

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

IP subnets matched by the application.

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

Port and protocol pairs matched by the application.

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

Support domains matched by the application.

##### ReturnsExpand Collapse 

class ApplicationUpdateResponse: …

id: int

Returns the application ID.

formatint64

maximum4294967295

minimum0

application\_confidence\_score: float

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

formatfloat

application\_source: str

Returns the application source.

application\_type: str

Returns the application type.

application\_type\_description: str

Returns the application type description.

category\_id: int

Returns the category ID.

formatint64

maximum4294967295

minimum1

created\_at: str

Returns the application creation time.

gen\_ai\_score: float

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

formatfloat

hostnames: List\[str\]

Hostnames matched by the application.

human\_id: str

Returns the human readable ID.

ip\_subnets: List\[str\]

IP subnets matched by the application.

name: str

Returns the application name.

port\_protocols: List\[str\]

Port and protocol pairs matched by the application.

support\_domains: List\[str\]

Support domains matched by the application.

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

Cloudflare products that support this application.

One of the following:

"GATEWAY"

"ACCESS"

"CASB"

updated\_at: str

Returns the application update time.

version: str

Returns the application version.

application\_score\_composition: Optional\[object\]

Returns the score composition breakdown for the application.

### Update application

Python

HTTPHTTP

TypeScriptTypeScript

PythonPython

GoGo

TerraformTerraform

```
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",
      "10.0.0.0/8"
    ],
    "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",
      "10.0.0.0/8"
    ],
    "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"
    }
  }
}
```