{"openapi":"3.0.0","info":{"description":"Cloudflare R2 object storage — direct S3-compatible data plane (list/read/delete objects, multipart uploads, bucket CORS/lifecycle/encryption reads) plus presigned URLs, the REST control plane (buckets, domains, lifecycle, object lock, Sippy, bucket jobs) and object uploads.","version":[]},"servers":[{"description":"Cloudflare R2 object storage — direct S3-compatible data plane (list/read/delete objects, multipart uploads, bucket CORS/lifecycle/encryption reads) plus presigned URLs, the REST control plane (buckets, domains, lifecycle, object lock, Sippy, bucket jobs) and object uploads.","url":"https://api.apirails.com/cloudflare-r2"}],"paths":{"/signed-url":{"get":{"tags":["Signed URL (Custom)"],"parameters":[{"name":"bucket","in":"query","description":"User's R2 bucket name","required":true,"schema":{"type":"string","example":""}},{"name":"key_name","in":"query","description":"File name to be signed","required":true,"schema":{"type":"string","example":""}},{"name":"type","in":"query","description":"Request type","schema":{"type":"enum","example":"","items":{"type":"string","enum":["upload","get"]}}},{"name":"expires_in","in":"query","description":"Expire the signed url after this duration (in second). Default : 300 seconds","schema":{"type":"number","example":""}}],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"","api_endpoint":"/cloudflare-r2/signed-url"},"summary":"Generate signed url for R2 (custom endpoint)","description":"API Rails custom endpoint (not a Cloudflare API operation) — Generate an R2 signed url for reading (type=get) or uploading (type=upload) a file object.","security":[{"bearerAuth":[]}]}},"/client/v4/accounts/{account_id}/r2/buckets":{"get":{"tags":["Buckets"],"parameters":[{"name":"account_id","in":"path","description":"Account identifier tag","required":true,"schema":{"type":"string","example":""}},{"name":"cursor","in":"query","description":"Opaque pagination cursor from a previous response","schema":{"type":"string","example":""}},{"name":"direction","in":"query","description":"Direction to order results in","schema":{"type":"string","example":"","items":{"type":"string","enum":["asc","desc"]}}},{"name":"name_contains","in":"query","description":"Only return buckets whose names contain this string","schema":{"type":"string","example":""}},{"name":"order","in":"query","description":"Field to order results by","schema":{"type":"string","example":"","items":{"type":"string","enum":["name"]}}},{"name":"per_page","in":"query","description":"Number of results per page","schema":{"type":"number","example":""}},{"name":"start_after","in":"query","description":"Start listing after this object key","schema":{"type":"string","example":""}}],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://developers.cloudflare.com/api/resources/r2/subresources/buckets/","api_endpoint":"https://api.cloudflare.com/client/v4/accounts/{account_id}/r2/buckets"},"summary":"List buckets","description":"List Buckets","security":[{"bearerAuth":[]}]},"post":{"tags":["Buckets"],"parameters":[{"name":"account_id","in":"path","description":"Account identifier tag","required":true,"schema":{"type":"string","example":""}}],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://developers.cloudflare.com/api/resources/r2/subresources/buckets/","api_endpoint":"https://api.cloudflare.com/client/v4/accounts/{account_id}/r2/buckets"},"summary":"Create bucket","description":"Create Bucket","security":[{"bearerAuth":[]}],"requestBody":{"description":"","required":true,"content":{"application/json":{"schema":{"type":"object","required":[],"properties":{"locationHint":{"type":"string","description":"Location hint (region) for the bucket","enum":["apac","eeur","enam","weur","wnam","oc"]},"name":{"type":"string","description":"Name of the bucket","required":true},"storageClass":{"type":"string","description":"Default storage class for the bucket","enum":["Standard","InfrequentAccess"]}}},"example":{"locationHint":"","name":"","storageClass":""}}}}}},"/client/v4/accounts/{account_id}/r2/buckets/{bucket_name}":{"delete":{"tags":["Buckets"],"parameters":[{"name":"account_id","in":"path","description":"Account identifier tag","required":true,"schema":{"type":"string","example":""}},{"name":"bucket_name","in":"path","description":"Name of the R2 bucket","required":true,"schema":{"type":"string","example":""}}],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://developers.cloudflare.com/api/resources/r2/subresources/buckets/","api_endpoint":"https://api.cloudflare.com/client/v4/accounts/{account_id}/r2/buckets/{bucket_name}"},"summary":"Delete bucket","description":"Delete Bucket","security":[{"bearerAuth":[]}],"requestBody":{"description":"","required":true,"content":{"application/json":{"schema":{"type":"object","required":[],"properties":{}},"example":{}}}}},"get":{"tags":["Buckets"],"parameters":[{"name":"account_id","in":"path","description":"Account identifier tag","required":true,"schema":{"type":"string","example":""}},{"name":"bucket_name","in":"path","description":"Name of the R2 bucket","required":true,"schema":{"type":"string","example":""}}],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://developers.cloudflare.com/api/resources/r2/subresources/buckets/","api_endpoint":"https://api.cloudflare.com/client/v4/accounts/{account_id}/r2/buckets/{bucket_name}"},"summary":"Get bucket","description":"Get Bucket","security":[{"bearerAuth":[]}]},"put":{"tags":["Buckets"],"parameters":[{"name":"account_id","in":"path","description":"Account identifier tag","required":true,"schema":{"type":"string","example":""}},{"name":"bucket_name","in":"path","description":"Name of the R2 bucket","required":true,"schema":{"type":"string","example":""}}],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://developers.cloudflare.com/api/resources/r2/subresources/buckets/","api_endpoint":"https://api.cloudflare.com/client/v4/accounts/{account_id}/r2/buckets/{bucket_name}"},"summary":"Create bucket (by name)","description":"Create Bucket (by name)","security":[{"bearerAuth":[]}],"requestBody":{"description":"","required":true,"content":{"application/json":{"schema":{"type":"object","required":[],"properties":{}},"example":{}}}}}},"/client/v4/accounts/{account_id}/r2/buckets/{bucket_name}/storage-class/standard":{"patch":{"tags":["Buckets"],"parameters":[{"name":"account_id","in":"path","description":"Account identifier tag","required":true,"schema":{"type":"string","example":""}},{"name":"bucket_name","in":"path","description":"Name of the R2 bucket","required":true,"schema":{"type":"string","example":""}}],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://developers.cloudflare.com/api/resources/r2/subresources/buckets/","api_endpoint":"https://api.cloudflare.com/client/v4/accounts/{account_id}/r2/buckets/{bucket_name}"},"summary":"Set default storage class to Standard","description":"Patch Bucket (default storage class: Standard, via required cf-r2-storage-class header)","security":[{"bearerAuth":[]}],"requestBody":{"description":"","required":true,"content":{"application/json":{"schema":{"type":"object","required":[],"properties":{}},"example":{}}}}}},"/client/v4/accounts/{account_id}/r2/buckets/{bucket_name}/storage-class/infrequent-access":{"patch":{"tags":["Buckets"],"parameters":[{"name":"account_id","in":"path","description":"Account identifier tag","required":true,"schema":{"type":"string","example":""}},{"name":"bucket_name","in":"path","description":"Name of the R2 bucket","required":true,"schema":{"type":"string","example":""}}],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://developers.cloudflare.com/api/resources/r2/subresources/buckets/","api_endpoint":"https://api.cloudflare.com/client/v4/accounts/{account_id}/r2/buckets/{bucket_name}"},"summary":"Set default storage class to Infrequent Access","description":"Patch Bucket (default storage class: InfrequentAccess, via required cf-r2-storage-class header)","security":[{"bearerAuth":[]}],"requestBody":{"description":"","required":true,"content":{"application/json":{"schema":{"type":"object","required":[],"properties":{}},"example":{}}}}}},"/client/v4/accounts/{account_id}/r2/buckets/{bucket_name}/cors":{"delete":{"tags":["Bucket CORS"],"parameters":[{"name":"account_id","in":"path","description":"Account identifier tag","required":true,"schema":{"type":"string","example":""}},{"name":"bucket_name","in":"path","description":"Name of the R2 bucket","required":true,"schema":{"type":"string","example":""}}],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://developers.cloudflare.com/api/resources/r2/subresources/buckets/","api_endpoint":"https://api.cloudflare.com/client/v4/accounts/{account_id}/r2/buckets/{bucket_name}/cors"},"summary":"Delete bucket CORS policy","description":"Delete Bucket CORS Policy","security":[{"bearerAuth":[]}],"requestBody":{"description":"","required":true,"content":{"application/json":{"schema":{"type":"object","required":[],"properties":{}},"example":{}}}}},"get":{"tags":["Bucket CORS"],"parameters":[{"name":"account_id","in":"path","description":"Account identifier tag","required":true,"schema":{"type":"string","example":""}},{"name":"bucket_name","in":"path","description":"Name of the R2 bucket","required":true,"schema":{"type":"string","example":""}}],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://developers.cloudflare.com/api/resources/r2/subresources/buckets/","api_endpoint":"https://api.cloudflare.com/client/v4/accounts/{account_id}/r2/buckets/{bucket_name}/cors"},"summary":"Get bucket CORS policy","description":"Get Bucket CORS Policy","security":[{"bearerAuth":[]}]},"put":{"tags":["Bucket CORS"],"parameters":[{"name":"account_id","in":"path","description":"Account identifier tag","required":true,"schema":{"type":"string","example":""}},{"name":"bucket_name","in":"path","description":"Name of the R2 bucket","required":true,"schema":{"type":"string","example":""}}],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://developers.cloudflare.com/api/resources/r2/subresources/buckets/","api_endpoint":"https://api.cloudflare.com/client/v4/accounts/{account_id}/r2/buckets/{bucket_name}/cors"},"summary":"Put bucket CORS policy","description":"Put Bucket CORS Policy","security":[{"bearerAuth":[]}],"requestBody":{"description":"","required":true,"content":{"application/json":{"schema":{"type":"object","required":[],"properties":{"rules":{"type":"array","description":"CORS rules: each rule is an object with allowed {origins, methods, headers}, exposeHeaders, maxAgeSeconds and an optional id","items":{"type":"object","properties":{}}}}},"example":{"rules":[]}}}}}},"/client/v4/accounts/{account_id}/r2/buckets/{bucket_name}/domains/custom":{"get":{"tags":["Custom Domains"],"parameters":[{"name":"account_id","in":"path","description":"Account identifier tag","required":true,"schema":{"type":"string","example":""}},{"name":"bucket_name","in":"path","description":"Name of the R2 bucket","required":true,"schema":{"type":"string","example":""}}],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://developers.cloudflare.com/api/resources/r2/subresources/buckets/","api_endpoint":"https://api.cloudflare.com/client/v4/accounts/{account_id}/r2/buckets/{bucket_name}/domains/custom"},"summary":"List custom domains of bucket","description":"List Custom Domains of Bucket","security":[{"bearerAuth":[]}]},"post":{"tags":["Custom Domains"],"parameters":[{"name":"account_id","in":"path","description":"Account identifier tag","required":true,"schema":{"type":"string","example":""}},{"name":"bucket_name","in":"path","description":"Name of the R2 bucket","required":true,"schema":{"type":"string","example":""}}],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://developers.cloudflare.com/api/resources/r2/subresources/buckets/","api_endpoint":"https://api.cloudflare.com/client/v4/accounts/{account_id}/r2/buckets/{bucket_name}/domains/custom"},"summary":"Attach custom domain to bucket","description":"Attach Custom Domain To Bucket","security":[{"bearerAuth":[]}],"requestBody":{"description":"","required":true,"content":{"application/json":{"schema":{"type":"object","required":[],"properties":{"ciphers":{"type":"array","description":"Allowlist of ciphers for TLS termination","items":{"type":"string"}},"domain":{"type":"string","description":"Name of the custom domain to be added","required":true},"enabled":{"type":"boolean","description":"Enable public bucket access at the custom domain","required":true,"enum":[true,false]},"minTLS":{"type":"string","description":"Minimum TLS version the custom domain accepts","enum":["1.0","1.1","1.2","1.3"]},"zoneId":{"type":"string","description":"Zone ID of the custom domain","required":true}}},"example":{"ciphers":[],"domain":"","enabled":"","minTLS":"","zoneId":""}}}}}},"/client/v4/accounts/{account_id}/r2/buckets/{bucket_name}/domains/custom/{domain}":{"delete":{"tags":["Custom Domains"],"parameters":[{"name":"account_id","in":"path","description":"Account identifier tag","required":true,"schema":{"type":"string","example":""}},{"name":"bucket_name","in":"path","description":"Name of the R2 bucket","required":true,"schema":{"type":"string","example":""}},{"name":"domain","in":"path","description":"Custom domain name","required":true,"schema":{"type":"string","example":""}}],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://developers.cloudflare.com/api/resources/r2/subresources/buckets/","api_endpoint":"https://api.cloudflare.com/client/v4/accounts/{account_id}/r2/buckets/{bucket_name}/domains/custom/{domain}"},"summary":"Remove custom domain from bucket","description":"Remove Custom Domain From Bucket","security":[{"bearerAuth":[]}],"requestBody":{"description":"","required":true,"content":{"application/json":{"schema":{"type":"object","required":[],"properties":{}},"example":{}}}}},"get":{"tags":["Custom Domains"],"parameters":[{"name":"account_id","in":"path","description":"Account identifier tag","required":true,"schema":{"type":"string","example":""}},{"name":"bucket_name","in":"path","description":"Name of the R2 bucket","required":true,"schema":{"type":"string","example":""}},{"name":"domain","in":"path","description":"Custom domain name","required":true,"schema":{"type":"string","example":""}}],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://developers.cloudflare.com/api/resources/r2/subresources/buckets/","api_endpoint":"https://api.cloudflare.com/client/v4/accounts/{account_id}/r2/buckets/{bucket_name}/domains/custom/{domain}"},"summary":"Get custom domain settings","description":"Get Custom Domain Settings","security":[{"bearerAuth":[]}]},"put":{"tags":["Custom Domains"],"parameters":[{"name":"account_id","in":"path","description":"Account identifier tag","required":true,"schema":{"type":"string","example":""}},{"name":"bucket_name","in":"path","description":"Name of the R2 bucket","required":true,"schema":{"type":"string","example":""}},{"name":"domain","in":"path","description":"Custom domain name","required":true,"schema":{"type":"string","example":""}}],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://developers.cloudflare.com/api/resources/r2/subresources/buckets/","api_endpoint":"https://api.cloudflare.com/client/v4/accounts/{account_id}/r2/buckets/{bucket_name}/domains/custom/{domain}"},"summary":"Configure custom domain settings","description":"Configure Custom Domain Settings","security":[{"bearerAuth":[]}],"requestBody":{"description":"","required":true,"content":{"application/json":{"schema":{"type":"object","required":[],"properties":{"ciphers":{"type":"array","description":"Allowlist of ciphers for TLS termination","items":{"type":"string"}},"enabled":{"type":"boolean","description":"Enable public bucket access at the custom domain","enum":[true,false]},"minTLS":{"type":"string","description":"Minimum TLS version the custom domain accepts","enum":["1.0","1.1","1.2","1.3"]}}},"example":{"ciphers":[],"enabled":"","minTLS":""}}}}}},"/client/v4/accounts/{account_id}/r2/buckets/{bucket_name}/domains/managed":{"get":{"tags":["Managed Domains"],"parameters":[{"name":"account_id","in":"path","description":"Account identifier tag","required":true,"schema":{"type":"string","example":""}},{"name":"bucket_name","in":"path","description":"Name of the R2 bucket","required":true,"schema":{"type":"string","example":""}}],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://developers.cloudflare.com/api/resources/r2/subresources/buckets/","api_endpoint":"https://api.cloudflare.com/client/v4/accounts/{account_id}/r2/buckets/{bucket_name}/domains/managed"},"summary":"Get r2.dev domain of bucket","description":"Get r2.dev Domain of Bucket","security":[{"bearerAuth":[]}]},"put":{"tags":["Managed Domains"],"parameters":[{"name":"account_id","in":"path","description":"Account identifier tag","required":true,"schema":{"type":"string","example":""}},{"name":"bucket_name","in":"path","description":"Name of the R2 bucket","required":true,"schema":{"type":"string","example":""}}],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://developers.cloudflare.com/api/resources/r2/subresources/buckets/","api_endpoint":"https://api.cloudflare.com/client/v4/accounts/{account_id}/r2/buckets/{bucket_name}/domains/managed"},"summary":"Update r2.dev domain of bucket","description":"Update r2.dev Domain of Bucket","security":[{"bearerAuth":[]}],"requestBody":{"description":"","required":true,"content":{"application/json":{"schema":{"type":"object","required":[],"properties":{"enabled":{"type":"boolean","description":"Enable public bucket access at the r2.dev domain","required":true,"enum":[true,false]}}},"example":{"enabled":""}}}}}},"/client/v4/accounts/{account_id}/r2/buckets/{bucket_name}/jobs":{"get":{"tags":["Bucket Jobs"],"parameters":[{"name":"account_id","in":"path","description":"Account identifier tag","required":true,"schema":{"type":"string","example":""}},{"name":"bucket_name","in":"path","description":"Name of the R2 bucket","required":true,"schema":{"type":"string","example":""}},{"name":"continuationToken","in":"query","description":"Pagination token received as `nextContinuationToken` in the previous response.","schema":{"type":"string","example":""}},{"name":"jobType","in":"query","description":"Restricts results to jobs of the specified type.","schema":{"type":"string","example":"","items":{"type":"string","enum":["prefixDelete"]}}},{"name":"maxKeys","in":"query","description":"Maximum number of jobs to return.","schema":{"type":"number","example":""}},{"name":"status","in":"query","description":"Restricts results to jobs with the specified status. `jobType` is required when this parameter is provided.","schema":{"type":"string","example":""}}],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://developers.cloudflare.com/api/resources/r2/subresources/buckets/","api_endpoint":"https://api.cloudflare.com/client/v4/accounts/{account_id}/r2/buckets/{bucket_name}/jobs"},"summary":"List bucket jobs","description":"List Bucket Jobs","security":[{"bearerAuth":[]}]},"post":{"tags":["Bucket Jobs"],"parameters":[{"name":"account_id","in":"path","description":"Account identifier tag","required":true,"schema":{"type":"string","example":""}},{"name":"bucket_name","in":"path","description":"Name of the R2 bucket","required":true,"schema":{"type":"string","example":""}}],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://developers.cloudflare.com/api/resources/r2/subresources/buckets/","api_endpoint":"https://api.cloudflare.com/client/v4/accounts/{account_id}/r2/buckets/{bucket_name}/jobs"},"summary":"Create bucket job","description":"Create Bucket Job (prefixDelete or storageClassMigration — the latter replaces the removed storage-class-migration-jobs API)","security":[{"bearerAuth":[]}],"requestBody":{"description":"","required":true,"content":{"application/json":{"schema":{"type":"object","required":[],"properties":{"jobType":{"type":"string","description":"Job type: `prefixDelete` (requires `prefix`; a non-empty value must end in `/`, an empty string empties the entire bucket) or `storageClassMigration` (set `sourceStorageClass`/`destinationStorageClass`)","required":true,"enum":["prefixDelete","storageClassMigration"]},"prefix":{"type":"string","description":"prefixDelete only — prefix matched against object keys; non-empty values must end in `/`, empty string empties the entire bucket"},"sourceStorageClass":{"type":"string","description":"storageClassMigration only — storage class objects are migrated from","enum":["Standard","InfrequentAccess"]},"destinationStorageClass":{"type":"string","description":"storageClassMigration only — storage class objects are migrated to","enum":["Standard","InfrequentAccess"]}}},"example":{"jobType":"","prefix":"","sourceStorageClass":"","destinationStorageClass":""}}}}}},"/client/v4/accounts/{account_id}/r2/buckets/{bucket_name}/jobs/{job_id}":{"get":{"tags":["Bucket Jobs"],"parameters":[{"name":"account_id","in":"path","description":"Account identifier tag","required":true,"schema":{"type":"string","example":""}},{"name":"bucket_name","in":"path","description":"Name of the R2 bucket","required":true,"schema":{"type":"string","example":""}},{"name":"job_id","in":"path","description":"Identifier returned when the background job was submitted.","required":true,"schema":{"type":"string","example":""}}],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://developers.cloudflare.com/api/resources/r2/subresources/buckets/","api_endpoint":"https://api.cloudflare.com/client/v4/accounts/{account_id}/r2/buckets/{bucket_name}/jobs/{job_id}"},"summary":"Get bucket job","description":"Get Bucket Job","security":[{"bearerAuth":[]}]}},"/client/v4/accounts/{account_id}/r2/buckets/{bucket_name}/lifecycle":{"get":{"tags":["Object Lifecycle"],"parameters":[{"name":"account_id","in":"path","description":"Account identifier tag","required":true,"schema":{"type":"string","example":""}},{"name":"bucket_name","in":"path","description":"Name of the R2 bucket","required":true,"schema":{"type":"string","example":""}}],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://developers.cloudflare.com/api/resources/r2/subresources/buckets/","api_endpoint":"https://api.cloudflare.com/client/v4/accounts/{account_id}/r2/buckets/{bucket_name}/lifecycle"},"summary":"Get object lifecycle rules","description":"Get Object Lifecycle Rules","security":[{"bearerAuth":[]}]},"put":{"tags":["Object Lifecycle"],"parameters":[{"name":"account_id","in":"path","description":"Account identifier tag","required":true,"schema":{"type":"string","example":""}},{"name":"bucket_name","in":"path","description":"Name of the R2 bucket","required":true,"schema":{"type":"string","example":""}}],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://developers.cloudflare.com/api/resources/r2/subresources/buckets/","api_endpoint":"https://api.cloudflare.com/client/v4/accounts/{account_id}/r2/buckets/{bucket_name}/lifecycle"},"summary":"Put object lifecycle rules","description":"Put Object Lifecycle Rules","security":[{"bearerAuth":[]}],"requestBody":{"description":"","required":true,"content":{"application/json":{"schema":{"type":"object","required":[],"properties":{"rules":{"type":"array","description":"Lifecycle rules: each rule has id, enabled, conditions {minSize, maxSize, prefix, tagMatch}, abortMultipartUploadsTransition, deleteObjectsTransition, storageClassTransitions","items":{"type":"object","properties":{}}}}},"example":{"rules":[]}}}}}},"/client/v4/accounts/{account_id}/r2/buckets/{bucket_name}/local-uploads":{"get":{"tags":["Local Uploads"],"parameters":[{"name":"account_id","in":"path","description":"Account identifier tag","required":true,"schema":{"type":"string","example":""}},{"name":"bucket_name","in":"path","description":"Name of the R2 bucket","required":true,"schema":{"type":"string","example":""}}],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://developers.cloudflare.com/api/resources/r2/subresources/buckets/","api_endpoint":"https://api.cloudflare.com/client/v4/accounts/{account_id}/r2/buckets/{bucket_name}/local-uploads"},"summary":"Get local uploads configuration","description":"Get Local Uploads Configuration","security":[{"bearerAuth":[]}]},"put":{"tags":["Local Uploads"],"parameters":[{"name":"account_id","in":"path","description":"Account identifier tag","required":true,"schema":{"type":"string","example":""}},{"name":"bucket_name","in":"path","description":"Name of the R2 bucket","required":true,"schema":{"type":"string","example":""}}],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://developers.cloudflare.com/api/resources/r2/subresources/buckets/","api_endpoint":"https://api.cloudflare.com/client/v4/accounts/{account_id}/r2/buckets/{bucket_name}/local-uploads"},"summary":"Put local uploads configuration","description":"Put Local Uploads Configuration","security":[{"bearerAuth":[]}],"requestBody":{"description":"","required":false,"content":{"multipart/form-data":{"schema":{"type":"object","required":[],"properties":{"enabled":{"type":"boolean","description":"Enable or disable local uploads on this bucket","required":true,"enum":[true,false]}}},"example":{"enabled":""}}}}}},"/client/v4/accounts/{account_id}/r2/buckets/{bucket_name}/lock":{"get":{"tags":["Bucket Lock"],"parameters":[{"name":"account_id","in":"path","description":"Account identifier tag","required":true,"schema":{"type":"string","example":""}},{"name":"bucket_name","in":"path","description":"Name of the R2 bucket","required":true,"schema":{"type":"string","example":""}}],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://developers.cloudflare.com/api/resources/r2/subresources/buckets/","api_endpoint":"https://api.cloudflare.com/client/v4/accounts/{account_id}/r2/buckets/{bucket_name}/lock"},"summary":"Get bucket lock rules","description":"Get Bucket Lock Rules","security":[{"bearerAuth":[]}]},"put":{"tags":["Bucket Lock"],"parameters":[{"name":"account_id","in":"path","description":"Account identifier tag","required":true,"schema":{"type":"string","example":""}},{"name":"bucket_name","in":"path","description":"Name of the R2 bucket","required":true,"schema":{"type":"string","example":""}}],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://developers.cloudflare.com/api/resources/r2/subresources/buckets/","api_endpoint":"https://api.cloudflare.com/client/v4/accounts/{account_id}/r2/buckets/{bucket_name}/lock"},"summary":"Put bucket lock rules","description":"Put Bucket Lock Rules","security":[{"bearerAuth":[]}],"requestBody":{"description":"","required":true,"content":{"application/json":{"schema":{"type":"object","required":[],"properties":{"rules":{"type":"array","description":"Object-lock rules: each rule has descriptionPrefix, condition (Age {maxAgeSeconds} / Date {date} / Indefinite), enabled and skipTrailingDelete","items":{"type":"object","properties":{}}}}},"example":{"rules":[]}}}}},"delete":{"tags":["Bucket Lock"],"parameters":[{"name":"account_id","in":"path","description":"Account identifier tag","required":true,"schema":{"type":"string","example":""}},{"name":"bucket_name","in":"path","description":"Name of the R2 bucket","required":true,"schema":{"type":"string","example":""}}],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://developers.cloudflare.com/api/resources/r2/subresources/buckets/","api_endpoint":"https://api.cloudflare.com/client/v4/accounts/{account_id}/r2/buckets/{bucket_name}/lock"},"summary":"Delete bucket lock rules","description":"Delete Bucket Lock Rules","security":[{"bearerAuth":[]}],"requestBody":{"description":"","required":true,"content":{"application/json":{"schema":{"type":"object","required":[],"properties":{}},"example":{}}}}}},"/client/v4/accounts/{account_id}/r2/buckets/{bucket_name}/objects":{"delete":{"tags":["Objects"],"parameters":[{"name":"account_id","in":"path","description":"Account identifier tag","required":true,"schema":{"type":"string","example":""}},{"name":"bucket_name","in":"path","description":"Name of the R2 bucket","required":true,"schema":{"type":"string","example":""}},{"name":"prefix","in":"query","description":"Only return objects with this prefix (for delete: empty the bucket under this prefix)","schema":{"type":"string","example":""}}],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://developers.cloudflare.com/api/resources/r2/subresources/buckets/","api_endpoint":"https://api.cloudflare.com/client/v4/accounts/{account_id}/r2/buckets/{bucket_name}/objects"},"summary":"Delete objects or empty a bucket","description":"Delete Objects or Empty a Bucket","security":[{"bearerAuth":[]}],"requestBody":{"description":"","required":true,"content":{"application/json":{"schema":{"type":"object","required":[],"properties":{}},"example":{}}}}},"get":{"tags":["Objects"],"parameters":[{"name":"account_id","in":"path","description":"Account identifier tag","required":true,"schema":{"type":"string","example":""}},{"name":"bucket_name","in":"path","description":"Name of the R2 bucket","required":true,"schema":{"type":"string","example":""}},{"name":"cursor","in":"query","description":"Opaque pagination cursor from a previous response","schema":{"type":"string","example":""}},{"name":"delimiter","in":"query","description":"Group objects containing this delimiter into common prefixes","schema":{"type":"string","example":""}},{"name":"per_page","in":"query","description":"Number of results per page","schema":{"type":"number","example":""}},{"name":"prefix","in":"query","description":"Only return objects with this prefix (for delete: empty the bucket under this prefix)","schema":{"type":"string","example":""}},{"name":"start_after","in":"query","description":"Start listing after this object key","schema":{"type":"string","example":""}}],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://developers.cloudflare.com/api/resources/r2/subresources/buckets/","api_endpoint":"https://api.cloudflare.com/client/v4/accounts/{account_id}/r2/buckets/{bucket_name}/objects"},"summary":"List objects","description":"List Objects","security":[{"bearerAuth":[]}]}},"/client/v4/accounts/{account_id}/r2/buckets/{bucket_name}/objects/{object_key}":{"delete":{"tags":["Objects"],"parameters":[{"name":"account_id","in":"path","description":"Account identifier tag","required":true,"schema":{"type":"string","example":""}},{"name":"bucket_name","in":"path","description":"Name of the R2 bucket","required":true,"schema":{"type":"string","example":""}},{"name":"object_key","in":"path","description":"Object key (path) within the bucket","required":true,"schema":{"type":"string","example":""}}],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://developers.cloudflare.com/api/resources/r2/subresources/buckets/","api_endpoint":"https://api.cloudflare.com/client/v4/accounts/{account_id}/r2/buckets/{bucket_name}/objects/{object_key}"},"summary":"Delete object","description":"Delete Object","security":[{"bearerAuth":[]}],"requestBody":{"description":"","required":true,"content":{"application/json":{"schema":{"type":"object","required":[],"properties":{}},"example":{}}}}},"get":{"tags":["Objects"],"parameters":[{"name":"account_id","in":"path","description":"Account identifier tag","required":true,"schema":{"type":"string","example":""}},{"name":"bucket_name","in":"path","description":"Name of the R2 bucket","required":true,"schema":{"type":"string","example":""}},{"name":"object_key","in":"path","description":"Object key (path) within the bucket","required":true,"schema":{"type":"string","example":""}}],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://developers.cloudflare.com/api/resources/r2/subresources/buckets/","api_endpoint":"https://api.cloudflare.com/client/v4/accounts/{account_id}/r2/buckets/{bucket_name}/objects/{object_key}"},"summary":"Get object","description":"Get Object","security":[{"bearerAuth":[]}]},"put":{"tags":["Objects"],"parameters":[{"name":"account_id","in":"path","description":"Account identifier tag","required":true,"schema":{"type":"string","example":""}},{"name":"bucket_name","in":"path","description":"Name of the R2 bucket","required":true,"schema":{"type":"string","example":""}},{"name":"object_key","in":"path","description":"Object key (path) within the bucket","required":true,"schema":{"type":"string","example":""}}],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://developers.cloudflare.com/api/resources/r2/subresources/buckets/","api_endpoint":"https://api.cloudflare.com/client/v4/accounts/{account_id}/r2/buckets/{bucket_name}/objects/{object_key}"},"summary":"Upload object","description":"Upload Object","security":[{"bearerAuth":[]}],"requestBody":{"description":"","required":false,"content":{"multipart/form-data":{"schema":{"type":"object","required":[],"properties":{"file":{"type":"string","format":"binary","description":"The object contents to upload","required":true}}},"example":{"file":"(binary)"}}}}}},"/client/v4/accounts/{account_id}/r2/buckets/{bucket_name}/sippy":{"delete":{"tags":["Sippy Migration"],"parameters":[{"name":"account_id","in":"path","description":"Account identifier tag","required":true,"schema":{"type":"string","example":""}},{"name":"bucket_name","in":"path","description":"Name of the R2 bucket","required":true,"schema":{"type":"string","example":""}}],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://developers.cloudflare.com/api/resources/r2/subresources/buckets/","api_endpoint":"https://api.cloudflare.com/client/v4/accounts/{account_id}/r2/buckets/{bucket_name}/sippy"},"summary":"Disable Sippy","description":"Disable Sippy","security":[{"bearerAuth":[]}],"requestBody":{"description":"","required":true,"content":{"application/json":{"schema":{"type":"object","required":[],"properties":{}},"example":{}}}}},"get":{"tags":["Sippy Migration"],"parameters":[{"name":"account_id","in":"path","description":"Account identifier tag","required":true,"schema":{"type":"string","example":""}},{"name":"bucket_name","in":"path","description":"Name of the R2 bucket","required":true,"schema":{"type":"string","example":""}}],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://developers.cloudflare.com/api/resources/r2/subresources/buckets/","api_endpoint":"https://api.cloudflare.com/client/v4/accounts/{account_id}/r2/buckets/{bucket_name}/sippy"},"summary":"Get Sippy configuration","description":"Get Sippy Configuration","security":[{"bearerAuth":[]}]},"put":{"tags":["Sippy Migration"],"parameters":[{"name":"account_id","in":"path","description":"Account identifier tag","required":true,"schema":{"type":"string","example":""}},{"name":"bucket_name","in":"path","description":"Name of the R2 bucket","required":true,"schema":{"type":"string","example":""}}],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://developers.cloudflare.com/api/resources/r2/subresources/buckets/","api_endpoint":"https://api.cloudflare.com/client/v4/accounts/{account_id}/r2/buckets/{bucket_name}/sippy"},"summary":"Enable Sippy","description":"Enable Sippy","security":[{"bearerAuth":[]}],"requestBody":{"description":"","required":true,"content":{"application/json":{"schema":{"type":"object","required":[],"properties":{"destination":{"type":"object","description":"R2 destination bucket {bucket, accessKeyId, secretAccessKey}","properties":{}},"source":{"type":"object","description":"Source bucket to copy objects from — object shape depends on provider: AWS {bucket, accessKeyId, secretAccessKey, region?} · GCS {bucket, clientEmail, privateKey} · Azure {account, container, sasToken?} · S3-compatible {endpoint, bucket, accessKeyId, secretAccessKey, region?}","properties":{}}}},"example":{"destination":{},"source":{}}}}}}},"/client/v4/accounts/{account_id}/r2/metrics":{"get":{"tags":["Metrics"],"parameters":[{"name":"account_id","in":"path","description":"Account identifier tag","required":true,"schema":{"type":"string","example":""}}],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://developers.cloudflare.com/api/resources/r2/","api_endpoint":"https://api.cloudflare.com/client/v4/accounts/{account_id}/r2/metrics"},"summary":"Get account-Level metrics","description":"Get Account-Level Metrics","security":[{"bearerAuth":[]}]}},"/client/v4/accounts/{account_id}/r2/temp-access-credentials":{"post":{"tags":["Access Credentials"],"parameters":[{"name":"account_id","in":"path","description":"Account identifier tag","required":true,"schema":{"type":"string","example":""}}],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://developers.cloudflare.com/api/resources/r2/subresources/temporary_credentials/","api_endpoint":"https://api.cloudflare.com/client/v4/accounts/{account_id}/r2/temp-access-credentials"},"summary":"Create temporary access credentials","description":"Create Temporary Access Credentials","security":[{"bearerAuth":[]}],"requestBody":{"description":"","required":true,"content":{"application/json":{"schema":{"type":"object","required":[],"properties":{"bucket":{"type":"string","description":"Name of the R2 bucket","required":true},"objects":{"type":"array","description":"Optional object paths to scope the credentials to","items":{"type":"string"}},"parentAccessKeyId":{"type":"string","description":"The parent access key id to use for signing","required":true},"permission":{"type":"string","description":"Permissions allowed on the credentials","required":true,"enum":["admin-read-write","admin-read-only","object-read-write","object-read-only"]},"prefixes":{"type":"array","description":"Optional prefix paths to scope the credentials to","items":{"type":"string"}},"ttlSeconds":{"type":"number","description":"How long the credentials will live, in seconds","required":true}}},"example":{"bucket":"","objects":[],"parentAccessKeyId":"","permission":"","prefixes":[],"ttlSeconds":""}}}}}},"/buckets":{"get":{"tags":["S3 Buckets"],"parameters":[],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://developers.cloudflare.com/r2/api/s3/api/#implemented-bucket-level-operations","api_endpoint":"https://{account_id}.r2.cloudflarestorage.com/"},"summary":"List buckets (S3 API)","description":"Returns a list of all R2 buckets owned by the authenticated sender of the request. Requires an account-scoped token (Admin Read & Write).","security":[{"bearerAuth":[]}]}},"/{bucket}":{"get":{"tags":["S3 Objects"],"parameters":[{"name":"bucket","in":"path","description":"Name of the R2 bucket","required":true,"schema":{"type":"string","example":""}},{"name":"continuation-token","in":"query","description":"Token from a previous truncated response; continues the listing","schema":{"type":"string","example":""}},{"name":"delimiter","in":"query","description":"Character used to group keys into CommonPrefixes (usually /)","schema":{"type":"string","example":""}},{"name":"encoding-type","in":"query","description":"Encoding type used by R2 to encode object keys in the response (url)","schema":{"type":"string","example":""}},{"name":"max-keys","in":"query","description":"Maximum number of keys returned (up to 1000)","schema":{"type":"number","example":""}},{"name":"prefix","in":"query","description":"Limit the response to keys that begin with this prefix","schema":{"type":"string","example":""}},{"name":"start-after","in":"query","description":"Start listing after this specified key","schema":{"type":"string","example":""}}],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://developers.cloudflare.com/r2/api/s3/api/#implemented-object-level-operations","api_endpoint":"https://{account_id}.r2.cloudflarestorage.com/{bucket}/?list-type=2"},"summary":"List objects (S3 API)","description":"Returns some or all (up to 1,000) of the objects in an R2 bucket. R2 recommends ListObjectsV2 over legacy ListObjects.","security":[{"bearerAuth":[]}]},"delete":{"tags":["S3 Buckets"],"parameters":[{"name":"bucket","in":"path","description":"Name of the R2 bucket","required":true,"schema":{"type":"string","example":""}}],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://developers.cloudflare.com/r2/api/s3/api/#implemented-bucket-level-operations","api_endpoint":"https://{account_id}.r2.cloudflarestorage.com/{bucket}/"},"summary":"Delete empty bucket (S3 API)","description":"Deletes an R2 bucket. The bucket must be empty.","security":[{"bearerAuth":[]}],"requestBody":{"description":"","required":true,"content":{"application/json":{"schema":{"type":"object","required":[],"properties":{}},"example":{}}}}}},"/{bucket}/location":{"get":{"tags":["S3 Buckets"],"parameters":[{"name":"bucket","in":"path","description":"Name of the R2 bucket","required":true,"schema":{"type":"string","example":""}}],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://developers.cloudflare.com/r2/api/s3/api/#implemented-bucket-level-operations","api_endpoint":"https://{account_id}.r2.cloudflarestorage.com/{bucket}/?location"},"summary":"Get bucket location (S3 API)","description":"Returns the region of an R2 bucket — always auto.","security":[{"bearerAuth":[]}]}},"/{bucket}/cors":{"get":{"tags":["S3 Buckets"],"parameters":[{"name":"bucket","in":"path","description":"Name of the R2 bucket","required":true,"schema":{"type":"string","example":""}}],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://developers.cloudflare.com/r2/api/s3/api/#implemented-bucket-level-operations","api_endpoint":"https://{account_id}.r2.cloudflarestorage.com/{bucket}/?cors"},"summary":"Get bucket CORS configuration (S3 API)","description":"Returns the CORS configuration of an R2 bucket.","security":[{"bearerAuth":[]}]},"delete":{"tags":["S3 Buckets"],"parameters":[{"name":"bucket","in":"path","description":"Name of the R2 bucket","required":true,"schema":{"type":"string","example":""}}],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://developers.cloudflare.com/r2/api/s3/api/#implemented-bucket-level-operations","api_endpoint":"https://{account_id}.r2.cloudflarestorage.com/{bucket}/?cors"},"summary":"Delete bucket CORS configuration (S3 API)","description":"Deletes the CORS configuration of an R2 bucket.","security":[{"bearerAuth":[]}],"requestBody":{"description":"","required":true,"content":{"application/json":{"schema":{"type":"object","required":[],"properties":{}},"example":{}}}}}},"/{bucket}/lifecycle":{"get":{"tags":["S3 Buckets"],"parameters":[{"name":"bucket","in":"path","description":"Name of the R2 bucket","required":true,"schema":{"type":"string","example":""}}],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://developers.cloudflare.com/r2/api/s3/api/#implemented-bucket-level-operations","api_endpoint":"https://{account_id}.r2.cloudflarestorage.com/{bucket}/?lifecycle"},"summary":"Get bucket lifecycle configuration (S3 API)","description":"Returns the object lifecycle configuration of an R2 bucket.","security":[{"bearerAuth":[]}]}},"/{bucket}/encryption":{"get":{"tags":["S3 Buckets"],"parameters":[{"name":"bucket","in":"path","description":"Name of the R2 bucket","required":true,"schema":{"type":"string","example":""}}],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://developers.cloudflare.com/r2/api/s3/api/#implemented-bucket-level-operations","api_endpoint":"https://{account_id}.r2.cloudflarestorage.com/{bucket}/?encryption"},"summary":"Get bucket encryption (S3 API)","description":"Returns the default encryption configuration of an R2 bucket.","security":[{"bearerAuth":[]}]}},"/{bucket}/multipart-uploads":{"get":{"tags":["S3 Multipart Uploads"],"parameters":[{"name":"bucket","in":"path","description":"Name of the R2 bucket","required":true,"schema":{"type":"string","example":""}},{"name":"delimiter","in":"query","description":"Character used to group keys into CommonPrefixes (usually /)","schema":{"type":"string","example":""}},{"name":"encoding-type","in":"query","description":"Encoding type used by R2 to encode object keys in the response (url)","schema":{"type":"string","example":""}},{"name":"key-marker","in":"query","description":"Together with upload-id-marker, specifies the multipart upload after which listing should begin","schema":{"type":"string","example":""}},{"name":"max-uploads","in":"query","description":"Maximum number of multipart uploads returned (up to 1000)","schema":{"type":"number","example":""}},{"name":"prefix","in":"query","description":"Limit the response to keys that begin with this prefix","schema":{"type":"string","example":""}},{"name":"upload-id-marker","in":"query","description":"Together with key-marker, specifies the multipart upload after which listing should begin","schema":{"type":"string","example":""}}],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://developers.cloudflare.com/r2/api/s3/api/#implemented-object-level-operations","api_endpoint":"https://{account_id}.r2.cloudflarestorage.com/{bucket}/?uploads"},"summary":"List in-progress multipart uploads (S3 API)","description":"Lists in-progress multipart uploads for an R2 bucket.","security":[{"bearerAuth":[]}]}},"/{bucket}/object/{key(.+)}/parts":{"get":{"tags":["S3 Multipart Uploads"],"parameters":[{"name":"bucket","in":"path","description":"Name of the R2 bucket","required":true,"schema":{"type":"string","example":""}},{"name":"key","in":"path","description":"Object key (may contain slashes)","required":true,"schema":{"type":"string","example":""}},{"name":"max-parts","in":"query","description":"Sets the maximum number of parts to return","schema":{"type":"number","example":""}},{"name":"part-number-marker","in":"query","description":"Specifies the part after which listing should begin","schema":{"type":"number","example":""}},{"name":"uploadId","in":"query","description":"Upload ID identifying the multipart upload","required":true,"schema":{"type":"string","example":""}}],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://developers.cloudflare.com/r2/api/s3/api/#implemented-object-level-operations","api_endpoint":"https://{account_id}.r2.cloudflarestorage.com/{bucket}/{key}"},"summary":"List uploaded parts (S3 API)","description":"Lists the parts that have been uploaded for a specific R2 multipart upload.","security":[{"bearerAuth":[]}]}},"/{bucket}/object/{key(.+)}/multipart-upload":{"delete":{"tags":["S3 Multipart Uploads"],"parameters":[{"name":"bucket","in":"path","description":"Name of the R2 bucket","required":true,"schema":{"type":"string","example":""}},{"name":"key","in":"path","description":"Object key (may contain slashes)","required":true,"schema":{"type":"string","example":""}},{"name":"uploadId","in":"query","description":"Upload ID identifying the multipart upload","required":true,"schema":{"type":"string","example":""}}],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://developers.cloudflare.com/r2/api/s3/api/#implemented-object-level-operations","api_endpoint":"https://{account_id}.r2.cloudflarestorage.com/{bucket}/{key}"},"summary":"Abort multipart upload (S3 API)","description":"Aborts an in-progress R2 multipart upload and frees the stored parts.","security":[{"bearerAuth":[]}],"requestBody":{"description":"","required":false,"content":{"multipart/form-data":{"schema":{"type":"object","required":[],"properties":{}},"example":{}}}}}},"/{bucket}/object/{key(.+)}/multipart-uploads":{"post":{"tags":["S3 Multipart Uploads"],"parameters":[{"name":"bucket","in":"path","description":"Name of the R2 bucket","required":true,"schema":{"type":"string","example":""}},{"name":"key","in":"path","description":"Object key (may contain slashes)","required":true,"schema":{"type":"string","example":""}}],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://developers.cloudflare.com/r2/api/s3/api/#implemented-object-level-operations","api_endpoint":"https://{account_id}.r2.cloudflarestorage.com/{bucket}/{key}?uploads"},"summary":"Create multipart upload (S3 API)","description":"Initiates an R2 multipart upload and returns an upload ID. Upload parts via the presigned-URL custom endpoint, then complete the upload out-of-band.","security":[{"bearerAuth":[]}],"requestBody":{"description":"","required":false,"content":{"multipart/form-data":{"schema":{"type":"object","required":[],"properties":{}},"example":{}}}}}},"/{bucket}/object/{key(.+)}":{"get":{"tags":["S3 Objects"],"parameters":[{"name":"bucket","in":"path","description":"Name of the R2 bucket","required":true,"schema":{"type":"string","example":""}},{"name":"key","in":"path","description":"Object key (may contain slashes)","required":true,"schema":{"type":"string","example":""}},{"name":"partNumber","in":"query","description":"Part number of the object to read (for multipart objects)","schema":{"type":"number","example":""}}],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://developers.cloudflare.com/r2/api/s3/api/#implemented-object-level-operations","api_endpoint":"https://{account_id}.r2.cloudflarestorage.com/{bucket}/{key}"},"summary":"Get object (S3 API)","description":"Retrieves an object from an R2 bucket. Supports Range and conditional (If-Match / If-None-Match / If-Modified-Since / If-Unmodified-Since) reads.","security":[{"bearerAuth":[]}]},"delete":{"tags":["S3 Objects"],"parameters":[{"name":"bucket","in":"path","description":"Name of the R2 bucket","required":true,"schema":{"type":"string","example":""}},{"name":"key","in":"path","description":"Object key (may contain slashes)","required":true,"schema":{"type":"string","example":""}}],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://developers.cloudflare.com/r2/api/s3/api/#implemented-object-level-operations","api_endpoint":"https://{account_id}.r2.cloudflarestorage.com/{bucket}/{key}"},"summary":"Delete object (S3 API)","description":"Deletes an object from an R2 bucket.","security":[{"bearerAuth":[]}],"requestBody":{"description":"","required":true,"content":{"application/json":{"schema":{"type":"object","required":[],"properties":{}},"example":{}}}}}}},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"}}},"security":[{"bearerAuth":[]}]}