Skip to content
Start here

Update application

PATCH/accounts/{account_id}/resource-library/applications/{id}

Replace the supplied network matchers for a custom application and create a new version. Omitted matcher lists remain unchanged; send an empty list to clear a matcher type.

Security
API Token

The preferred authorization scheme for interacting with the Cloudflare API. Create a 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
Path ParametersExpand Collapse
account_id: string
id: number

Numeric identifier for the application.

formatint64
maximum4294967295
minimum0
Body ParametersJSONExpand Collapse
hostnames: optional array of string

Hostnames matched by the application.

ip_subnets: optional array of string

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.

port_protocols: optional array of string

Ports matched by the application, in protocol/port or inclusive protocol/start-end format (for example, tcp/443 or udp/10000-20000). TCP and UDP ports must be between 0 and 65535.

support_domains: optional array of string

Support domains matched by the application.

ReturnsExpand Collapse
errors: array of object { code, message, documentation_url, source }
code: number
minimum1000
message: string
documentation_url: optional string
source: optional object { pointer }
pointer: optional string
messages: array of object { code, message, documentation_url, source }
code: number
minimum1000
message: string
documentation_url: optional string
source: optional object { pointer }
pointer: optional string
success: true

Indicates whether the API call was successful.

result: optional object { id, application_confidence_score, application_source, 15 more }
id: number

Numeric identifier for the application.

formatint64
maximum4294967295
minimum0
application_confidence_score: number

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

formatfloat
application_source: string

Returns the application source.

application_type: string

Returns the application type.

application_type_description: string

Returns the application type description.

category_id: number

Numeric identifier for an application category.

formatint64
maximum4294967295
minimum1
created_at: string

Returns the application creation time.

gen_ai_score: number

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

formatfloat
hostnames: array of string

Hostnames matched by the application.

human_id: string

Human-readable identifier for the application.

ip_subnets: array of string

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.

name: string

Application name.

port_protocols: array of string

Ports matched by the application, in protocol/port or inclusive protocol/start-end format (for example, tcp/443 or udp/10000-20000). TCP and UDP ports must be between 0 and 65535.

support_domains: array of string

Support domains matched by the application.

supported: array of "GATEWAY" or "ACCESS" or "CASB"

Cloudflare products that support this application.

One of the following:
"GATEWAY"
"ACCESS"
"CASB"
updated_at: string

Returns the application update time.

version: string

Returns the application version.

application_score_composition: optional unknown

Returns the score composition breakdown for the application.

Update application

curl https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/resource-library/applications/$ID \
    -X PATCH \
    -H 'Content-Type: application/json' \
    -H "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
    -d '{
          "hostnames": [
            "example.com",
            "foo.com"
          ],
          "ip_subnets": [
            "192.168.1.0/24",
            "2001:db8::/48"
          ],
          "port_protocols": [
            "tcp/443",
            "udp/10000-20000"
          ],
          "support_domains": [
            "example.com",
            "foo.com"
          ]
        }'
{
  "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/443",
      "udp/10000-20000"
    ],
    "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
{
  "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/443",
      "udp/10000-20000"
    ],
    "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"
    }
  }
}