{"openapi":"3.1.0","info":{"title":"Cloudflare Page Shield (BYOK) API","version":"0.1.0","description":"Cloudflare Page Shield (BYOK) lets an AI assistant read your own Cloudflare Page Shield data through the Cloudflare Page Shield API with a key you supply (Cloudflare API token with Page Shield read permission). Read-only: 8 tools (get_page_shield_settings, list_detected_scripts, get_detected_script, list_detected_connections, get_detected_connection, list_detected_cookies, get_detected_cookie,...\n\nEvery operation is read-only or compute-only. The same tools are available over MCP (streamable HTTP) at https://byok-cloudflare-page-shield.connectorbay.com/mcp.","contact":{"name":"Unify Dynamics LLC","email":"agent@connectorbay.com","url":"https://connectorbay.com/byok-cloudflare-page-shield/docs"},"termsOfService":"https://connectorbay.com/byok-cloudflare-page-shield/terms"},"servers":[{"url":"https://byok-cloudflare-page-shield.connectorbay.com"}],"externalDocs":{"url":"https://connectorbay.com/byok-cloudflare-page-shield/docs"},"security":[{"upstreamKey":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","description":"Optional. A Pro API key raises rate limits; no credentials are required."},"upstreamKey":{"type":"apiKey","in":"header","name":"X-Upstream-Key","description":"Your own key for the service this connector wraps (bring your own key). Used for that one call only; never stored, logged or cached."}},"schemas":{"Error":{"type":"object","properties":{"ok":{"const":false},"error":{"type":"object"}}}}},"paths":{"/v1/tools/get_page_shield_settings":{"post":{"operationId":"get_page_shield_settings","summary":"Show whether Page Shield is enabled for a zone and whether it uses Cloudflare's reporting endpoint and URL paths. Use fo","description":"Show whether Page Shield is enabled for a zone and whether it uses Cloudflare's reporting endpoint and URL paths. Use for \"Is Page Shield turned on for my zone\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"zone_id":{"description":"Cloudflare zone id (32-character hex string, from the Cloudflare connector's list_zones).","maxLength":40,"title":"Zone Id","type":"string"}},"required":["zone_id"],"title":"get_page_shield_settingsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_detected_scripts":{"post":{"operationId":"list_detected_scripts","summary":"List JavaScript files Page Shield saw loading on the zone's pages, with host, first and last seen, risk scores (malware,","description":"List JavaScript files Page Shield saw loading on the zone's pages, with host, first and last seen, risk scores (malware, magecart, cryptomining, integrity) and malicious flags. Use for \"Which third-party scripts load on my site and are any flagged as malicious\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"zone_id":{"description":"Cloudflare zone id (32-character hex string, from the Cloudflare connector's list_zones).","maxLength":40,"title":"Zone Id","type":"string"},"hosts":{"anyOf":[{"maxLength":500,"type":"string"},{"type":"null"}],"default":null,"description":"Only items from these hosts, comma-separated, for example 'cdn.example.com,js.example.net'.","title":"Hosts"},"urls":{"anyOf":[{"maxLength":500,"type":"string"},{"type":"null"}],"default":null,"description":"Only items whose URL contains one of these comma-separated values.","title":"Urls"},"page_url":{"anyOf":[{"maxLength":500,"type":"string"},{"type":"null"}],"default":null,"description":"Only items seen on pages matching this URL (wildcards allowed).","title":"Page Url"},"order_by":{"anyOf":[{"enum":["first_seen_at","last_seen_at"],"type":"string"},{"type":"null"}],"default":null,"description":"Sort field.","title":"Order By"},"direction":{"anyOf":[{"enum":["asc","desc"],"type":"string"},{"type":"null"}],"default":null,"description":"Sort direction.","title":"Direction"},"prioritize_malicious":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":null,"description":"True to list items reported as malicious first.","title":"Prioritize Malicious"},"exclude_cdn_cgi":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":null,"description":"True to leave out Cloudflare /cdn-cgi/ URLs.","title":"Exclude Cdn Cgi"},"exclude_duplicates":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":true,"description":"True (default) to collapse identical scripts into one entry.","title":"Exclude Duplicates"},"status":{"anyOf":[{"maxLength":100,"type":"string"},{"type":"null"}],"default":null,"description":"Only scripts with this status value (comma-separated list).","title":"Status"},"per_page":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":25,"description":"How many results per page (1 to 100).","title":"Per Page"},"page":{"anyOf":[{"maximum":10000,"minimum":1,"type":"integer"},{"type":"null"}],"default":1,"description":"Page number, starting at 1; result_info.total_count says how many exist.","title":"Page"}},"required":["zone_id"],"title":"list_detected_scriptsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/get_detected_script":{"post":{"operationId":"get_detected_script","summary":"Get one detected script: URL, host, hash, risk scores, malicious flags, seen dates and the pages it appears on. Use for ","description":"Get one detected script: URL, host, hash, risk scores, malicious flags, seen dates and the pages it appears on. Use for \"Show details for detected script c9ef84a6bf5e47138c75d95e2f933e12\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"zone_id":{"description":"Cloudflare zone id (32-character hex string, from the Cloudflare connector's list_zones).","maxLength":40,"title":"Zone Id","type":"string"},"script_id":{"description":"Detected script id, as returned by list_detected_scripts.","maxLength":64,"title":"Script Id","type":"string"}},"required":["zone_id","script_id"],"title":"get_detected_scriptArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_detected_connections":{"post":{"operationId":"list_detected_connections","summary":"List outbound connections (fetch, XHR, WebSocket targets) Page Shield observed from the zone's pages, with host, seen da","description":"List outbound connections (fetch, XHR, WebSocket targets) Page Shield observed from the zone's pages, with host, seen dates and malicious flags. Use for \"Which external hosts do my pages connect to\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"zone_id":{"description":"Cloudflare zone id (32-character hex string, from the Cloudflare connector's list_zones).","maxLength":40,"title":"Zone Id","type":"string"},"hosts":{"anyOf":[{"maxLength":500,"type":"string"},{"type":"null"}],"default":null,"description":"Only items from these hosts, comma-separated, for example 'cdn.example.com,js.example.net'.","title":"Hosts"},"urls":{"anyOf":[{"maxLength":500,"type":"string"},{"type":"null"}],"default":null,"description":"Only items whose URL contains one of these comma-separated values.","title":"Urls"},"page_url":{"anyOf":[{"maxLength":500,"type":"string"},{"type":"null"}],"default":null,"description":"Only items seen on pages matching this URL (wildcards allowed).","title":"Page Url"},"order_by":{"anyOf":[{"enum":["first_seen_at","last_seen_at"],"type":"string"},{"type":"null"}],"default":null,"description":"Sort field.","title":"Order By"},"direction":{"anyOf":[{"enum":["asc","desc"],"type":"string"},{"type":"null"}],"default":null,"description":"Sort direction.","title":"Direction"},"prioritize_malicious":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":null,"description":"True to list items reported as malicious first.","title":"Prioritize Malicious"},"exclude_cdn_cgi":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":null,"description":"True to leave out Cloudflare /cdn-cgi/ URLs.","title":"Exclude Cdn Cgi"},"status":{"anyOf":[{"maxLength":100,"type":"string"},{"type":"null"}],"default":null,"description":"Only connections with this status value (comma-separated list).","title":"Status"},"per_page":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":25,"description":"How many results per page (1 to 100).","title":"Per Page"},"page":{"anyOf":[{"maximum":10000,"minimum":1,"type":"integer"},{"type":"null"}],"default":1,"description":"Page number, starting at 1; result_info.total_count says how many exist.","title":"Page"}},"required":["zone_id"],"title":"list_detected_connectionsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/get_detected_connection":{"post":{"operationId":"get_detected_connection","summary":"Get one detected connection: URL, host, seen dates, pages it was seen on and malicious flags. Use for \"Show details for ","description":"Get one detected connection: URL, host, seen dates, pages it was seen on and malicious flags. Use for \"Show details for detected connection c9ef84a6bf5e47138c75d95e2f933e12\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"zone_id":{"description":"Cloudflare zone id (32-character hex string, from the Cloudflare connector's list_zones).","maxLength":40,"title":"Zone Id","type":"string"},"connection_id":{"description":"Detected connection id, as returned by list_detected_connections.","maxLength":64,"title":"Connection Id","type":"string"}},"required":["zone_id","connection_id"],"title":"get_detected_connectionArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_detected_cookies":{"post":{"operationId":"list_detected_cookies","summary":"List cookies Page Shield detected on the zone's pages with name, host, type and the Secure, HttpOnly and SameSite attrib","description":"List cookies Page Shield detected on the zone's pages with name, host, type and the Secure, HttpOnly and SameSite attributes. Cookie values are not part of the answer. Use for \"Which cookies are set on my site and which lack the Secure flag\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"zone_id":{"description":"Cloudflare zone id (32-character hex string, from the Cloudflare connector's list_zones).","maxLength":40,"title":"Zone Id","type":"string"},"hosts":{"anyOf":[{"maxLength":500,"type":"string"},{"type":"null"}],"default":null,"description":"Only items from these hosts, comma-separated, for example 'cdn.example.com,js.example.net'.","title":"Hosts"},"page_url":{"anyOf":[{"maxLength":500,"type":"string"},{"type":"null"}],"default":null,"description":"Only items seen on pages matching this URL (wildcards allowed).","title":"Page Url"},"order_by":{"anyOf":[{"enum":["first_seen_at","last_seen_at"],"type":"string"},{"type":"null"}],"default":null,"description":"Sort field.","title":"Order By"},"direction":{"anyOf":[{"enum":["asc","desc"],"type":"string"},{"type":"null"}],"default":null,"description":"Sort direction.","title":"Direction"},"name":{"anyOf":[{"maxLength":100,"type":"string"},{"type":"null"}],"default":null,"description":"Only cookies with this exact name.","title":"Name"},"secure":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":null,"description":"True or false: only cookies with the Secure attribute set or unset.","title":"Secure"},"http_only":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":null,"description":"True or false: only cookies with the HttpOnly attribute set or unset.","title":"Http Only"},"same_site":{"anyOf":[{"enum":["lax","strict","none"],"type":"string"},{"type":"null"}],"default":null,"description":"Only cookies with this SameSite value.","title":"Same Site"},"type":{"anyOf":[{"enum":["first_party","unknown"],"type":"string"},{"type":"null"}],"default":null,"description":"Only cookies of this type.","title":"Type"},"per_page":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":25,"description":"How many results per page (1 to 100).","title":"Per Page"},"page":{"anyOf":[{"maximum":10000,"minimum":1,"type":"integer"},{"type":"null"}],"default":1,"description":"Page number, starting at 1; result_info.total_count says how many exist.","title":"Page"}},"required":["zone_id"],"title":"list_detected_cookiesArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/get_detected_cookie":{"post":{"operationId":"get_detected_cookie","summary":"Get one detected cookie: name, host, type, attributes, seen dates and the pages it appeared on. Cookie values are not pa","description":"Get one detected cookie: name, host, type, attributes, seen dates and the pages it appeared on. Cookie values are not part of the answer. Use for \"Show details for detected cookie c9ef84a6bf5e47138c75d95e2f933e12\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"zone_id":{"description":"Cloudflare zone id (32-character hex string, from the Cloudflare connector's list_zones).","maxLength":40,"title":"Zone Id","type":"string"},"cookie_id":{"description":"Detected cookie id, as returned by list_detected_cookies.","maxLength":64,"title":"Cookie Id","type":"string"}},"required":["zone_id","cookie_id"],"title":"get_detected_cookieArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_content_security_rules":{"post":{"operationId":"list_content_security_rules","summary":"List the Page Shield content security (CSP) rules of a zone with action, expression, description and enabled flag. Use f","description":"List the Page Shield content security (CSP) rules of a zone with action, expression, description and enabled flag. Use for \"Which content security rules does Page Shield apply to my zone\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"zone_id":{"description":"Cloudflare zone id (32-character hex string, from the Cloudflare connector's list_zones).","maxLength":40,"title":"Zone Id","type":"string"}},"required":["zone_id"],"title":"list_content_security_rulesArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}}}}