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:
API Email + API Key
The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key.
Example:
The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys.
Example:
Path Parameters
Body ParametersJSON
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.
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"
}
}
}