Cloudflare
API actions for the Cloudflare integration.
Cloudflare
Manage DNS, purge cache, and control development mode directly from Cloudflare.
Create DNS record
Create a new DNS record in a Cloudflare zone.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
zone_id | string | Yes | The unique identifier of the zone |
record_type | string | Yes | The DNS record type (e.g., A, AAAA, CNAME, TXT, MX) |
name | string | Yes | The DNS record name (e.g., subdomain or @ for root) |
content | string | Yes | The DNS record content (e.g., IP address or target domain) |
ttl | number | No | [Optional] Time to live in seconds (1 for automatic) |
proxied | boolean | No | [Optional] Whether the record is proxied through Cloudflare |
Response
{
"content": "192.0.2.1",
"id": "mock_record_id",
"name": "example.com",
"proxied": false,
"type": "A"
}Get zone details
Retrieve detailed information about a specific Cloudflare zone.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
zone_id | string | Yes | The unique identifier of the zone |
Response
{
"id": "mock_zone_id",
"name": "example.com",
"plan": "Free",
"status": "active"
}List zones
List all Cloudflare zones with optional filtering by name and status.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
name | string | No | [Optional] Filter zones by domain name |
status | string | No | [Optional] Filter zones by status (e.g., active, pending) |
page | number | No | [Optional] Page number for pagination (default: 1) |
per_page | number | No | [Optional] Number of zones per page (default: 20) |
Response
{
"count": 1,
"zones": [
{
"id": "mock_zone_id",
"name": "example.com",
"status": "active"
}
]
}Purge cache
Purge cached content from a Cloudflare zone, either specific files or everything.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
zone_id | string | Yes | The unique identifier of the zone |
files | array | No | [Optional] List of URLs to purge from cache |
purge_everything | boolean | No | [Optional] Set to true to purge all cached content (default: false) |
Response
{
"purge_everything": false,
"status": "ok"
}Toggle development mode
Enable or disable development mode for a Cloudflare zone.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
zone_id | string | Yes | The unique identifier of the zone |
enable | boolean | Yes | Set to true to enable development mode, false to disable |
Response
{
"enabled": true
}Update DNS record
Update an existing DNS record in a Cloudflare zone.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
zone_id | string | Yes | The unique identifier of the zone |
record_id | string | Yes | The unique identifier of the DNS record to update |
record_type | string | Yes | The DNS record type (e.g., A, AAAA, CNAME, TXT, MX) |
name | string | Yes | The DNS record name (e.g., subdomain or @ for root) |
content | string | Yes | The DNS record content (e.g., IP address or target domain) |
ttl | number | No | [Optional] Time to live in seconds (1 for automatic) |
proxied | boolean | No | [Optional] Whether the record is proxied through Cloudflare |
Response
{
"content": "192.0.2.1",
"id": "mock_record_id",
"name": "example.com",
"proxied": false,
"type": "A"
}