How AI is applied across API Evangelist and APIs.io. Read my AI disclosure →
API Evangelist API Evangelist
Discovery
Learnings
Guidance
Toolbox
Alignment
API Evangelist LLC

Cloudflare D1 D1 API

The D1 API from Cloudflare D1 — 8 operation(s) for d1.

Cloudflare D1 D1 API is published by Cloudflare D1 on the APIs.io network, described by a machine-readable OpenAPI specification.

Tagged areas include D1. The published artifact set on APIs.io includes an OpenAPI specification, API documentation, and authentication docs.

This API exposes 12 operations across 8 paths, and defines 31 schemas. It is described by OpenAPI 3.2.0, at version 4.0.0.

Requests are made against a single base URL, https://api.cloudflare.com/client/v4.

12 operations 8 paths 31 schemas 1 DELETE3 GET1 PATCH6 POST1 PUT

Metadata

The identity and technical contract details declared by the specification.

Specification
OpenAPI 3.2.0
API Version
4.0.0
Base URL
https://api.cloudflare.com/client/v4
Authentication
API Key, API Key, HTTP Bearer, API Key
Resource Areas
1

Authentication & Security 4

Cloudflare D1 D1 API declares 4 security schemes for authenticating requests. An API key is passed in the header as X-Auth-Email (api_email). An API key is passed in the header as X-Auth-Key (api_key). It accepts HTTP bearer tokens (api_token). An API key is passed in the header as X-Auth-User-Service-Key (user_service_key). By default, every request must be authenticated.

Paths & Operations 12

Across 8 paths, the API surfaces 12 operations — 1 DELETE, 3 GET, 1 PATCH, 6 POST, 1 PUT. Each is listed below with its method, path, parameters, and response codes.

D1 12
GET
/accounts/{account_id}/d1/database
List D1 Databases
d1-list-databases 4 params → 4XX200
POST
/accounts/{account_id}/d1/database
Create D1 Database
d1-create-database 1 param body → 4XX200
DELETE
/accounts/{account_id}/d1/database/{database_id}
Delete D1 Database
d1-delete-database 2 params → 4XX200
GET
/accounts/{account_id}/d1/database/{database_id}
Get D1 Database
d1-get-database 3 params → 4XX200
PATCH
/accounts/{account_id}/d1/database/{database_id}
Update D1 Database partially
d1-update-partial-database 2 params body → 4XX200
PUT
/accounts/{account_id}/d1/database/{database_id}
Update D1 Database
d1-update-database 2 params body → 4XX200
POST
/accounts/{account_id}/d1/database/{database_id}/export
Export D1 Database as SQL
d1-export-database 2 params body → 4XX200202
POST
/accounts/{account_id}/d1/database/{database_id}/import
Import SQL into your D1 Database
d1-import-database 2 params body → 4XX200202
POST
/accounts/{account_id}/d1/database/{database_id}/query
Query D1 Database
d1-query-database 2 params body → 4XX200
POST
/accounts/{account_id}/d1/database/{database_id}/raw
Raw D1 Database query
d1-raw-database-query 2 params body → 4XX200
GET
/accounts/{account_id}/d1/database/{database_id}/time_travel/bookmark
Get D1 database bookmark
d1-time-travel-get-bookmark 3 params → 4XX200
POST
/accounts/{account_id}/d1/database/{database_id}/time_travel/restore
Restore D1 Database to a bookmark or point in time
d1-time-travel-restore 4 params → 4XX200

Schemas 31

The contract defines 31 schemas that model the data the API accepts and returns. The most detailed are d1_query-meta (11 properties), d1_database-details-response (8 properties), d1_database-response (5 properties), d1_api-response-common (4 properties). Each schema is shown below with its type and property counts.

d1_messages
array
d1_primary-location-hint
string
Specify the region to create the D1 primary, if available. If this option is omitted, the D1 will be created as close as possible to the current user.
d1_served-by-region
string
Region location hint of the database instance that handled the query.
d1_database-name
string
D1 database name.
d1_created-at
string
Specifies the timestamp the resource was created as an ISO8601 string.
d1_time-travel-bookmark
string
A bookmark representing a specific state of the database at a specific point in time.
d1_database-version
string
d1_read-replication-details-for-request
object
Configuration for D1 read replication.
1 property 1 required
d1_account-identifier
string
Account identifier tag.
d1_api-response-common-failure
object
4 properties 4 required
d1_database-details-response
object
The details of the D1 database.
8 properties
d1_query-result-response
object
3 properties
d1_database-update-request-body
object
1 property 1 required
d1_served-by-colo
string
The three letters airport code of the colo that handled the query.
d1_batch-query
A single query object or a batch query object
d1_database-response
object
5 properties
d1_database-identifier
string
D1 database identifier (UUID).
d1_query-meta
object
11 properties
d1_time-travel-timestamp
string
An ISO 8601 timestamp used for time travel operations. The database will be restored to the nearest available bookmark at or before this timestamp.
d1_file-size
number
The D1 database's size, in bytes.
d1_jurisdiction
string
Specify the location to restrict the D1 database to run and store data. If this option is present, the location hint is ignored.
d1_jurisdiction-nullable
stringnull
Specify the location to restrict the D1 database to run and store data. If this option is present, the location hint is ignored.
d1_api-response-common
object
4 properties 4 required
d1_params
array
d1_table-count
number
d1_single-query
object
A single query with or without parameters
2 properties 1 required
d1_sql
string
Your SQL query. Supports multiple statements, joined by semicolons, which will be executed as a batch.
d1_time-travel-restore-response
object
Response from a time travel restore operation.
3 properties
d1_database-update-partial-request-body
object
1 property
d1_read-replication-details-for-response
object
Configuration for D1 read replication.
1 property 1 required
d1_raw-result-response
object
3 properties

Specification

The full machine-readable OpenAPI contract behind this narrative.

Source

cloudflare-d1-d1-api-openapi.yml Raw ↑
Where this information came from

This is an independent, third-party profile of Cloudflare D1 D1 API, published by API Evangelist. We do not operate, host, resell, or support these APIs, and we are not affiliated with or endorsed by the company unless stated above. Everything here is built from publicly available information — the company's own site, developer portal, documentation, public repositories, and the specifications it publishes for public use. Nothing is obtained by breaching a system, defeating an access control, or using credentials.

The Kin Score and Agent Readiness rating are independently calculated assessments of a company's public API artifacts, scored against a published rubric. They are not certifications, endorsements, security assessments, or audits.

Corrections, re-scores, and removal are free — no partnership or purchase required, and you do not need to justify the request. A removed company is recorded as unrated, never scored zero for having asked. Acknowledgement within one business day; removal within two.

info@apievangelist.com · Read the full data-sourcing policy →
On a security or compliance team? Put security in the subject line and you will get a person, not a form — we will tell you exactly which public URLs this profile was built from.