Developer tools
Cloudflare in your product and your AI agents, through one API
The Cloudflare toolkit covers the zones, DNS records and cache of a Cloudflare account: list, add and pause zones, create, change and delete DNS records, and purge cached content. Through Connect, your product or AI agent calls them with one endpoint, while Connect stores the API token and logs every execution.
15 days to try it. No credit card.
POST https://connect.reportei.com/api/tools/cloudflare_create_zone/execute
Authorization: Bearer <merchant token>
x-customer-token: <customer token>
Content-Type: application/json
Accept: application/json
{
"customer_toolkit": "<connection UUID>",
"arguments": {
"name": "<name>",
"account": {}
}
}How it works
From a connected customer to the first Cloudflare call.
- 1
Your customer connects the account
Your system opens a Connect session for the toolkit and your customer connects their Cloudflare account. You get the connection id.
- 2
Your product calls the tool
A POST to /api/tools/{tool}/execute with the connection id and arguments. On success, Connect preserves the app's response status and body.
- 3
Connect handles the rest
It stores the credential encrypted, renews tokens for OAuth connections that support renewal and records executions in an audit trail available through the API.
Use cases
What your product does with Cloudflare.
Custom domains for your users
When a customer connects their domain, add the zone, show the name_servers to set at the registrar, and create the DNS records your product needs.
DNS changes by an AI agent
An agent lists the records of a zone, creates or updates a CNAME or A record, and deletes the old one once a migration is done.
Purge cache after a publish
After your product publishes new content, purge the affected files, tags, hosts or prefixes of the customer's zone so visitors get the fresh version.
Tools
8 Cloudflare tools
- List zonesGETLists the zones (domains) the token reaches, with id, name, status, name_servers, plan and account. The id is the zone_id the other tools take. Paginate with page and per_page; result_info.total_pages tells how many pages there are.
- Create zonePOSTAdds a domain to a Cloudflare account and returns the zone in pending status, with the name_servers to set at the domain registrar. The zone becomes active once the registrar points to them.
- Update zonePATCHPauses or resumes Cloudflare on a zone and returns it. With paused true the zone keeps only the DNS, without the security and performance features of Cloudflare.
- List DNS recordsGETLists the DNS records of a zone, with id, type, name, content, proxied, ttl and comment. Filters work together unless match is any. Paginate with page and per_page; result_info.total_pages tells how many pages there are.
- Create DNS recordPOSTCreates a DNS record in a zone and returns it, with its id. A and AAAA records cannot share a name with a CNAME, and an NS record cannot share a name with any other record.
- Update DNS recordPATCHChanges a DNS record and returns it. Only the fields sent change. A and AAAA records cannot share a name with a CNAME, and an NS record cannot share a name with any other record.
- Delete DNS recordDELETEDeletes a DNS record of a zone and returns its id. The change reaches DNS answers right away and cannot be undone.
- Purge cachePOSTRemoves cached content of a zone from every Cloudflare data center; the next request for it goes to the origin. Send exactly one of files, tags, hosts, prefixes or purge_everything. A success means the request was accepted, not that anything was cached. How many items fit in one call depends on the plan.
API key
Your customer pastes the app's key on a Connect screen, or your system sends the key with POST /api/customer-toolkits, with no screen.
Questions about the Cloudflare toolkit
Do I need to build against the Cloudflare API?
No. Connect ships 8 Cloudflare tools, described and ready. Your customer connects the account and your system calls every tool through the same endpoint, with the same request format.
How does my customer connect their Cloudflare account?
With the mode the toolkit accepts: API key. Connect stores the credential encrypted and never returns it to your system.
Does it work with AI agents?
Yes. Each tool's input is described in JSON Schema, which your agent uses directly as a tool definition. The agent picks the tool and the arguments, and your system makes the call to Connect.
Does my customer need a Reportei account?
No. Your customer connects the account on a Connect screen, or your system sends the credential through the API, and they keep using only your product.
Toolkits in the same category
See all 100 toolkitsSee Connect applied to your product.
Try it for 15 days with no card, or walk our team through your use case.
