Skip to content
Start here

Domains

DomainsCustom

List Custom Domains of Bucket
client.r2.buckets.domains.custom.list(stringbucketName, CustomListParams { account_id, jurisdiction } params, RequestOptionsoptions?): CustomListResponse { domains }
GET/accounts/{account_id}/r2/buckets/{bucket_name}/domains/custom
Get Custom Domain Settings
client.r2.buckets.domains.custom.get(stringbucketName, stringdomain, CustomGetParams { account_id, jurisdiction } params, RequestOptionsoptions?): CustomGetResponse { domain, enabled, status, 4 more }
GET/accounts/{account_id}/r2/buckets/{bucket_name}/domains/custom/{domain}
Attach Custom Domain To Bucket
client.r2.buckets.domains.custom.create(stringbucketName, CustomCreateParams { account_id, domain, enabled, 4 more } params, RequestOptionsoptions?): CustomCreateResponse { domain, enabled, ciphers, minTLS }
POST/accounts/{account_id}/r2/buckets/{bucket_name}/domains/custom
Configure Custom Domain Settings
client.r2.buckets.domains.custom.update(stringbucketName, stringdomain, CustomUpdateParams { account_id, ciphers, enabled, 2 more } params, RequestOptionsoptions?): CustomUpdateResponse { domain, ciphers, enabled, minTLS }
PUT/accounts/{account_id}/r2/buckets/{bucket_name}/domains/custom/{domain}
Remove Custom Domain From Bucket
client.r2.buckets.domains.custom.delete(stringbucketName, stringdomain, CustomDeleteParams { account_id, jurisdiction } params, RequestOptionsoptions?): CustomDeleteResponse { domain }
DELETE/accounts/{account_id}/r2/buckets/{bucket_name}/domains/custom/{domain}
ModelsExpand Collapse
CustomListResponse { domains }
domains: Array<Domain>
domain: string

Domain name of the custom domain to be added.

enabled: boolean

Whether this bucket is publicly accessible at the specified custom domain.

status: Status { ownership, ssl }
ownership: "pending" | "active" | "deactivated" | 3 more

Ownership status of the domain.

One of the following:
"pending"
"active"
"deactivated"
"blocked"
"error"
"unknown"
ssl: "initializing" | "pending" | "active" | 3 more

SSL certificate status.

One of the following:
"initializing"
"pending"
"active"
"deactivated"
"error"
"unknown"
ciphers?: Array<string>

An allowlist of ciphers for TLS termination. These ciphers must be in the BoringSSL format.

minTLS?: "1.0" | "1.1" | "1.2" | "1.3"

Minimum TLS Version the custom domain will accept for incoming connections. If not set, defaults to 1.0.

One of the following:
"1.0"
"1.1"
"1.2"
"1.3"
zoneId?: string

Zone ID of the custom domain resides in.

zoneName?: string

Zone that the custom domain resides in.

CustomGetResponse { domain, enabled, status, 4 more }
domain: string

Domain name of the custom domain to be added.

enabled: boolean

Whether this bucket is publicly accessible at the specified custom domain.

status: Status { ownership, ssl }
ownership: "pending" | "active" | "deactivated" | 3 more

Ownership status of the domain.

One of the following:
"pending"
"active"
"deactivated"
"blocked"
"error"
"unknown"
ssl: "initializing" | "pending" | "active" | 3 more

SSL certificate status.

One of the following:
"initializing"
"pending"
"active"
"deactivated"
"error"
"unknown"
ciphers?: Array<string>

An allowlist of ciphers for TLS termination. These ciphers must be in the BoringSSL format.

minTLS?: "1.0" | "1.1" | "1.2" | "1.3"

Minimum TLS Version the custom domain will accept for incoming connections. If not set, defaults to 1.0.

One of the following:
"1.0"
"1.1"
"1.2"
"1.3"
zoneId?: string

Zone ID of the custom domain resides in.

zoneName?: string

Zone that the custom domain resides in.

CustomCreateResponse { domain, enabled, ciphers, minTLS }
domain: string

Domain name of the affected custom domain.

enabled: boolean

Whether this bucket is publicly accessible at the specified custom domain.

ciphers?: Array<string>

An allowlist of ciphers for TLS termination. These ciphers must be in the BoringSSL format.

minTLS?: "1.0" | "1.1" | "1.2" | "1.3"

Minimum TLS Version the custom domain will accept for incoming connections. If not set, defaults to 1.0.

One of the following:
"1.0"
"1.1"
"1.2"
"1.3"
CustomUpdateResponse { domain, ciphers, enabled, minTLS }
domain: string

Domain name of the affected custom domain.

ciphers?: Array<string>

An allowlist of ciphers for TLS termination. These ciphers must be in the BoringSSL format.

enabled?: boolean

Whether this bucket is publicly accessible at the specified custom domain.

minTLS?: "1.0" | "1.1" | "1.2" | "1.3"

Minimum TLS Version the custom domain will accept for incoming connections. If not set, defaults to 1.0.

One of the following:
"1.0"
"1.1"
"1.2"
"1.3"
CustomDeleteResponse { domain }
domain: string

Name of the removed custom domain.

DomainsManaged

Get r2.dev Domain of Bucket
client.r2.buckets.domains.managed.list(stringbucketName, ManagedListParams { account_id, jurisdiction } params, RequestOptionsoptions?): ManagedListResponse { bucketId, domain, enabled }
GET/accounts/{account_id}/r2/buckets/{bucket_name}/domains/managed
Update r2.dev Domain of Bucket
client.r2.buckets.domains.managed.update(stringbucketName, ManagedUpdateParams { account_id, enabled, jurisdiction } params, RequestOptionsoptions?): ManagedUpdateResponse { bucketId, domain, enabled }
PUT/accounts/{account_id}/r2/buckets/{bucket_name}/domains/managed
ModelsExpand Collapse
ManagedListResponse { bucketId, domain, enabled }
bucketId: string

Bucket ID.

maxLength32
domain: string

Domain name of the bucket’s r2.dev domain.

enabled: boolean

Whether this bucket is publicly accessible at the r2.dev domain.

ManagedUpdateResponse { bucketId, domain, enabled }
bucketId: string

Bucket ID.

maxLength32
domain: string

Domain name of the bucket’s r2.dev domain.

enabled: boolean

Whether this bucket is publicly accessible at the r2.dev domain.