Cloudflare Workflows API

Cloudflare Workflows enables developers to build durable, multi-step applications on Workers that automatically retry failed tasks and persist state for minutes, hours, or weeks. The API provides endpoints for creating, managing, and monitoring workflow instances with support for step functions, sleep, and event-driven execution.

GitHub OpenAPI

Operations 27

Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay

DELETE /accounts/{account_id}/triggers/{script_name} Delete a Worker script's event triggers · Delete script triggers #
Ask an LLM
“How do I remove all event triggers from a Worker script?”
“Can I clear a script's trigger declarations?”
Tell an agent destructive · confirm first
Delete all event triggers on script {script_name} in account {account_id}.
Clear the trigger declarations for {script_name}.
GET /accounts/{account_id}/triggers/{script_name} Get a Worker script's event triggers · Get script triggers #
Ask an LLM
“Which event triggers are declared on a Worker script?”
“Can I see the trigger declarations for one script?”
Tell an agent
Show the event triggers for script {script_name} in account {account_id}.
List the trigger declarations on {script_name}.
PATCH /accounts/{account_id}/triggers/{script_name} Add event triggers to a Worker script · Add script triggers #
Ask an LLM
“How do I add new event triggers to a Worker script without touching the existing ones?”
“Can I append trigger declarations to a script?”
Tell an agent
Add new event triggers to script {script_name} in account {account_id} without removing the old ones.
Append trigger declarations to {script_name}.
PUT /accounts/{account_id}/triggers/{script_name} Replace a Worker script's event triggers · Replace script triggers #
Ask an LLM
“How do I overwrite all event triggers on a Worker script?”
“Can I replace a script's trigger declarations entirely?”
Tell an agent
Replace every event trigger on script {script_name} in account {account_id}.
Overwrite the trigger declarations for {script_name}.
GET /accounts/{account_id}/workflows List Workflows in an account · List all Workflows #
Ask an LLM
“Which Workflows are configured in my account?”
“Can I search Workflows by name?”
Tell an agent
List all Workflows in account {account_id}.
Find Workflows in {account_id} whose name matches {search}.
GET /accounts/{account_id}/workflows/settings Get account Workflows settings · Get account settings #
Ask an LLM
“What default instance retention does my account use for Workflows?”
“Can I read the account-level Workflows settings?”
Tell an agent
Show the Workflows settings for account {account_id}.
Get the account-level Workflows settings.
PATCH /accounts/{account_id}/workflows/settings Update account Workflows settings · Update account settings #
Ask an LLM
“How do I change the default instance retention for Workflows?”
“Can I update only some account Workflows settings?”
Tell an agent
Update the Workflows settings in account {account_id} with default retention {default_retention}.
Change the account Workflows settings.
DELETE /accounts/{account_id}/workflows/{workflow_name} Delete a Workflow · Deletes a Workflow #
Ask an LLM
“How do I delete a Workflow?”
“Does deleting a Workflow also delete the Worker it runs?”
Tell an agent destructive · confirm first
Delete Workflow {workflow_name} in account {account_id}.
Remove the {workflow_name} Workflow.
GET /accounts/{account_id}/workflows/{workflow_name} Get a Workflow's configuration · Get Workflow details #
Ask an LLM
“What is the configuration of a specific Workflow?”
“Can I see the metadata for one Workflow?”
Tell an agent
Show the configuration of Workflow {workflow_name} in account {account_id}.
Get the metadata for {workflow_name}.
PUT /accounts/{account_id}/workflows/{workflow_name} Create or update a Workflow · Create/modify Workflow #
Ask an LLM
“How do I create a new Workflow that runs a Worker script?”
“Can I change a Workflow's concurrency or schedules?”
Tell an agent
Create Workflow {workflow_name} in account {account_id} running script {script_name}.
Update {workflow_name} to run {script_name} with concurrency {concurrency}.
GET /accounts/{account_id}/workflows/{workflow_name}/instances List a Workflow's instances · List of workflow instances #
Ask an LLM
“Which instances of a Workflow are running or have run?”
“Can I filter a Workflow's instances by status or date?”
Tell an agent
List instances of Workflow {workflow_name} in account {account_id}.
Show {workflow_name} instances with status {status}.
POST /accounts/{account_id}/workflows/{workflow_name}/instances Start a new Workflow instance · Create a new workflow instance #
Ask an LLM
“How do I kick off a new instance of a Workflow?”
“Can I pass parameters into a new Workflow instance?”
Tell an agent
Start a new instance of Workflow {workflow_name} in account {account_id}.
Run {workflow_name} with parameters {params}.
POST /accounts/{account_id}/workflows/{workflow_name}/instances/batch Start many Workflow instances at once · Batch create new Workflow instances #
Ask an LLM
“How do I start a batch of Workflow instances in one call?”
“Can I create several Workflow instances in a single request?”
Tell an agent
Create a batch of new instances for Workflow {workflow_name} in account {account_id}.
Start many {workflow_name} instances at once.
POST /accounts/{account_id}/workflows/{workflow_name}/instances/batch/delete Delete many Workflow instances at once · Batch delete instances of a workflow #
Ask an LLM
“How do I delete several Workflow instances in one batch?”
“Can I remove a list of Workflow instances together?”
Tell an agent destructive · confirm first
Delete instances {instances} of Workflow {workflow_name} in account {account_id}.
Batch-remove {workflow_name} instances {instances}.
POST /accounts/{account_id}/workflows/{workflow_name}/instances/batch/terminate Batch terminate several workflow instances · Batch terminate instances of a workflow #
Ask an LLM
“Can I stop many workflow runs at once rather than one by one?”
“How do I terminate several instances of a workflow in one request?”
Tell an agent destructive · confirm first
Batch terminate all instances of workflow {workflow}.
Stop every running instance of {workflow} in account {account}.
GET /accounts/{account_id}/workflows/{workflow_name}/instances/terminate Check a batch Workflow instance termination job · Get status of the job responsible for terminate all instances of a workflow #
Ask an LLM
“Has the bulk termination of a Workflow's instances finished?”
“Can I check the status of a batch Workflow instance termination?”
Tell an agent
Check the status of the bulk termination job for Workflow {workflow_name} in account {account_id}.
Show the instance termination job status for {workflow_name}.
DELETE /accounts/{account_id}/workflows/{workflow_name}/instances/{instance_id} Delete a Workflow instance · Delete a workflow instance #
Ask an LLM
“How do I delete a Workflow instance and its stored state?”
“Can I remove one instance of a Workflow?”
Tell an agent destructive · confirm first
Delete instance {instance_id} of Workflow {workflow_name} in account {account_id}.
Remove the {workflow_name} instance {instance_id}.
GET /accounts/{account_id}/workflows/{workflow_name}/instances/{instance_id} Get a Workflow instance's logs and status · Get logs and status from instance #
Ask an LLM
“What is the current status of a Workflow instance?”
“Can I see the logs for one Workflow instance?”
Tell an agent
Show the status and logs of instance {instance_id} of Workflow {workflow_name} in account {account_id}.
Get the execution status of {workflow_name} instance {instance_id}.
POST /accounts/{account_id}/workflows/{workflow_name}/instances/{instance_id}/events/{event_type} Send an event to a Workflow instance · Send event to instance #
Ask an LLM
“How do I send an event to a running Workflow instance to trigger a state transition?”
“Can I resume a paused Workflow instance with an event?”
Tell an agent
Send event {event_type} to instance {instance_id} of Workflow {workflow_name} in account {account_id}.
Trigger a state transition on {workflow_name} instance {instance_id} with {event_type}.
PATCH /accounts/{account_id}/workflows/{workflow_name}/instances/{instance_id}/status Pause, resume or terminate a Workflow instance · Change status of instance #
Ask an LLM
“How do I pause or resume a running Workflow instance?”
“Can I terminate a Workflow instance by changing its status?”
Tell an agent
Change the status of instance {instance_id} of Workflow {workflow_name} in account {account_id}.
Pause or resume {workflow_name} instance {instance_id}.
GET /accounts/{account_id}/workflows/{workflow_name}/instances/{instance_id}/step Get full output of a workflow instance step · Get full step output from instance #
Ask an LLM
“How do I see the full, untruncated output of one step in a workflow run?”
“Can I tell whether a workflow step is still retrying after a failed attempt?”
Tell an agent
Show step {name} of type {type} in run {instance_id} of workflow {workflow_name} in account {account_id}.
Get the full output of step {name} of type {type} on attempt {attempt} for run {instance_id} of {workflow_name} in account {account_id}.
GET /accounts/{account_id}/workflows/{workflow_name}/instances/{instance_id}/subscribe Stream events for a workflow run · Subscribe to workflow instance events #
Ask an LLM
“Can I watch a workflow run in real time over a WebSocket?”
“How do I only get certain types of events from a workflow run?”
Tell an agent
Stream events for {workflow} run {instance} in account {account}.
Listen to {workflow} run {instance} for events matching {filter}.
GET /accounts/{account_id}/workflows/{workflow_name}/instances/{instance_id}/subscribe/token Create a token to stream events for a run · Create a workflow instance event subscription token #
Ask an LLM
“How do I get a short-lived token to connect a WebSocket to a workflow run?”
“Can I share a token that lets someone watch one workflow run?”
Tell an agent
Create an event subscription token for {workflow} run {instance}.
Generate a short-lived token to watch workflow run {instance} in account {account}.
GET /accounts/{account_id}/workflows/{workflow_name}/versions List deployed versions of a workflow · List deployed Workflow versions #
Ask an LLM
“Which versions of a workflow are deployed to production?”
“Can I list the older deployed versions of a workflow?”
Tell an agent
List all deployed versions of workflow {workflow}.
Show the first {per_page} versions of {workflow} in account {account}.
GET /accounts/{account_id}/workflows/{workflow_name}/versions/{version_id} Get a deployed workflow version's details · Get Workflow version details #
Ask an LLM
“What does a specific deployed version of a workflow contain?”
“How do I look up one version of a workflow's details by its ID?”
Tell an agent
Show details of version {version} of {workflow}.
Describe deployed version {version} of workflow {workflow} in account {account}.
GET /accounts/{account_id}/workflows/{workflow_name}/versions/{version_id}/dag Get the DAG of a workflow version · Get Workflow version dag #
Ask an LLM
“What is the directed acyclic graph of a workflow's steps?”
“Can I see how the steps in a workflow version depend on each other?”
Tell an agent
Get the DAG of version {version} of {workflow}.
Show the dependency graph of workflow {workflow} version {version} in account {account}.
GET /accounts/{account_id}/workflows/{workflow_name}/versions/{version_id}/graph Get a visual graph of a workflow version · Get Workflow version graph #
Ask an LLM
“Can I see a visual diagram of a workflow's steps?”
“Is there a graph representation of a workflow version?”
Tell an agent
Show the graph visualization of version {version} of {workflow}.
Render a diagram of workflow {workflow} version {version} in account {account}.

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/cloudflare:cloudflare-workflows-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

cloudflare-workflows-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  description: Welcome to Cloudflare's API documentation site.
  license:
    name: BSD-3-Clause
    url: https://opensource.org/licenses/BSD-3-Clause
  title: Cloudflare Workflows API
  version: 4.0.0
servers:
- description: Client API
  url: https://api.cloudflare.com/client/v4
security:
- api_email: []
  api_key: []
- api_token: []
- user_service_key: []
tags:


# --- truncated at 32 KB (272 KB total) ---
# Full source: https://artifacts.apis.io/cloudflare/openapi/cloudflare-workflows-api-openapi.yml