PHP Client for Cloudflare API
R2

Managed Domain

Managed Domain endpoint reference.

Get

Get the managed (r2.dev) domain configuration for a bucket.

ParamTypeRequiredDefaultDescription
accountIdstringYesAccount Identifier.
bucketNamestringYesBucket Name.
jurisdictionstring|nullNoJurisdiction where objects in this bucket are guaranteed to be stored.
php
$response = $client->r2()->managedDomain()->get('ACCOUNT_ID', 'BUCKET_NAME', 'JURISDICTION');
View this operation on the Cloudflare API Reference

Update

Enable or disable the managed (r2.dev) domain for a bucket.

ParamTypeRequiredDefaultDescription
accountIdstringYesAccount Identifier.
bucketNamestringYesBucket Name.
enabledboolYesWhether the managed domain is enabled.
jurisdictionstring|nullNoJurisdiction where objects in this bucket are guaranteed to be stored.
php
$response = $client->r2()->managedDomain()->update('ACCOUNT_ID', 'BUCKET_NAME', true, 'JURISDICTION');
View this operation on the Cloudflare API Reference
Copyright © 2026