pypi / cloudflare
cloudflare
What changed in cloudflare 4 to 5, from its official release notes, upgrade guides and advisories. Sources checked 2026-12-05.
158 breaking1 security1 deprecations182 new APIs and options4 behavior and defaults1 tooling9 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli initcloudflare 5319 changes
Breaking changes 141
Removes the pay_bad_debt sub-resource.
Now returns BulkCreateResponse instead of Optional[BulkCreateResponse].
Renames the instance path identifier from name to namespace; callers passing name= must switch to namespace=.
Removes the browser connect method.
Removes the browser launch method and page sub-resource.
Now returns SyncSinglePage[EndpointHealthcheckListResponse] instead of Optional[EndpointHealthcheckListResponse].
Removes the resource and all its sub-resources and exported types.
Removes the registrar domains sub-resource.
Is no longer paginated and now returns RulesetListResponse directly.
Now returns VersionListResponse instead of SyncSinglePage[VersionListResponse].
Removes the tenant custom nameservers resource and its create, delete, and get methods.
Now returns SyncV4PagePaginationArray[AccountListResponse] instead of SyncSinglePage[TenantAccount].
Removes the tenants get method and the account_types, entitlements, and memberships sub-resources.
Now returns SyncSinglePage[TenantListResponse] instead of SyncSinglePage[Organization].
Now uses GET and returns SyncSinglePage[IndexGetByIDsResponse] instead of issuing POST and returning object.
Now returns TagDeleteResponse instead of object.
Now returns Optional[LastSeenIdentityGetResponse]; the Identity type was removed.
Now returns SyncCursorPaginationAfter instead of SyncSinglePage.
The address-map zone delete method has been removed.
The address-map zone update method has been removed.
The method now returns SyncV4PagePaginationArray instead of SyncSinglePage; code reading page-level fields may need updating.
The ZoneDeleteResponse type has been removed.
The ZoneUpdateResponse type has been removed.
Now takes member_account_id as the positional identifier and address_map_id as a keyword argument.
Resource Library application creation parameters are now a union requiring either hostnames or ip_subnets.
Unused body parameters were removed from the listed token, Address Maps, Cache Reserve, DNS, Email Routing, Access bookmarks, and Gateway certificate operations.
The cache.State type was removed.
Replaces the R2 jurisdiction request keyword and also accepts fedramp-high.
Now uses DELETE and returns Optional[Settings] instead of a page of DNS records.
Now returns an optional List[DNSRecord] rather than an envelope union.
Adds Resource Library application creation parameters requiring either hostnames or ip_subnets.
Bulk edit and update now require an id instead of a body collection.
The R2 request keyword was renamed to cf_r2_jurisdiction across the listed operations.
The legacy Override export was removed.
Device override-code listing now returns Optional[OverrideCodeListResponse].
The rules field is now required.
Rule methods now return typed paginator responses instead of object.
Per-response schema field exports were replaced by shared field types, including SourceField.
The stream.Clip, stream.Playback, and stream.Watermark types were removed.
WAF package retrieval now returns a raw string/object union.
Waiting-room, event, page-preview, status, details, and settings operations now return Optional values, so callers must handle None.
The deprecated method was removed from the issues resource.
The method now returns
Optional[PageShieldGetResponse].The method was removed from the livestreams resource.
The return type changed from
SchemaDeleteResponsetoobject.The type was replaced by
ConnectionGetResponseandConnectionListResponse.The type was removed from
cloudflare.types.magic_transit.The type was removed from
cloudflare.types.magic_transit.This type is no longer available.
This type is no longer available.
The type was replaced by per-method response types.
The type was removed from
cloudflare.types.schema_validation.The type was replaced by
ScriptListResponse.The type was removed from
cloudflare.types.page_shield.Load balancer endpoints now use the polymorphic account-or-zone path pattern.
Removed the CertificateAuthority type.
Removed create() from client.accounts.subscriptions.
Removed get() from client.accounts.subscriptions.
Removed the indicator_types sub-resource; it moved to indicators.types.
The indicator_types sub-resource moved to indicators.types.
Removed the ssl Host type.
Removed the HostnameAssociation type.
Pagination changed to SyncV4PagePaginationArray.
Removed rotate() from relays.tokens; token CRUD methods replace it.
Replaced MTLSCertificate with per-method response types.
The hosts parameter type changed to str.
Removed the custom_certificates Status type.
Removed the ssl Status type.
Removed the ssl ValidationMethod type.
Removed setup_flows from CASB applications.
The get() endpoint changed.
The enum value ssh_piv_key changed to piv_key.
The list method was removed; create, update, delete, and get remain.
The recommendations sub-resource and its get method are no longer available.
Pagination now uses SyncV4PagePaginationArray instead of SyncSinglePage; code relying on single-page iteration semantics may need adjustment.
Search responses now require query_kind with Literal values text, image, or multimodal.
The type was renamed from MfaSSHPivKeyRequirements.
The field was renamed from mfa_ssh_piv_key_requirements.
The feed-rss enum value was removed; only sitemap and crawl remain.
This response type is no longer available.
This parameter type is no longer available.
The store_options field was removed from instance create/update params and responses.
This type was removed; geo information is now inlined as UserIdentityGeo in UserPolicyCheckListResponse.
Moves the type's import path from cloudflare.types.iam.oauth_scopes to cloudflare.types.iam.
Removed along with OperationEditResponse; use bulk_edit instead.
Endpoints moved to /zones/{zone_id}/origin/cloud_regions, methods and return types changed, and several response types were removed.
Renamed to bulk_update.
Removed; use update for the single-item PUT operation.
Removed; use update instead.
The create endpoint path parameter changed from report_type to report_param; update code that relies on the endpoint path.
The create() method was removed and replaced by update() and edit(), which use the same endpoint and similar parameters.
The Certificate type was removed.
The optional parameter now uses the Omit type, and its default sentinel changed from NOT_GIVEN to omit.
The CertificateCreateResponse type was removed.
The CertificateDeleteResponse type was removed.
The CertificateGetResponse type was removed.
The CertificateListResponse type was removed.
Use data() on indicator_feeds to get feed data instead of the downloads sub-resource.
get() now calls GET /zones/{zone_id}/logpush/edge/jobs instead of GET /zones/{zone_id}/logpush/edge.
The create() method was removed from the hostnames resource.
The delete() method was removed from the hostnames resource.
get() now uses GET /zones/{zone_id}/origin_tls_client_auth/hostnames/{hostname} instead of the certificates/{certificate_id} endpoint.
The list() method was removed from the hostnames resource.
get() now fetches a specific consumer by required consumer_id instead of listing all consumers; use list() to retrieve the queue's consumers.
A new list() method retrieves all consumers for a queue, replacing the former list-returning get() behavior.
timeseries() now calls GET /radar/bgp/rpki/aspa/timeseries instead of GET /radar/bgp/ips/timeseries.
update() now calls PUT /accounts/{account_id}/dlp/entries/integration/{entry_id} instead of PUT /accounts/{account_id}/dlp/entries/{entry_id}.
D1 response types are imported from individual modules, such as cloudflare.types.d1.database_import_response, rather than cloudflare.types.d1.
The CloudflareSourceUpdateResponse type was removed; update code accordingly.
The ConfigurationUpdateResponse type was removed.
The threat events crons sub-resource was removed; scheduling should be handled outside the threat events API.
The D1 Database resource was reimplemented; all prior methods were replaced, and path parameter structure changed, so existing calls are not drop-in replacements.
Methods operating on a specific D1 database now require database_id as the first parameter after self.
The return type is now generic object instead of a specific response type.
The intel.indicator_feeds.downloads sub-resource and its get() method were removed; use indicator_feeds.data() instead.
Adds a phishguard reports endpoint and removes deprecated type definitions.
The EntryCreateResponse type was removed.
The EntryGetResponse type was removed.
The EntryListResponse type was removed.
The EntryUpdateResponse type was removed.
export() now requires output_format="polling" and supports current_bookmark and dump_options for polling and configuring exports.
import_() now uses overloaded signatures for init, ingest, and poll stages; callers provide an MD5 etag and use current_bookmark to track progress.
The threat events insights sub-resource and its methods and response types were removed; insight functionality is consolidated into the main threat events resource.
The IPTimeseriesResponse type was removed.
list() now returns paginated results and accepts name, page, and per_page parameters, so callers must handle pagination.
Timeout parameters use the lowercase not_given sentinel instead of NOT_GIVEN; explicit timeout values or omitting the parameter remain available.
Removes the duplicate notification_url field from webhook response types.
Optional parameters now use the omit sentinel instead of NOT_GIVEN; update explicit sentinel values and type hints to Omit. Omitting optional parameters remains supported.
The params() method was removed; pass parameters inline to query() or raw() instead.
Python 3.8 is no longer supported; the minimum required version is Python 3.9.
raw() supports single and batch queries and returns rows as arrays instead of objects, reducing memory overhead and serialization time for large result sets.
The RewriteURIPart type was removed.
The SchemaCreateResponse type was removed.
The SchemaEditResponse type was removed.
The SchemaGetResponse type was removed.
The SchemaListResponse type was removed.
The Snippet type was removed.
The response type was replaced by TotalTLSUpdateResponse or TotalTLSEditResponse to match the new method names.
The minimum required version increased from >=4.10 to >=4.14.
update() now performs full read_replication updates, requires database_id first, and requires read_replication; use edit() for other partial database updates.
The update() method was removed from the zerotrust.networks resource; update code accordingly.
Security 1
Adds a top-level service for fraud detection and prevention.
Deprecations 1
The get method is deprecated; use the dataset-specific events endpoint through the datasets sub-resource instead.
New APIs and options 169
Adds the move method for AI Search namespace instances.
Adds the edit method for API Gateway discovery operations.
Adds spend policy CRUD and listing APIs, including activity and audit listings.
Adds a database undelete method.
Adds nameserver set create, list, delete, and get methods.
Adds K2 streams and stream subscriptions APIs.
Adds zone-level monetization rules APIs.
Adds R2 bucket job create, list, and get methods.
Adds a profile method for Workers beta versions.
Adds validation for Zero Trust access custom pages.
Adds the JIT requests resource.
Adds the MFA authenticator catalog resource.
Adds user population CRUD and a users sub-resource with full CRUD.
Adds a delete sub-resource for user MFA authenticators.
Adds a delete sub-resource for user passkeys.
Adds the CASB posture asset schemas resource.
Adds create, update, delete, and validate methods to finding types.
Adds Zero Trust CWS APIs for credentials, deployments, domain ACLs, policies, Rego, tenant structures, and workloads.
Adds DLP validators and their proximity words sub-resource.
Adds the DNS destination IPs resource.
Adds delete and get methods to SCIM groups.
Adds delete and get methods to SCIM users.
Adds R2 Data Catalog APIs for catalogs, credentials, namespaces, tables, and maintenance configs.
Adds a cache invalidation method.
Adds an environment cache invalidation method.
Adds threat signal APIs for articles, categories, feeds, indicators, search, and skills.
Adds top-level Containers APIs for applications, instances, rollouts, versions, images, and registries.
Adds a registrar transfer-check method.
Adds OCR, custom metadata, hostname filtering, and updated hybrid-search options.
Adds AI training, AI user, AI search, migration opt-out, and JavaScript detection policy fields.
Adds submitted-report listing and retrieval, including submitted email listing.
Adds APIs for entitlements, payment methods, invoice and bad-debt payments, receipts, invoices, and client secrets.
Adds billing APIs for address validation, credits, history, bad debt, unpaid invoices, rate plans, expanded profiles, and profile payment methods.
Adds top-level Field Extractors update, delete, and get methods.
Adds a restart method for Hyperdrive configs.
Adds repository, scan, and report APIs for Managed Defense vulnerability discovery.
Adds transfer-in creation and transfer status retrieval APIs.
Adds cancel-downgrade, identifier lookup, cancel reasons, actions, and bulk operations.
Gateway locations, proxy endpoints, and rules add search, filter, ordering, and direction controls; list items and PAC files add pagination controls.
Adds Access destination path overrides, infrastructure and device tags, identity-provider login options, and organization service-token inactivity settings.
Workers deployment listing adds pagination and date filters.
Adds a force option to beta worker deletion.
Adds a reusable Host alias.
Adds the Idempotency-Key account creation option.
Adds a profile_type filter for custom policy listing on devices.
Adds the standalone option to account creation.
Adds a reusable Status alias.
Adds a reusable ValidationMethod alias.
Adds K2 bindings, observability issues, asset base paths, preview configuration, and version author fields.
Now returns SyncV4PagePagination and adds page and date filters.
Added a delete method to the BGP prefixes resource.
Added a live view resource with a create method.
Added an update method to the payloads resource.
Added a batch method to the allow policies resource.
Added a content policies resource with create, list, delete, batch, edit, and get methods.
Added create, update, and batch methods to the domains resource.
Added an
edit()method to the subdomains resource.Added a suppressions resource with create, list, delete, edit, get, and import methods.
Added a transformers resource with create, update, list, delete, get, and preview methods, plus content and versions sub-resources.
Added a top-level resource for precursor configuration management with update and get methods.
Added a delete method to the R2 data catalog resource.
Added a
replace_preset_by_id()method to the presets resource.Added a protocols resource with a list method.
Added a recommendations resource with a get method.
Added an edit method to the credentials resource.
Added a reports resource with a get method.
Added create, update, and delete methods to the applications resource.
Added a NEL resource with edit and get methods.
Added a robots resource to ai_audit.
Added a new resource with summary, timeseries, top_n, and data_security sub-resources.
Added the aggregate sub-resource to threat_events.
Added the categories sub-resource to threat_events.
Added the datasets sub-resource to threat_events.
Added the graph sub-resource to threat_events.
Added the graphql sub-resource to threat_events.
Added the indicators sub-resource to threat_events.
Added the queries sub-resource to threat_events.
Added the relationships sub-resource to threat_events.
Added the tags sub-resource to threat_events.
Added the target_industries sub-resource to threat_events.
Added a connector interrupts resource.
Added create() as a token CRUD method on relays.tokens.
Added delete() as a token CRUD method on relays.tokens.
Added list() as a token CRUD method on relays.tokens.
Added a resource with registrations, registration_status, and update_status.
Added comprehensive posture management.
Added CASB auth_methods.
Adds Worker destination types and the eager_redirect_cookie_setting field to self-hosted applications.
Adds multimodal support with image_url content parts and the @cf/qwen/qwen3-vl-embedding-2b embedding model.
The list method now accepts optional params.
Adds email authentication resources for DMARC report management and SPF inspection.
Adds bulk message movement and quarantine release operations, with bulk job cancellation and message listing.
Adds the expected_disposition parameter.
Adds SQL-based log querying and dataset management, including available datasets.
Adds MoQ relay management, including relay create, update, list, delete, get, and token rotation.
Connector create/edit params now include primary and site_id fields.
Adds the GlobalAcceleration type to default and custom device policy settings.
Adds max_ttl_secs for DNS TTL cap control.
Adds the MaxTTL type to gateway Location for DNS TTL cap control.
Adds a category field for account and user tokens.
Adds Vary cache settings and their associated types.
The Settings response type now includes support_subaddress.
Adds create, list, delete, and get endpoints for AI Gateway custom providers.
Accepts an optional fields parameter to select which fields to include in the response.
Adds a Flagship resource with apps, flags, changelog, and evaluate endpoints.
Adds CF1 site endpoints and nested ramps endpoints.
Adds a method to set an IPsec tunnel pre-shared key.
Adds a resource with update, delete, edit, and get endpoints for origin TLS compliance modes.
Adds edit and get endpoints for Auto Origin TLS Kex.
Adds a top-level tenants resource with tenant, account type, account, entitlement, and membership endpoints.
Adds an endpoint to list the user's tenants.
Adds DLP data class create, update, list, delete, and get endpoints.
Adds DLP data tag category endpoints, including nested data tag operations.
Adds DLP sensitivity group endpoints, including levels and level ordering.
Adds update and get endpoints for WARP connector tunnel configurations.
Adds CT alerting subscription edit and get endpoints.
Adds billing APIs for credit balance, invoice history and preview, usage history, topups, and spending limits.
The list method now accepts optional params.
Adds a top-level service for managing zone-level AI security settings and custom topics.
Adds the purge_environment method.
Adds the create method for smart tiered cache.
Adds a top-level service for managing Advanced TCP Protection configurations, including allowlists, prefixes, SYN and TCP flow protection, and protection status.
Adds a monitor group references sub-resource.
Adds list, delete, get, and upload operations for objects in R2 buckets; listing is cursor-paginated and get returns BinaryAPIResponse.
Adds BGP IPs top ASes and RPKI ROAs timeseries APIs.
The delete method now accepts optional params.
Adds a bulk_update method for Workers for Platforms secrets.
Adds a bulk_update method for Workers secrets.
Adds list, get, get_pem, and rotate operations for Access SAML certificates.
Adds a create operation for an identity provider SAML certificate.
Adds applications and categories APIs for browsing resource library entries.
The async client supports an optional aiohttp HTTP backend for improved concurrency; install the extra and pass DefaultAioHttpClient() as http_client.
Adds a top-level service for AI-powered search capabilities.
Adds labels endpoints.
Adds a billable usage PayGo endpoint.
Adds v2 endpoints.
Adds devtools methods.
Adds an origin cloud regions resource.
The indicator feeds resource gained a permissions sub-resource for permissions operations.
Adds a top-level service for connectivity testing and diagnostics.
The list method supports cursor-based pagination for better performance and deep pagination beyond the 100,000-record offset-based limit.
Enables custom origin trust store support.
Adds dns_records and usage endpoints.
A new method performs partial updates using HTTP PATCH; database_id is required first, and read_replication is supported.
Adds a top-level service with email send and send_raw endpoints.
The list method accepts format="stix2" for STIX2-formatted output.
Adds a top-level service for Google Tag Gateway management.
Adds user_groups and user_group_members resources.
bulk_create accepts include_created_events to track which events were created and their locations.
The create method accepts an indicators array to support multiple indicators per event.
The create method accepts an insight parameter to attach insights directly to events.
The D1 database create method accepts an optional jurisdiction to restrict where the database runs and stores data; supported values are eu and fedramp.
Adds the polymorphic_serialization parameter to model_dump overrides.
Adds a top-level service for organization audit logs and management.
The D1 database create method accepts an optional primary_location_hint to specify the region; it is ignored if jurisdiction is specified.
query() now supports single-query mode with sql and optional params, or batch mode with batch; its return type supports pagination.
Adds a top-level service for R2 Data Catalog operations.
Adds Botnet Threat Feed and Post-Quantum endpoints.
Adds a top-level service for realtime communication, including Calls and TURN.
Adds a top-level service for resource tagging and labeling.
Adds a BaseModel base to the response SchemaFieldList stub.
Adds a BaseModel base to the response SchemaFieldStruct stub.
attacker, attacker_country, and indicator_type are now optional; dataset_id is optional and defaults to the Cloudforce One Threat Events dataset.
The edit method adds optional created_at, dataset_id, insight, and raw parameters; attacker can now be set to None.
Adds a top-level service for token validation configuration and rules.
Adds a top-level service for vulnerability scanning, credential sets, and target environments.
Adds Observability Destinations resources.
Adds Access Users, DEX rules, device IP profile and subnet, WARP connection and failover, WARP subnet, and Gateway PAC file endpoints.
Adds zone environments endpoints.
Behavior and default changes 3
The method now returns
PageShieldUpdateResponse.search_query changed from required str to Optional[str].
dataset_id is now optional; omit it to list from the default dataset.
Tooling 1
Adds generated type and method updates for accounts.
Fixes and other changes 3
Fixes a broken reference for the queues consumer model.
Makes RunQueryParametersNeedleValue a BaseModel with arbitrary_types_allowed.
Adds missing model_rebuild and update_forward_refs support for SharedEntryCustomEntry classes.
cloudflare 437 changes
Breaking changes 17
The addressing namespace relationships were reshuffled to align with the product, so code using the previous namespace organization must be updated.
AI moved to a dedicated namespace, changing where developers access AI APIs.
API Shield operations were updated and the discovery resource was renamed.
Removes the DNS delta model; code relying on that model must use another supported representation.
The dns_firewall API was broken out into a standalone package, changing where developers import and use it.
DNSSEC moved under the DNS namespace, changing where developers access it.
The loa_documents download subresource moved into its parent as get, changing how downloads are accessed.
The R2 parameter was renamed from cf-r2-jurisdiction to jurisdiction, so callers must use the new parameter name.
KV analytics moved under an existing namespace, changing where developers access it.
Moves the download subresource into the parent as get, changing how developers call the download operation.
Changes the operation from PUT to PATCH, affecting requests made through this API.
Renames the pagerules namespace to page_rules, changing the API path developers use.
Service bindings moved to a dedicated namespace, changing where developers access them.
All URL scanner methods now use v2 only, so callers relying on previous methods must update.
The warp_connector namespace moved under zero trust, changing where developers access it.
Reshapes the API structure to allow use of custom and default devices.
Zone transfers moved under the DNS namespace, changing where developers access them.
New APIs and options 13
Endpoints were added for account owned tokens, DNS setting views, and worker assets.
A new Aegis zone setting was added.
Support was added for AI search endpoints and finetunes.
Bulk operation methods were introduced.
Support for content scanning was introduced.
Commands support was added to DEX.
Adds models for DNS batch operations and their responses, enabling typed use of those operations.
Adds bulk endpoints for infrastructure targets.
Adds a Terraform resource for leaked credential checks.
Makes the Omit type public so developers can import and use it.
A PATCH method was added for updating a zone hold.
Adds CORS support for R2 buckets.
Adds routes support for Workers.
Behavior and default changes 1
Changes organization creation to use upsert.
Fixes and other changes 6
Fixes compatibility with the httpx 0.28.0 release.
Calls close only when needed, avoiding unnecessary close calls.
Correctly handles deserializing cls fields.
Fixes the invalid schema definition for plain text.
Defines body_param_name for the bulk rules endpoint.
Updates the origin_max_http_version model.