Cloudflare
API actions for the Cloudflare integration.
Cloudflare
Manage DNS records, clear cached content, and turn development mode on or off for your Cloudflare sites.
Create DNS record
Create a new DNS record in a Cloudflare zone.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
zone_id | string | Yes | The ID 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 (for example, a subdomain like www, or @ for the root domain) |
content | string | Yes | What the record points to (for example, an IP address or a domain name) |
ttl | number | No | [Optional] How long DNS servers keep this record before refreshing, in seconds (1 for automatic) |
proxied | boolean | No | [Optional] Set to true to route traffic through Cloudflare, or false for DNS only |
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 ID of the zone |
Response
{
"id": "mock_zone_id",
"name": "example.com",
"plan": "Free",
"status": "active"
}List zones
List the zones (websites) in your Cloudflare account, with optional filters by domain 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] Which page of results to return (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
Clear cached content from a Cloudflare zone, either specific files or everything.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
zone_id | string | Yes | The ID of the zone |
files | array | No | [Optional] The URLs to clear from the cache |
purge_everything | boolean | No | [Optional] Set to true to clear all cached content (default: false) |
Response
{
"purge_everything": false,
"status": "ok"
}Turn development mode on or off
Turn development mode on or off for a Cloudflare zone. Development mode temporarily bypasses the cache so site changes show up right away.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
zone_id | string | Yes | The ID 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 ID of the zone |
record_id | string | Yes | The ID 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 (for example, a subdomain like www, or @ for the root domain) |
content | string | Yes | What the record points to (for example, an IP address or a domain name) |
ttl | number | No | [Optional] How long DNS servers keep this record before refreshing, in seconds (1 for automatic) |
proxied | boolean | No | [Optional] Set to true to route traffic through Cloudflare, or false for DNS only |
Response
{
"content": "192.0.2.1",
"id": "mock_record_id",
"name": "example.com",
"proxied": false,
"type": "A"
}