Cloudflare R2 Credential Management API
The Credential Management API from Cloudflare R2 — 1 operation(s) for credential management.
The Credential Management API from Cloudflare R2 — 1 operation(s) for credential management.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/cloudflare-r2:cloudflare-r2-credential-management-api"
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: Cloudflare R2 Cloudflare Credential Management API
description: Cloudflare API endpoints for managing R2 object storage buckets, objects, CORS, lifecycle policies, custom domains, event notifications, data catalog, and temporary credentials.
version: 4.0.0
termsOfService: https://www.cloudflare.com/website-terms/
contact:
name: Cloudflare Developer Docs
url: https://developers.cloudflare.com/r2/
servers:
- url: https://api.cloudflare.com/client/v4
description: Cloudflare API v4
tags:
- name: Credential Management
paths:
/accounts/{account_id}/r2-catalog/{bucket_name}/credential:
post:
description: 'Store authentication credentials for a catalog. These credentials are used
to authenticate with R2 storage when performing catalog operations.'
operationId: store-credentials
parameters:
- description: Identifies the account.
in: path
name: account_id
required: true
schema:
$ref: '#/components/schemas/r2-data-catalog_account-id'
- description: Specifies the R2 bucket name.
in: path
name: bucket_name
required: true
schema:
$ref: '#/components/schemas/r2-data-catalog_bucket-name'
requestBody:
content:
application/json:
example:
token: your-cloudflare-api-token-here
schema:
$ref: '#/components/schemas/r2-data-catalog_catalog-credential-request'
required: true
responses:
'200':
content:
application/json:
example:
errors: []
messages: []
result: null
success: true
schema:
allOf:
- $ref: '#/components/schemas/r2-data-catalog_api-response-single'
- properties:
result:
type:
- object
- 'null'
type: object
description: Credentials stored successfully.
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/r2-data-catalog_api-response-common-failure'
description: Bad request.
'401':
content:
application/json:
schema:
$ref: '#/components/schemas/r2-data-catalog_api-response-common-failure'
description: Authentication failed.
'403':
content:
application/json:
schema:
$ref: '#/components/schemas/r2-data-catalog_api-response-common-failure'
description: Forbidden.
'404':
content:
application/json:
schema:
$ref: '#/components/schemas/r2-data-catalog_api-response-common-failure'
description: Catalog not found.
'500':
content:
application/json:
schema:
$ref: '#/components/schemas/r2-data-catalog_api-response-common-failure'
description: Internal server error.
security:
- api_token: []
- api_email: []
api_key: []
summary: Store catalog credentials
tags:
- Credential Management
x-api-token-group:
- Workers R2 Data Catalog Write
components:
schemas:
r2-data-catalog_api-response-success:
description: Indicates whether the API call was successful.
example: true
type: boolean
r2-data-catalog_api-response-single:
properties:
errors:
$ref: '#/components/schemas/r2-data-catalog_api-response-errors'
messages:
$ref: '#/components/schemas/r2-data-catalog_api-response-messages'
success:
$ref: '#/components/schemas/r2-data-catalog_api-response-success'
required:
- success
- errors
- messages
type: object
r2-data-catalog_account-id:
description: Use this to identify the account.
example: 0123456789abcdef0123456789abcdef
pattern: ^[a-fA-F0-9]{32}$
type: string
r2-data-catalog_api-response-errors:
description: Contains errors if the API call was unsuccessful.
items:
properties:
code:
description: Specifies the error code.
type: integer
message:
description: Describes the error.
type: string
required:
- code
- message
type: object
type: array
r2-data-catalog_catalog-credential-request:
description: Contains request to store catalog credentials.
properties:
token:
description: Provides the Cloudflare API token for accessing R2.
example: your-cloudflare-api-token-here
type: string
required:
- token
type: object
r2-data-catalog_api-response-messages:
description: Contains informational messages.
items:
properties:
code:
description: Specifies the message code.
type: integer
message:
description: Contains the message text.
type: string
required:
- code
- message
type: object
type: array
r2-data-catalog_bucket-name:
description: Specifies the R2 bucket name.
example: my-data-bucket
maxLength: 63
minLength: 3
pattern: ^[a-z0-9]([a-z0-9\-]*[a-z0-9])?$
type: string
r2-data-catalog_api-response-common-failure:
properties:
errors:
items:
properties:
code:
type: integer
message:
type: string
type: object
minItems: 1
type: array
messages:
items:
type: object
type: array
success:
enum:
- false
type: boolean
type: object
securitySchemes:
api_email:
in: header
name: X-Auth-Email
type: apiKey
api_key:
in: header
name: X-Auth-Key
type: apiKey
api_token:
scheme: bearer
type: http
user_service_key:
in: header
name: X-Auth-User-Service-Key
type: apiKey