Lodol Docs

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

ParameterTypeRequiredDescription
zone_idstringYesThe unique identifier of the zone
record_typestringYesThe DNS record type (e.g., A, AAAA, CNAME, TXT, MX)
namestringYesThe DNS record name (e.g., subdomain or @ for root)
contentstringYesThe DNS record content (e.g., IP address or target domain)
ttlnumberNo[Optional] Time to live in seconds (1 for automatic)
proxiedbooleanNo[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

ParameterTypeRequiredDescription
zone_idstringYesThe 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

ParameterTypeRequiredDescription
namestringNo[Optional] Filter zones by domain name
statusstringNo[Optional] Filter zones by status (e.g., active, pending)
pagenumberNo[Optional] Page number for pagination (default: 1)
per_pagenumberNo[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

ParameterTypeRequiredDescription
zone_idstringYesThe unique identifier of the zone
filesarrayNo[Optional] List of URLs to purge from cache
purge_everythingbooleanNo[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

ParameterTypeRequiredDescription
zone_idstringYesThe unique identifier of the zone
enablebooleanYesSet 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

ParameterTypeRequiredDescription
zone_idstringYesThe unique identifier of the zone
record_idstringYesThe unique identifier of the DNS record to update
record_typestringYesThe DNS record type (e.g., A, AAAA, CNAME, TXT, MX)
namestringYesThe DNS record name (e.g., subdomain or @ for root)
contentstringYesThe DNS record content (e.g., IP address or target domain)
ttlnumberNo[Optional] Time to live in seconds (1 for automatic)
proxiedbooleanNo[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"
}

On this page