();
let instance = await env.MY_WORKFLOW.get(instanceId); // Send our event, with `type` matching the event type defined in // our step.waitForEvent call await instance.sendEvent({ type: "stripe-webhook", payload: webhookPayload, });
return Response.json({ status: await instance.status(), }); },};
You can call `sendEvent` multiple times, setting the value of the `type` property to match the specific `waitForEvent` calls in your Workflow.
This allows you to wait for multiple events at once, or use `Promise.race` to wait for multiple events and allow the first event to progress the Workflow.
### InstanceStatus
[](https://developers.cloudflare.com/workflows/build/workers-api/#instancestatus)
Details the status of a Workflow instance.
type InstanceStatus = { status: | "queued" // means that instance is waiting to be started (see concurrency limits) | "running" | "paused" | "errored" | "terminated" // user terminated the instance while it was running | "complete" | "waiting" // instance is hibernating and waiting for sleep or event to finish | "waitingForPause" // instance is finishing the current work to pause | "unknown"; error?: { name: string, message: string }; output?: unknown;};
Was this helpful?
-----------------
* **Resources**
* [API](https://developers.cloudflare.com/api/)
* [New to Cloudflare?](https://developers.cloudflare.com/fundamentals/)
* [Directory](https://developers.cloudflare.com/directory/)
* [Sponsorships](https://developers.cloudflare.com/sponsorships/)
* [Open Source](https://github.com/cloudflare)
* **Support**
* [Help Center](https://support.cloudflare.com/)
* [System Status](https://www.cloudflarestatus.com/)
* [Compliance](https://www.cloudflare.com/trust-hub/compliance-resources/)
* [GDPR](https://www.cloudflare.com/trust-hub/gdpr/)
* **Company**
* [cloudflare.com](https://www.cloudflare.com/)
* [Our team](https://www.cloudflare.com/people/)
* [Careers](https://www.cloudflare.com/careers/)
* **Tools**
* [Cloudflare Radar](https://radar.cloudflare.com/)
* [Speed Test](https://speed.cloudflare.com/)
* [Is BGP Safe Yet?](https://isbgpsafeyet.com/)
* [RPKI Toolkit](https://rpki.cloudflare.com/)
* [Certificate Transparency](https://ct.cloudflare.com/)
* **Community**
* [X](https://x.com/cloudflare)
* [Discord](http://discord.cloudflare.com/)
* [YouTube](https://www.youtube.com/cloudflare)
* [GitHub](https://github.com/cloudflare/cloudflare-docs)
* © 2026 Cloudflare, Inc.
* [Privacy Policy](https://www.cloudflare.com/privacypolicy/)
* [Terms of Use](https://www.cloudflare.com/website-terms/)
* [Report Security Issues](https://www.cloudflare.com/disclosure/)
* [Trademark](https://www.cloudflare.com/trademark/)
*  Cookie Settings
Back to top
---
# Integrate Workflows with Twilio · Cloudflare Workflows docs
[Skip to content](https://developers.cloudflare.com/workflows/examples/twilio/#_top)
Copy page
Integrate Workflows with Twilio
===============================
Integrate Workflows with Twilio. Learn how to receive and send text messages and phone calls via APIs and Webhooks.
Using the following [repository ↗](https://github.com/craigsdennis/twilio-cloudflare-workflow)
, learn how to integrate Cloudflare Workflows with Twilio, a popular cloud communications platform that enables developers to integrate messaging, voice, video, and authentication features into applications via APIs. By the end of the video tutorial, you will become familiarized with the process of setting up Cloudflare Workflows to seamlessly interact with Twilio's APIs, enabling you to build interesting communication features directly into your applications.
Was this helpful?
-----------------
* **Resources**
* [API](https://developers.cloudflare.com/api/)
* [New to Cloudflare?](https://developers.cloudflare.com/fundamentals/)
* [Directory](https://developers.cloudflare.com/directory/)
* [Sponsorships](https://developers.cloudflare.com/sponsorships/)
* [Open Source](https://github.com/cloudflare)
* **Support**
* [Help Center](https://support.cloudflare.com/)
* [System Status](https://www.cloudflarestatus.com/)
* [Compliance](https://www.cloudflare.com/trust-hub/compliance-resources/)
* [GDPR](https://www.cloudflare.com/trust-hub/gdpr/)
* **Company**
* [cloudflare.com](https://www.cloudflare.com/)
* [Our team](https://www.cloudflare.com/people/)
* [Careers](https://www.cloudflare.com/careers/)
* **Tools**
* [Cloudflare Radar](https://radar.cloudflare.com/)
* [Speed Test](https://speed.cloudflare.com/)
* [Is BGP Safe Yet?](https://isbgpsafeyet.com/)
* [RPKI Toolkit](https://rpki.cloudflare.com/)
* [Certificate Transparency](https://ct.cloudflare.com/)
* **Community**
* [X](https://x.com/cloudflare)
* [Discord](http://discord.cloudflare.com/)
* [YouTube](https://www.youtube.com/cloudflare)
* [GitHub](https://github.com/cloudflare/cloudflare-docs)
* © 2026 Cloudflare, Inc.
* [Privacy Policy](https://www.cloudflare.com/privacypolicy/)
* [Terms of Use](https://www.cloudflare.com/website-terms/)
* [Report Security Issues](https://www.cloudflare.com/disclosure/)
* [Trademark](https://www.cloudflare.com/trademark/)
*  Your Privacy Choices
Back to top
---
# Changelog | Workflows
Changelog | WorkflowsUpdates to Workflowshttps://developers.cloudflare.com/workflows/reference/changelogWorkflows - Test Workflows locallyhttps://developers.cloudflare.com/workflows/reference/changelog/#test-workflows-locallyhttps://developers.cloudflare.com/workflows/reference/changelog/#test-workflows-locallyWorkflows can now be tested with new test APIs available in the "cloudflare:test" module.
More information available in the Vitest integration docs .
Fri, 12 Sep 2025 00:00:00 GMTWorkflows - Python Workflows is now open betahttps://developers.cloudflare.com/workflows/reference/changelog/#python-workflows-is-now-open-betahttps://developers.cloudflare.com/workflows/reference/changelog/#python-workflows-is-now-open-betaPython Workflows is now in open beta, and available to any developer a free or paid Workers plan.
More information available in the changelog .
Fri, 22 Aug 2025 00:00:00 GMTWorkflows - Search for specific Workflowshttps://developers.cloudflare.com/workflows/reference/changelog/#search-for-specific-workflowshttps://developers.cloudflare.com/workflows/reference/changelog/#search-for-specific-workflowsWith this release, you can search Workflows by name via API.
Wed, 07 May 2025 00:00:00 GMTWorkflows - Workflow deletion and morehttps://developers.cloudflare.com/workflows/reference/changelog/#workflow-deletion-and-morehttps://developers.cloudflare.com/workflows/reference/changelog/#workflow-deletion-and-moreWorkflows can now be deleted (from the Dashboard/UI or via API), and the maximum length limit for event types and instance IDs was increased to 100 characters.
Also, this release fixes a bug where a delay of 0 in step config retries would fail.
Tue, 29 Apr 2025 00:00:00 GMTWorkflows - Workflows is now Generally Availablehttps://developers.cloudflare.com/workflows/reference/changelog/#workflows-is-now-generally-availablehttps://developers.cloudflare.com/workflows/reference/changelog/#workflows-is-now-generally-availableWorkflows is now Generally Available (or "GA").
This release includes the following new features:
A new waitForEvent API that allows a Workflow to wait for an event to occur before continuing execution. Increased concurrency: you can run up to 4,500 Workflow instances concurrently — and this will continue to grow. Improved observability, including new CPU time metrics that allow you to better understand which Workflow instances are consuming the most resources and/or contributing to your bill. Support for vitest for testing Workflows locally and in CI/CD pipelines. More information available in the changelog .
Mon, 07 Apr 2025 00:00:00 GMTWorkflows - Concurrent Workflow instances limits increasedhttps://developers.cloudflare.com/workflows/reference/changelog/#concurrent-workflow-instances-limits-increasedhttps://developers.cloudflare.com/workflows/reference/changelog/#concurrent-workflow-instances-limits-increasedWorkflows now supports up to 4,500 concurrent (running) instances, up from the previous limit of 100.
More information available in the changelog .
Tue, 25 Feb 2025 00:00:00 GMTWorkflows - Behavior improvementshttps://developers.cloudflare.com/workflows/reference/changelog/#behavior-improvementshttps://developers.cloudflare.com/workflows/reference/changelog/#behavior-improvementsImproved Workflows execution that prevents Workflows instances from getting stuck, and allows stuck instances to become unstuck.
Also, improved the reliability of Workflows step retry counts, and improved Instance ID validation.
Tue, 11 Feb 2025 00:00:00 GMTWorkflows - Major bugfixes and improvementshttps://developers.cloudflare.com/workflows/reference/changelog/#major-bugfixes-and-improvementshttps://developers.cloudflare.com/workflows/reference/changelog/#major-bugfixes-and-improvementsWith this release, some bug were fixed:
event.timestamp is now Date, fixing a regression. Fixed issue where instances without metadata were not terminated as expected. Also, this release makes Workflows execution more reliable for accounts with high loads.
Thu, 23 Jan 2025 00:00:00 GMTWorkflows - Improved Wrangler local dev experience for steps' output, matching productionhttps://developers.cloudflare.com/workflows/reference/changelog/#improved-wrangler-local-dev-experience-for-steps-output-matching-productionhttps://developers.cloudflare.com/workflows/reference/changelog/#improved-wrangler-local-dev-experience-for-steps-output-matching-productionPreviously, in local dev, the output field would return the list of successful steps outputs in the workflow. This is not expected behavior compared to production workflows (where the output is the actual return of the run function).
This release aligns the local dev output field behavior with the production behavior.
Thu, 09 Jan 2025 00:00:00 GMTWorkflows - Better instance control, improved queued logic, and step limit increasedhttps://developers.cloudflare.com/workflows/reference/changelog/#better-instance-control-improved-queued-logic-and-step-limit-increasedhttps://developers.cloudflare.com/workflows/reference/changelog/#better-instance-control-improved-queued-logic-and-step-limit-increasedWorkflows can now be terminated and pause instances from a queued state and the ID of an instance is now exposed via the WorkflowEvent parameter.
Also, the mechanism to queue instances was improved to force miss-behaved queued instances to be automatically errored.
Workflows now allow you to define up to 1024 steps in a single Workflow definition, up from the previous limit of 512. This limit will continue to increase during the course of the open beta.
Thu, 19 Dec 2024 00:00:00 GMTWorkflows - New queue instances logichttps://developers.cloudflare.com/workflows/reference/changelog/#new-queue-instances-logichttps://developers.cloudflare.com/workflows/reference/changelog/#new-queue-instances-logicIntroduction of a new mechanism to queue instances, which will prevent instances from getting stuck on queued status forever.
Mon, 09 Dec 2024 00:00:00 GMTWorkflows - Step limit increasedhttps://developers.cloudflare.com/workflows/reference/changelog/#step-limit-increasedhttps://developers.cloudflare.com/workflows/reference/changelog/#step-limit-increasedWorkflows now allow you to define up to 512 steps in a single Workflow definition, up from the previous limit of 256. This limit will continue to increase during the course of the open beta.
If you have Workflows that need more steps, we recommend delegating additional work to other Workflows by triggering a new Workflow from within a step and passing any state as parameters to that Workflow instance .
Sat, 30 Nov 2024 00:00:00 GMTWorkflows - Fixed create instance API in Workers bindingshttps://developers.cloudflare.com/workflows/reference/changelog/#fixed-create-instance-api-in-workers-bindingshttps://developers.cloudflare.com/workflows/reference/changelog/#fixed-create-instance-api-in-workers-bindingsYou can now call create() without any arguments when using the Workers API for Workflows. Workflows will automatically generate the ID of the Workflow on your behalf.
This addresses a bug that caused calls to create() to fail when provided with no arguments.
Thu, 21 Nov 2024 00:00:00 GMTWorkflows - Multiple Workflows in local development now supportedhttps://developers.cloudflare.com/workflows/reference/changelog/#multiple-workflows-in-local-development-now-supportedhttps://developers.cloudflare.com/workflows/reference/changelog/#multiple-workflows-in-local-development-now-supportedLocal development with wrangler dev now correctly supports multiple Workflow definitions per script.
There is no change to production Workflows, where multiple Workflow definitions per Worker script was already supported.
Wed, 20 Nov 2024 00:00:00 GMTWorkflows - Workflows is now in public beta!https://developers.cloudflare.com/workflows/reference/changelog/#workflows-is-now-in-public-betahttps://developers.cloudflare.com/workflows/reference/changelog/#workflows-is-now-in-public-betaWorkflows, a new product for building reliable, multi-step workflows using Cloudflare Workers, is now in public beta. The public beta is available to any user with a free or paid Workers plan .
A Workflow allows you to define multiple, independent steps that encapsulate errors, automatically retry, persist state, and can run for seconds, minutes, hours or even days. A Workflow can be useful for post-processing data from R2 buckets before querying it, automating a Workers AI RAG pipeline, or managing user signup flows and lifecycle emails.
You can learn more about Workflows in our announcement blog , or start building in our get started guide .
Wed, 23 Oct 2024 00:00:00 GMT
Changelog | Workflows
Updates to Workflows
https://developers.cloudflare.com/workflows/reference/changelog
-
Workflows - Test Workflows locally
https://developers.cloudflare.com/workflows/reference/changelog/#test-workflows-locally
https://developers.cloudflare.com/workflows/reference/changelog/#test-workflows-locally
Workflows can now be tested with new test APIs available in the "cloudflare:test" module.
More information available in the Vitest integration docs .
Fri, 12 Sep 2025 00:00:00 GMT
...
-
Workflows - Python Workflows is now open beta
https://developers.cloudflare.com/workflows/reference/changelog/#python-workflows-is-now-open-beta
https://developers.cloudflare.com/workflows/reference/changelog/#python-workflows-is-now-open-beta
Python Workflows is now in open beta, and available to any developer a free or paid Workers plan.
More information available in the changelog .
Fri, 22 Aug 2025 00:00:00 GMT
...
-
Workflows - Search for specific Workflows
https://developers.cloudflare.com/workflows/reference/changelog/#search-for-specific-workflows
https://developers.cloudflare.com/workflows/reference/changelog/#search-for-specific-workflows
With this release, you can search Workflows by name via API.
Wed, 07 May 2025 00:00:00 GMT
...
-
Workflows - Workflow deletion and more
https://developers.cloudflare.com/workflows/reference/changelog/#workflow-deletion-and-more
https://developers.cloudflare.com/workflows/reference/changelog/#workflow-deletion-and-more
Workflows can now be deleted (from the Dashboard/UI or via API), and the maximum length limit for event types and instance IDs was increased to 100 characters.
Also, this release fixes a bug where a delay of 0 in step config retries would fail.
Tue, 29 Apr 2025 00:00:00 GMT
...
-
Workflows - Workflows is now Generally Available
https://developers.cloudflare.com/workflows/reference/changelog/#workflows-is-now-generally-available
https://developers.cloudflare.com/workflows/reference/changelog/#workflows-is-now-generally-available
Workflows is now Generally Available (or "GA").
This release includes the following new features:
A new waitForEvent API that allows a Workflow to wait for an event to occur before continuing execution. Increased concurrency: you can run up to 4,500 Workflow instances concurrently — and this will continue to grow. Improved observability, including new CPU time metrics that allow you to better understand which Workflow instances are consuming the most resources and/or contributing to your bill. Support for vitest for testing Workflows locally and in CI/CD pipelines. More information available in the changelog .
Mon, 07 Apr 2025 00:00:00 GMT
...
-
Workflows - Concurrent Workflow instances limits increased
https://developers.cloudflare.com/workflows/reference/changelog/#concurrent-workflow-instances-limits-increased
https://developers.cloudflare.com/workflows/reference/changelog/#concurrent-workflow-instances-limits-increased
Workflows now supports up to 4,500 concurrent (running) instances, up from the previous limit of 100.
More information available in the changelog .
Tue, 25 Feb 2025 00:00:00 GMT
...
-
Workflows - Behavior improvements
https://developers.cloudflare.com/workflows/reference/changelog/#behavior-improvements
https://developers.cloudflare.com/workflows/reference/changelog/#behavior-improvements
Improved Workflows execution that prevents Workflows instances from getting stuck, and allows stuck instances to become unstuck.
Also, improved the reliability of Workflows step retry counts, and improved Instance ID validation.
Tue, 11 Feb 2025 00:00:00 GMT
...
-
Workflows - Major bugfixes and improvements
https://developers.cloudflare.com/workflows/reference/changelog/#major-bugfixes-and-improvements
https://developers.cloudflare.com/workflows/reference/changelog/#major-bugfixes-and-improvements
With this release, some bug were fixed:
event.timestamp is now Date, fixing a regression. Fixed issue where instances without metadata were not terminated as expected. Also, this release makes Workflows execution more reliable for accounts with high loads.
Thu, 23 Jan 2025 00:00:00 GMT
...
-
Workflows - Improved Wrangler local dev experience for steps' output, matching production
https://developers.cloudflare.com/workflows/reference/changelog/#improved-wrangler-local-dev-experience-for-steps-output-matching-production
https://developers.cloudflare.com/workflows/reference/changelog/#improved-wrangler-local-dev-experience-for-steps-output-matching-production
Previously, in local dev, the output field would return the list of successful steps outputs in the workflow. This is not expected behavior compared to production workflows (where the output is the actual return of the run function).
This release aligns the local dev output field behavior with the production behavior.
Thu, 09 Jan 2025 00:00:00 GMT
...
-
Workflows - Better instance control, improved queued logic, and step limit increased
https://developers.cloudflare.com/workflows/reference/changelog/#better-instance-control-improved-queued-logic-and-step-limit-increased
https://developers.cloudflare.com/workflows/reference/changelog/#better-instance-control-improved-queued-logic-and-step-limit-increased
Workflows can now be terminated and pause instances from a queued state and the ID of an instance is now exposed via the WorkflowEvent parameter.
Also, the mechanism to queue instances was improved to force miss-behaved queued instances to be automatically errored.
Workflows now allow you to define up to 1024 steps in a single Workflow definition, up from the previous limit of 512. This limit will continue to increase during the course of the open beta.
Thu, 19 Dec 2024 00:00:00 GMT
...
-
Workflows - New queue instances logic
https://developers.cloudflare.com/workflows/reference/changelog/#new-queue-instances-logic
https://developers.cloudflare.com/workflows/reference/changelog/#new-queue-instances-logic
Introduction of a new mechanism to queue instances, which will prevent instances from getting stuck on queued status forever.
Mon, 09 Dec 2024 00:00:00 GMT
...
-
Workflows - Step limit increased
https://developers.cloudflare.com/workflows/reference/changelog/#step-limit-increased
https://developers.cloudflare.com/workflows/reference/changelog/#step-limit-increased
Workflows now allow you to define up to 512 steps in a single Workflow definition, up from the previous limit of 256. This limit will continue to increase during the course of the open beta.
If you have Workflows that need more steps, we recommend delegating additional work to other Workflows by triggering a new Workflow from within a step and passing any state as parameters to that Workflow instance .
Sat, 30 Nov 2024 00:00:00 GMT
...
-
Workflows - Fixed create instance API in Workers bindings
https://developers.cloudflare.com/workflows/reference/changelog/#fixed-create-instance-api-in-workers-bindings
https://developers.cloudflare.com/workflows/reference/changelog/#fixed-create-instance-api-in-workers-bindings
You can now call create() without any arguments when using the Workers API for Workflows. Workflows will automatically generate the ID of the Workflow on your behalf.
This addresses a bug that caused calls to create() to fail when provided with no arguments.
Thu, 21 Nov 2024 00:00:00 GMT
...
-
Workflows - Multiple Workflows in local development now supported
https://developers.cloudflare.com/workflows/reference/changelog/#multiple-workflows-in-local-development-now-supported
https://developers.cloudflare.com/workflows/reference/changelog/#multiple-workflows-in-local-development-now-supported
Local development with wrangler dev now correctly supports multiple Workflow definitions per script.
There is no change to production Workflows, where multiple Workflow definitions per Worker script was already supported.
Wed, 20 Nov 2024 00:00:00 GMT
...
-
Workflows - Workflows is now in public beta!
https://developers.cloudflare.com/workflows/reference/changelog/#workflows-is-now-in-public-beta
https://developers.cloudflare.com/workflows/reference/changelog/#workflows-is-now-in-public-beta
Workflows, a new product for building reliable, multi-step workflows using Cloudflare Workers, is now in public beta. The public beta is available to any user with a free or paid Workers plan .
A Workflow allows you to define multiple, independent steps that encapsulate errors, automatically retry, persist state, and can run for seconds, minutes, hours or even days. A Workflow can be useful for post-processing data from R2 buckets before querying it, automating a Workers AI RAG pipeline, or managing user signup flows and lifecycle emails.
You can learn more about Workflows in our announcement blog , or start building in our get started guide .
Wed, 23 Oct 2024 00:00:00 GMT
...
...
...
---
# Cloudflare API | Workflows
[Cloudflare API](https://developers.cloudflare.com/api/)
HTTP
[Docs](https://developers.cloudflare.com/)
SearchCTRL+K
API Reference
[Overview](https://developers.cloudflare.com/api/)
Account & User Management
[Abuse Reports](https://developers.cloudflare.com/api/resources/abuse_reports/)
[Accounts](https://developers.cloudflare.com/api/resources/accounts/)
[Alerting](https://developers.cloudflare.com/api/resources/alerting/)
[Audit Logs](https://developers.cloudflare.com/api/resources/audit_logs/)
[Billing](https://developers.cloudflare.com/api/resources/billing/)
[IAM](https://developers.cloudflare.com/api/resources/iam/)
[Memberships](https://developers.cloudflare.com/api/resources/memberships/)
[Resource Sharing](https://developers.cloudflare.com/api/resources/resource_sharing/)
[User](https://developers.cloudflare.com/api/resources/user/)
[Custom Pages](https://developers.cloudflare.com/api/resources/custom_pages/)
AI
[AI](https://developers.cloudflare.com/api/resources/ai/)
[AI Gateway](https://developers.cloudflare.com/api/resources/ai_gateway/)
[AI Search](https://developers.cloudflare.com/api/resources/ai_search/)
[Vectorize](https://developers.cloudflare.com/api/resources/vectorize/)
Certificate Management
[ACM](https://developers.cloudflare.com/api/resources/acm/)
[Certificate Authorities](https://developers.cloudflare.com/api/resources/certificate_authorities/)
[Client Certificates](https://developers.cloudflare.com/api/resources/client_certificates/)
[Custom Certificates](https://developers.cloudflare.com/api/resources/custom_certificates/)
[Custom Hostnames](https://developers.cloudflare.com/api/resources/custom_hostnames/)
[DCV Delegation](https://developers.cloudflare.com/api/resources/dcv_delegation/)
[Hostnames](https://developers.cloudflare.com/api/resources/hostnames/)
[Keyless Certificates](https://developers.cloudflare.com/api/resources/keyless_certificates/)
[MTLS Certificates](https://developers.cloudflare.com/api/resources/mtls_certificates/)
[Origin CA Certificates](https://developers.cloudflare.com/api/resources/origin_ca_certificates/)
[Origin Post Quantum Encryption](https://developers.cloudflare.com/api/resources/origin_post_quantum_encryption/)
[Origin TLS Client Auth](https://developers.cloudflare.com/api/resources/origin_tls_client_auth/)
[SSL](https://developers.cloudflare.com/api/resources/ssl/)
Cloudflare One
[Email Security](https://developers.cloudflare.com/api/resources/email_security/)
[Zero Trust](https://developers.cloudflare.com/api/resources/zero_trust/)
DNS
[Account Custom Nameservers](https://developers.cloudflare.com/api/resources/custom_nameservers/)
[DNS](https://developers.cloudflare.com/api/resources/dns/)
[DNS Firewall](https://developers.cloudflare.com/api/resources/dns_firewall/)
Domain/Zone Management
[Registrar](https://developers.cloudflare.com/api/resources/registrar/)
[Zones](https://developers.cloudflare.com/api/resources/zones/)
IP Addresses
[Addressing](https://developers.cloudflare.com/api/resources/addressing/)
[IPs](https://developers.cloudflare.com/api/resources/ips/)
Media
[Calls](https://developers.cloudflare.com/api/resources/calls/)
[Images](https://developers.cloudflare.com/api/resources/images/)
[Stream](https://developers.cloudflare.com/api/resources/stream/)
[Realtime Kit](https://developers.cloudflare.com/api/resources/realtime_kit/)
Networking
[Magic Cloud Networking](https://developers.cloudflare.com/api/resources/magic_cloud_networking/)
[Magic Network Monitoring](https://developers.cloudflare.com/api/resources/magic_network_monitoring/)
[Magic Transit](https://developers.cloudflare.com/api/resources/magic_transit/)
[Network Interconnects](https://developers.cloudflare.com/api/resources/network_interconnects/)
Observability
[Diagnostics](https://developers.cloudflare.com/api/resources/diagnostics/)
[Healthchecks](https://developers.cloudflare.com/api/resources/healthchecks/)
[Logpush](https://developers.cloudflare.com/api/resources/logpush/)
[Logs](https://developers.cloudflare.com/api/resources/logs/)
[RUM](https://developers.cloudflare.com/api/resources/rum/)
[Security Center](https://developers.cloudflare.com/api/resources/security_center/)
Radar
[Radar](https://developers.cloudflare.com/api/resources/radar/)
Routing & Performance
[Argo](https://developers.cloudflare.com/api/resources/argo/)
[Cache](https://developers.cloudflare.com/api/resources/cache/)
[Email Routing](https://developers.cloudflare.com/api/resources/email_routing/)
[Load Balancers](https://developers.cloudflare.com/api/resources/load_balancers/)
[Smart Shield](https://developers.cloudflare.com/api/resources/smart_shield/)
[Spectrum](https://developers.cloudflare.com/api/resources/spectrum/)
[Speed](https://developers.cloudflare.com/api/resources/speed/)
[Waiting Rooms](https://developers.cloudflare.com/api/resources/waiting_rooms/)
[Web3](https://developers.cloudflare.com/api/resources/web3/)
Rules
[Cloud Connector](https://developers.cloudflare.com/api/resources/cloud_connector/)
[Managed Transforms](https://developers.cloudflare.com/api/resources/managed_transforms/)
[Page Rules](https://developers.cloudflare.com/api/resources/page_rules/)
[Rules Lists](https://developers.cloudflare.com/api/resources/rules/)
[Rules Trace](https://developers.cloudflare.com/api/resources/request_tracers/)
[Rulesets](https://developers.cloudflare.com/api/resources/rulesets/)
[Snippets](https://developers.cloudflare.com/api/resources/snippets/)
[URL Normalization](https://developers.cloudflare.com/api/resources/url_normalization/)
Security
[API Gateway](https://developers.cloudflare.com/api/resources/api_gateway/)
[Schema Validation](https://developers.cloudflare.com/api/resources/schema_validation/)
[Bot Management](https://developers.cloudflare.com/api/resources/bot_management/)
[Botnet Feed](https://developers.cloudflare.com/api/resources/botnet_feed/)
[Content Scanning](https://developers.cloudflare.com/api/resources/content_scanning/)
[Filters](https://developers.cloudflare.com/api/resources/filters/)
[Firewall](https://developers.cloudflare.com/api/resources/firewall/)
[Fraud](https://developers.cloudflare.com/api/resources/fraud/)
[Leaked Credential Checks](https://developers.cloudflare.com/api/resources/leaked_credential_checks/)
[Page Shield](https://developers.cloudflare.com/api/resources/page_shield/)
[Rate Limits](https://developers.cloudflare.com/api/resources/rate_limits/)
[Security TXT](https://developers.cloudflare.com/api/resources/security_txt/)
[Token Validation](https://developers.cloudflare.com/api/resources/token_validation/)
[Turnstile](https://developers.cloudflare.com/api/resources/turnstile/)
Storage & Databases
[D1](https://developers.cloudflare.com/api/resources/d1/)
[Hyperdrive](https://developers.cloudflare.com/api/resources/hyperdrive/)
[KV](https://developers.cloudflare.com/api/resources/kv/)
[Queues](https://developers.cloudflare.com/api/resources/queues/)
[R2](https://developers.cloudflare.com/api/resources/r2/)
[R2 Data Catalog](https://developers.cloudflare.com/api/resources/r2_data_catalog/)
[Secrets Store](https://developers.cloudflare.com/api/resources/secrets_store/)
[Pipelines](https://developers.cloudflare.com/api/resources/pipelines/)
Threat Intelligence
[Brand Protection](https://developers.cloudflare.com/api/resources/brand_protection/)
[Cloudforce One](https://developers.cloudflare.com/api/resources/cloudforce_one/)
[Intel](https://developers.cloudflare.com/api/resources/intel/)
[URL Scanner](https://developers.cloudflare.com/api/resources/url_scanner/)
Workers & Pages
[Browser Rendering](https://developers.cloudflare.com/api/resources/browser_rendering/)
[Durable Objects](https://developers.cloudflare.com/api/resources/durable_objects/)
[Pages](https://developers.cloudflare.com/api/resources/pages/)
[Workers](https://developers.cloudflare.com/api/resources/workers/)
[Workers Builds](https://developers.cloudflare.com/api/resources/workers_builds/)
[Workers For Platforms](https://developers.cloudflare.com/api/resources/workers_for_platforms/)
[Workflows](https://developers.cloudflare.com/api/resources/workflows/)
[List all Workflows](https://developers.cloudflare.com/api/resources/workflows/methods/list/)
[Get Workflow details](https://developers.cloudflare.com/api/resources/workflows/methods/get/)
[Create/modify Workflow](https://developers.cloudflare.com/api/resources/workflows/methods/update/)
[Deletes a Workflow](https://developers.cloudflare.com/api/resources/workflows/methods/delete/)
* * *
[Instances](https://developers.cloudflare.com/api/resources/workflows/subresources/instances/)
* * *
[Versions](https://developers.cloudflare.com/api/resources/workflows/subresources/versions/)
Shared
[Shared](https://developers.cloudflare.com/api/resources/$shared/)
[Organizations](https://developers.cloudflare.com/api/resources/organizations/)
[Connectivity](https://developers.cloudflare.com/api/resources/connectivity/)
[Zaraz](https://developers.cloudflare.com/api/resources/zaraz/)
[AutoRAG](https://developers.cloudflare.com/api/resources/autorag/)
### Workflows
workflows
Methods
List All Workflows -> V4PagePaginationArray<{ id, class\_name, created\_on, 5 more... }\>
get/accounts/{account\_id}/workflows
List all Workflows
Get Workflow Details -> Envelope<{ id, class\_name, created\_on, 5 more... }\>
get/accounts/{account\_id}/workflows/{workflow\_name}
Get Workflow details
Create Modify Workflow -> Envelope<{ id, class\_name, created\_on, 7 more... }\>
put/accounts/{account\_id}/workflows/{workflow\_name}
Create/modify Workflow
Deletes A Workflow -> Envelope<{ status, success }\>
delete/accounts/{account\_id}/workflows/{workflow\_name}
Deletes a Workflow. This only deletes the Workflow and does not delete or modify any Worker associated to this Workflow or bounded to it.
[Workflows](https://developers.cloudflare.com/api/resources/workflows/)
### Instances
workflows.instances
Methods
List Of Workflow Instances -> V4PagePaginationArray<{ id, created\_on, ended\_on, 5 more... }\>
get/accounts/{account\_id}/workflows/{workflow\_name}/instances
List of workflow instances
Get Logs And Status From Instance -> Envelope<{ end, error, output, 8 more... }\>
get/accounts/{account\_id}/workflows/{workflow\_name}/instances/{instance\_id}
Get logs and status from instance
Create A New Workflow Instance -> Envelope<{ id, status, version\_id, 1 more... }\>
post/accounts/{account\_id}/workflows/{workflow\_name}/instances
Create a new workflow instance
Batch Create New Workflow Instances -> SinglePage<{ id, status, version\_id, 1 more... }\>
post/accounts/{account\_id}/workflows/{workflow\_name}/instances/batch
Batch create new Workflow instances
[Workflows](https://developers.cloudflare.com/api/resources/workflows/)
[Instances](https://developers.cloudflare.com/api/resources/workflows/subresources/instances/)
### Events
workflows.instances.events
Methods
Send Event To Instance -> Envelope
post/accounts/{account\_id}/workflows/{workflow\_name}/instances/{instance\_id}/events/{event\_type}
Send event to instance
[Workflows](https://developers.cloudflare.com/api/resources/workflows/)
[Instances](https://developers.cloudflare.com/api/resources/workflows/subresources/instances/)
### Status
workflows.instances.status
Methods
Change Status Of Instance -> Envelope<{ status, timestamp }\>
patch/accounts/{account\_id}/workflows/{workflow\_name}/instances/{instance\_id}/status
Change status of instance
[Workflows](https://developers.cloudflare.com/api/resources/workflows/)
### Versions
workflows.versions
Methods
List Deployed Workflow Versions -> V4PagePaginationArray<{ id, class\_name, created\_on, 2 more... }\>
get/accounts/{account\_id}/workflows/{workflow\_name}/versions
List deployed Workflow versions
Get Workflow Version Details -> Envelope<{ id, class\_name, created\_on, 2 more... }\>
get/accounts/{account\_id}/workflows/{workflow\_name}/versions/{version\_id}
Get Workflow version details

---
# Cloudflare API | Workflows › Create Modify Workflow
[Cloudflare API](https://developers.cloudflare.com/api/)
HTTP
[Docs](https://developers.cloudflare.com/)
SearchCTRL+K
API Reference
[Overview](https://developers.cloudflare.com/api/)
Account & User Management
[Abuse Reports](https://developers.cloudflare.com/api/resources/abuse_reports/)
[Accounts](https://developers.cloudflare.com/api/resources/accounts/)
[Alerting](https://developers.cloudflare.com/api/resources/alerting/)
[Audit Logs](https://developers.cloudflare.com/api/resources/audit_logs/)
[Billing](https://developers.cloudflare.com/api/resources/billing/)
[IAM](https://developers.cloudflare.com/api/resources/iam/)
[Memberships](https://developers.cloudflare.com/api/resources/memberships/)
[Resource Sharing](https://developers.cloudflare.com/api/resources/resource_sharing/)
[User](https://developers.cloudflare.com/api/resources/user/)
[Custom Pages](https://developers.cloudflare.com/api/resources/custom_pages/)
AI
[AI](https://developers.cloudflare.com/api/resources/ai/)
[AI Gateway](https://developers.cloudflare.com/api/resources/ai_gateway/)
[AI Search](https://developers.cloudflare.com/api/resources/ai_search/)
[Vectorize](https://developers.cloudflare.com/api/resources/vectorize/)
Certificate Management
[ACM](https://developers.cloudflare.com/api/resources/acm/)
[Certificate Authorities](https://developers.cloudflare.com/api/resources/certificate_authorities/)
[Client Certificates](https://developers.cloudflare.com/api/resources/client_certificates/)
[Custom Certificates](https://developers.cloudflare.com/api/resources/custom_certificates/)
[Custom Hostnames](https://developers.cloudflare.com/api/resources/custom_hostnames/)
[DCV Delegation](https://developers.cloudflare.com/api/resources/dcv_delegation/)
[Hostnames](https://developers.cloudflare.com/api/resources/hostnames/)
[Keyless Certificates](https://developers.cloudflare.com/api/resources/keyless_certificates/)
[MTLS Certificates](https://developers.cloudflare.com/api/resources/mtls_certificates/)
[Origin CA Certificates](https://developers.cloudflare.com/api/resources/origin_ca_certificates/)
[Origin Post Quantum Encryption](https://developers.cloudflare.com/api/resources/origin_post_quantum_encryption/)
[Origin TLS Client Auth](https://developers.cloudflare.com/api/resources/origin_tls_client_auth/)
[SSL](https://developers.cloudflare.com/api/resources/ssl/)
Cloudflare One
[Email Security](https://developers.cloudflare.com/api/resources/email_security/)
[Zero Trust](https://developers.cloudflare.com/api/resources/zero_trust/)
DNS
[Account Custom Nameservers](https://developers.cloudflare.com/api/resources/custom_nameservers/)
[DNS](https://developers.cloudflare.com/api/resources/dns/)
[DNS Firewall](https://developers.cloudflare.com/api/resources/dns_firewall/)
Domain/Zone Management
[Registrar](https://developers.cloudflare.com/api/resources/registrar/)
[Zones](https://developers.cloudflare.com/api/resources/zones/)
IP Addresses
[Addressing](https://developers.cloudflare.com/api/resources/addressing/)
[IPs](https://developers.cloudflare.com/api/resources/ips/)
Media
[Calls](https://developers.cloudflare.com/api/resources/calls/)
[Images](https://developers.cloudflare.com/api/resources/images/)
[Stream](https://developers.cloudflare.com/api/resources/stream/)
[Realtime Kit](https://developers.cloudflare.com/api/resources/realtime_kit/)
Networking
[Magic Cloud Networking](https://developers.cloudflare.com/api/resources/magic_cloud_networking/)
[Magic Network Monitoring](https://developers.cloudflare.com/api/resources/magic_network_monitoring/)
[Magic Transit](https://developers.cloudflare.com/api/resources/magic_transit/)
[Network Interconnects](https://developers.cloudflare.com/api/resources/network_interconnects/)
Observability
[Diagnostics](https://developers.cloudflare.com/api/resources/diagnostics/)
[Healthchecks](https://developers.cloudflare.com/api/resources/healthchecks/)
[Logpush](https://developers.cloudflare.com/api/resources/logpush/)
[Logs](https://developers.cloudflare.com/api/resources/logs/)
[RUM](https://developers.cloudflare.com/api/resources/rum/)
[Security Center](https://developers.cloudflare.com/api/resources/security_center/)
Radar
[Radar](https://developers.cloudflare.com/api/resources/radar/)
Routing & Performance
[Argo](https://developers.cloudflare.com/api/resources/argo/)
[Cache](https://developers.cloudflare.com/api/resources/cache/)
[Email Routing](https://developers.cloudflare.com/api/resources/email_routing/)
[Load Balancers](https://developers.cloudflare.com/api/resources/load_balancers/)
[Smart Shield](https://developers.cloudflare.com/api/resources/smart_shield/)
[Spectrum](https://developers.cloudflare.com/api/resources/spectrum/)
[Speed](https://developers.cloudflare.com/api/resources/speed/)
[Waiting Rooms](https://developers.cloudflare.com/api/resources/waiting_rooms/)
[Web3](https://developers.cloudflare.com/api/resources/web3/)
Rules
[Cloud Connector](https://developers.cloudflare.com/api/resources/cloud_connector/)
[Managed Transforms](https://developers.cloudflare.com/api/resources/managed_transforms/)
[Page Rules](https://developers.cloudflare.com/api/resources/page_rules/)
[Rules Lists](https://developers.cloudflare.com/api/resources/rules/)
[Rules Trace](https://developers.cloudflare.com/api/resources/request_tracers/)
[Rulesets](https://developers.cloudflare.com/api/resources/rulesets/)
[Snippets](https://developers.cloudflare.com/api/resources/snippets/)
[URL Normalization](https://developers.cloudflare.com/api/resources/url_normalization/)
Security
[API Gateway](https://developers.cloudflare.com/api/resources/api_gateway/)
[Schema Validation](https://developers.cloudflare.com/api/resources/schema_validation/)
[Bot Management](https://developers.cloudflare.com/api/resources/bot_management/)
[Botnet Feed](https://developers.cloudflare.com/api/resources/botnet_feed/)
[Content Scanning](https://developers.cloudflare.com/api/resources/content_scanning/)
[Filters](https://developers.cloudflare.com/api/resources/filters/)
[Firewall](https://developers.cloudflare.com/api/resources/firewall/)
[Fraud](https://developers.cloudflare.com/api/resources/fraud/)
[Leaked Credential Checks](https://developers.cloudflare.com/api/resources/leaked_credential_checks/)
[Page Shield](https://developers.cloudflare.com/api/resources/page_shield/)
[Rate Limits](https://developers.cloudflare.com/api/resources/rate_limits/)
[Security TXT](https://developers.cloudflare.com/api/resources/security_txt/)
[Token Validation](https://developers.cloudflare.com/api/resources/token_validation/)
[Turnstile](https://developers.cloudflare.com/api/resources/turnstile/)
Storage & Databases
[D1](https://developers.cloudflare.com/api/resources/d1/)
[Hyperdrive](https://developers.cloudflare.com/api/resources/hyperdrive/)
[KV](https://developers.cloudflare.com/api/resources/kv/)
[Queues](https://developers.cloudflare.com/api/resources/queues/)
[R2](https://developers.cloudflare.com/api/resources/r2/)
[R2 Data Catalog](https://developers.cloudflare.com/api/resources/r2_data_catalog/)
[Secrets Store](https://developers.cloudflare.com/api/resources/secrets_store/)
[Pipelines](https://developers.cloudflare.com/api/resources/pipelines/)
Threat Intelligence
[Brand Protection](https://developers.cloudflare.com/api/resources/brand_protection/)
[Cloudforce One](https://developers.cloudflare.com/api/resources/cloudforce_one/)
[Intel](https://developers.cloudflare.com/api/resources/intel/)
[URL Scanner](https://developers.cloudflare.com/api/resources/url_scanner/)
Workers & Pages
[Browser Rendering](https://developers.cloudflare.com/api/resources/browser_rendering/)
[Durable Objects](https://developers.cloudflare.com/api/resources/durable_objects/)
[Pages](https://developers.cloudflare.com/api/resources/pages/)
[Workers](https://developers.cloudflare.com/api/resources/workers/)
[Workers Builds](https://developers.cloudflare.com/api/resources/workers_builds/)
[Workers For Platforms](https://developers.cloudflare.com/api/resources/workers_for_platforms/)
[Workflows](https://developers.cloudflare.com/api/resources/workflows/)
[List all Workflows](https://developers.cloudflare.com/api/resources/workflows/methods/list/)
[Get Workflow details](https://developers.cloudflare.com/api/resources/workflows/methods/get/)
[Create/modify Workflow](https://developers.cloudflare.com/api/resources/workflows/methods/update/)
[Deletes a Workflow](https://developers.cloudflare.com/api/resources/workflows/methods/delete/)
* * *
[Instances](https://developers.cloudflare.com/api/resources/workflows/subresources/instances/)
* * *
[Versions](https://developers.cloudflare.com/api/resources/workflows/subresources/versions/)
Shared
[Shared](https://developers.cloudflare.com/api/resources/$shared/)
[Organizations](https://developers.cloudflare.com/api/resources/organizations/)
[Connectivity](https://developers.cloudflare.com/api/resources/connectivity/)
[Zaraz](https://developers.cloudflare.com/api/resources/zaraz/)
[AutoRAG](https://developers.cloudflare.com/api/resources/autorag/)
### Workflows
workflows
Methods
List All Workflows -> V4PagePaginationArray<{ id, class\_name, created\_on, 5 more... }\>
get/accounts/{account\_id}/workflows
List all Workflows
Get Workflow Details -> Envelope<{ id, class\_name, created\_on, 5 more... }\>
get/accounts/{account\_id}/workflows/{workflow\_name}
Get Workflow details
Create Modify Workflow -> Envelope<{ id, class\_name, created\_on, 7 more... }\>
put/accounts/{account\_id}/workflows/{workflow\_name}
Create/modify Workflow
Security
API Token
The preferred authorization scheme for interacting with the Cloudflare API. [Create a token](https://developers.cloudflare.com/fundamentals/api/get-started/create-token/)
.
Example: Authorization: Bearer Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY
Accepted Permissions (at least one required)
Workers Scripts Write
path Parameters
account\_id: string
workflow\_name: string
(maxLength: 64, minLength: 1)
Body parameters
class\_name: string
(maxLength: 255, minLength: 1)
script\_name: string
(maxLength: 255, minLength: 1)
Response fields
errors: Array<{ code, message }\>
messages: Array<{ code, message }\>
result: { id, class\_name, created\_on, 7 more... }
success: true
result\_info: { count, per\_page, total\_count, 2 more... }
Optional
Request example cURL
curl https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/workflows/$WORKFLOW_NAME \
-X PUT \
-H 'Content-Type: application/json' \
-H "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
-d '{
"class_name": "x",
"script_name": "x"
}'
200Example
{
"errors": [\
{\
"code": 0,\
"message": "message"\
}\
],
"messages": [\
{\
"code": 0,\
"message": "message"\
}\
],
"result": {
"id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"class_name": "class_name",
"created_on": "2019-12-27T18:11:19.117Z",
"is_deleted": 0,
"modified_on": "2019-12-27T18:11:19.117Z",
"name": "x",
"script_name": "script_name",
"terminator_running": 0,
"triggered_on": "2019-12-27T18:11:19.117Z",
"version_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"
},
"success": true,
"result_info": {
"count": 0,
"per_page": 0,
"total_count": 0,
"cursor": "cursor",
"page": 0
}
}
Deletes A Workflow -> Envelope<{ status, success }\>
delete/accounts/{account\_id}/workflows/{workflow\_name}
Deletes a Workflow. This only deletes the Workflow and does not delete or modify any Worker associated to this Workflow or bounded to it.
[Workflows](https://developers.cloudflare.com/api/resources/workflows/)
### Instances
workflows.instances
Methods
List Of Workflow Instances -> V4PagePaginationArray<{ id, created\_on, ended\_on, 5 more... }\>
get/accounts/{account\_id}/workflows/{workflow\_name}/instances
List of workflow instances
Get Logs And Status From Instance -> Envelope<{ end, error, output, 8 more... }\>
get/accounts/{account\_id}/workflows/{workflow\_name}/instances/{instance\_id}
Get logs and status from instance
Create A New Workflow Instance -> Envelope<{ id, status, version\_id, 1 more... }\>
post/accounts/{account\_id}/workflows/{workflow\_name}/instances
Create a new workflow instance
Batch Create New Workflow Instances -> SinglePage<{ id, status, version\_id, 1 more... }\>
post/accounts/{account\_id}/workflows/{workflow\_name}/instances/batch
Batch create new Workflow instances
[Workflows](https://developers.cloudflare.com/api/resources/workflows/)
[Instances](https://developers.cloudflare.com/api/resources/workflows/subresources/instances/)
### Events
workflows.instances.events
Methods
Send Event To Instance -> Envelope
post/accounts/{account\_id}/workflows/{workflow\_name}/instances/{instance\_id}/events/{event\_type}
Send event to instance
[Workflows](https://developers.cloudflare.com/api/resources/workflows/)
[Instances](https://developers.cloudflare.com/api/resources/workflows/subresources/instances/)
### Status
workflows.instances.status
Methods
Change Status Of Instance -> Envelope<{ status, timestamp }\>
patch/accounts/{account\_id}/workflows/{workflow\_name}/instances/{instance\_id}/status
Change status of instance
[Workflows](https://developers.cloudflare.com/api/resources/workflows/)
### Versions
workflows.versions
Methods
List Deployed Workflow Versions -> V4PagePaginationArray<{ id, class\_name, created\_on, 2 more... }\>
get/accounts/{account\_id}/workflows/{workflow\_name}/versions
List deployed Workflow versions
Get Workflow Version Details -> Envelope<{ id, class\_name, created\_on, 2 more... }\>
get/accounts/{account\_id}/workflows/{workflow\_name}/versions/{version\_id}
Get Workflow version details

---
# Cloudflare API | Workflows › Get Workflow Details
[Cloudflare API](https://developers.cloudflare.com/api/)
HTTP
[Docs](https://developers.cloudflare.com/)
SearchCTRL+K
API Reference
[Overview](https://developers.cloudflare.com/api/)
Account & User Management
[Abuse Reports](https://developers.cloudflare.com/api/resources/abuse_reports/)
[Accounts](https://developers.cloudflare.com/api/resources/accounts/)
[Alerting](https://developers.cloudflare.com/api/resources/alerting/)
[Audit Logs](https://developers.cloudflare.com/api/resources/audit_logs/)
[Billing](https://developers.cloudflare.com/api/resources/billing/)
[IAM](https://developers.cloudflare.com/api/resources/iam/)
[Memberships](https://developers.cloudflare.com/api/resources/memberships/)
[Resource Sharing](https://developers.cloudflare.com/api/resources/resource_sharing/)
[User](https://developers.cloudflare.com/api/resources/user/)
[Custom Pages](https://developers.cloudflare.com/api/resources/custom_pages/)
AI
[AI](https://developers.cloudflare.com/api/resources/ai/)
[AI Gateway](https://developers.cloudflare.com/api/resources/ai_gateway/)
[AI Search](https://developers.cloudflare.com/api/resources/ai_search/)
[Vectorize](https://developers.cloudflare.com/api/resources/vectorize/)
Certificate Management
[ACM](https://developers.cloudflare.com/api/resources/acm/)
[Certificate Authorities](https://developers.cloudflare.com/api/resources/certificate_authorities/)
[Client Certificates](https://developers.cloudflare.com/api/resources/client_certificates/)
[Custom Certificates](https://developers.cloudflare.com/api/resources/custom_certificates/)
[Custom Hostnames](https://developers.cloudflare.com/api/resources/custom_hostnames/)
[DCV Delegation](https://developers.cloudflare.com/api/resources/dcv_delegation/)
[Hostnames](https://developers.cloudflare.com/api/resources/hostnames/)
[Keyless Certificates](https://developers.cloudflare.com/api/resources/keyless_certificates/)
[MTLS Certificates](https://developers.cloudflare.com/api/resources/mtls_certificates/)
[Origin CA Certificates](https://developers.cloudflare.com/api/resources/origin_ca_certificates/)
[Origin Post Quantum Encryption](https://developers.cloudflare.com/api/resources/origin_post_quantum_encryption/)
[Origin TLS Client Auth](https://developers.cloudflare.com/api/resources/origin_tls_client_auth/)
[SSL](https://developers.cloudflare.com/api/resources/ssl/)
Cloudflare One
[Email Security](https://developers.cloudflare.com/api/resources/email_security/)
[Zero Trust](https://developers.cloudflare.com/api/resources/zero_trust/)
DNS
[Account Custom Nameservers](https://developers.cloudflare.com/api/resources/custom_nameservers/)
[DNS](https://developers.cloudflare.com/api/resources/dns/)
[DNS Firewall](https://developers.cloudflare.com/api/resources/dns_firewall/)
Domain/Zone Management
[Registrar](https://developers.cloudflare.com/api/resources/registrar/)
[Zones](https://developers.cloudflare.com/api/resources/zones/)
IP Addresses
[Addressing](https://developers.cloudflare.com/api/resources/addressing/)
[IPs](https://developers.cloudflare.com/api/resources/ips/)
Media
[Calls](https://developers.cloudflare.com/api/resources/calls/)
[Images](https://developers.cloudflare.com/api/resources/images/)
[Stream](https://developers.cloudflare.com/api/resources/stream/)
[Realtime Kit](https://developers.cloudflare.com/api/resources/realtime_kit/)
Networking
[Magic Cloud Networking](https://developers.cloudflare.com/api/resources/magic_cloud_networking/)
[Magic Network Monitoring](https://developers.cloudflare.com/api/resources/magic_network_monitoring/)
[Magic Transit](https://developers.cloudflare.com/api/resources/magic_transit/)
[Network Interconnects](https://developers.cloudflare.com/api/resources/network_interconnects/)
Observability
[Diagnostics](https://developers.cloudflare.com/api/resources/diagnostics/)
[Healthchecks](https://developers.cloudflare.com/api/resources/healthchecks/)
[Logpush](https://developers.cloudflare.com/api/resources/logpush/)
[Logs](https://developers.cloudflare.com/api/resources/logs/)
[RUM](https://developers.cloudflare.com/api/resources/rum/)
[Security Center](https://developers.cloudflare.com/api/resources/security_center/)
Radar
[Radar](https://developers.cloudflare.com/api/resources/radar/)
Routing & Performance
[Argo](https://developers.cloudflare.com/api/resources/argo/)
[Cache](https://developers.cloudflare.com/api/resources/cache/)
[Email Routing](https://developers.cloudflare.com/api/resources/email_routing/)
[Load Balancers](https://developers.cloudflare.com/api/resources/load_balancers/)
[Smart Shield](https://developers.cloudflare.com/api/resources/smart_shield/)
[Spectrum](https://developers.cloudflare.com/api/resources/spectrum/)
[Speed](https://developers.cloudflare.com/api/resources/speed/)
[Waiting Rooms](https://developers.cloudflare.com/api/resources/waiting_rooms/)
[Web3](https://developers.cloudflare.com/api/resources/web3/)
Rules
[Cloud Connector](https://developers.cloudflare.com/api/resources/cloud_connector/)
[Managed Transforms](https://developers.cloudflare.com/api/resources/managed_transforms/)
[Page Rules](https://developers.cloudflare.com/api/resources/page_rules/)
[Rules Lists](https://developers.cloudflare.com/api/resources/rules/)
[Rules Trace](https://developers.cloudflare.com/api/resources/request_tracers/)
[Rulesets](https://developers.cloudflare.com/api/resources/rulesets/)
[Snippets](https://developers.cloudflare.com/api/resources/snippets/)
[URL Normalization](https://developers.cloudflare.com/api/resources/url_normalization/)
Security
[API Gateway](https://developers.cloudflare.com/api/resources/api_gateway/)
[Schema Validation](https://developers.cloudflare.com/api/resources/schema_validation/)
[Bot Management](https://developers.cloudflare.com/api/resources/bot_management/)
[Botnet Feed](https://developers.cloudflare.com/api/resources/botnet_feed/)
[Content Scanning](https://developers.cloudflare.com/api/resources/content_scanning/)
[Filters](https://developers.cloudflare.com/api/resources/filters/)
[Firewall](https://developers.cloudflare.com/api/resources/firewall/)
[Fraud](https://developers.cloudflare.com/api/resources/fraud/)
[Leaked Credential Checks](https://developers.cloudflare.com/api/resources/leaked_credential_checks/)
[Page Shield](https://developers.cloudflare.com/api/resources/page_shield/)
[Rate Limits](https://developers.cloudflare.com/api/resources/rate_limits/)
[Security TXT](https://developers.cloudflare.com/api/resources/security_txt/)
[Token Validation](https://developers.cloudflare.com/api/resources/token_validation/)
[Turnstile](https://developers.cloudflare.com/api/resources/turnstile/)
Storage & Databases
[D1](https://developers.cloudflare.com/api/resources/d1/)
[Hyperdrive](https://developers.cloudflare.com/api/resources/hyperdrive/)
[KV](https://developers.cloudflare.com/api/resources/kv/)
[Queues](https://developers.cloudflare.com/api/resources/queues/)
[R2](https://developers.cloudflare.com/api/resources/r2/)
[R2 Data Catalog](https://developers.cloudflare.com/api/resources/r2_data_catalog/)
[Secrets Store](https://developers.cloudflare.com/api/resources/secrets_store/)
[Pipelines](https://developers.cloudflare.com/api/resources/pipelines/)
Threat Intelligence
[Brand Protection](https://developers.cloudflare.com/api/resources/brand_protection/)
[Cloudforce One](https://developers.cloudflare.com/api/resources/cloudforce_one/)
[Intel](https://developers.cloudflare.com/api/resources/intel/)
[URL Scanner](https://developers.cloudflare.com/api/resources/url_scanner/)
Workers & Pages
[Browser Rendering](https://developers.cloudflare.com/api/resources/browser_rendering/)
[Durable Objects](https://developers.cloudflare.com/api/resources/durable_objects/)
[Pages](https://developers.cloudflare.com/api/resources/pages/)
[Workers](https://developers.cloudflare.com/api/resources/workers/)
[Workers Builds](https://developers.cloudflare.com/api/resources/workers_builds/)
[Workers For Platforms](https://developers.cloudflare.com/api/resources/workers_for_platforms/)
[Workflows](https://developers.cloudflare.com/api/resources/workflows/)
[List all Workflows](https://developers.cloudflare.com/api/resources/workflows/methods/list/)
[Get Workflow details](https://developers.cloudflare.com/api/resources/workflows/methods/get/)
[Create/modify Workflow](https://developers.cloudflare.com/api/resources/workflows/methods/update/)
[Deletes a Workflow](https://developers.cloudflare.com/api/resources/workflows/methods/delete/)
* * *
[Instances](https://developers.cloudflare.com/api/resources/workflows/subresources/instances/)
* * *
[Versions](https://developers.cloudflare.com/api/resources/workflows/subresources/versions/)
Shared
[Shared](https://developers.cloudflare.com/api/resources/$shared/)
[Organizations](https://developers.cloudflare.com/api/resources/organizations/)
[Connectivity](https://developers.cloudflare.com/api/resources/connectivity/)
[Zaraz](https://developers.cloudflare.com/api/resources/zaraz/)
[AutoRAG](https://developers.cloudflare.com/api/resources/autorag/)
### Workflows
workflows
Methods
List All Workflows -> V4PagePaginationArray<{ id, class\_name, created\_on, 5 more... }\>
get/accounts/{account\_id}/workflows
List all Workflows
Get Workflow Details -> Envelope<{ id, class\_name, created\_on, 5 more... }\>
get/accounts/{account\_id}/workflows/{workflow\_name}
Get Workflow details
Security
API Token
The preferred authorization scheme for interacting with the Cloudflare API. [Create a token](https://developers.cloudflare.com/fundamentals/api/get-started/create-token/)
.
Example: Authorization: Bearer Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY
Accepted Permissions (at least one required)
Workers Tail Read Workers Scripts Write Workers Scripts Read
path Parameters
account\_id: string
workflow\_name: string
(maxLength: 64, minLength: 1)
Response fields
errors: Array<{ code, message }\>
messages: Array<{ code, message }\>
result: { id, class\_name, created\_on, 5 more... }
success: true
result\_info: { count, per\_page, total\_count, 2 more... }
Optional
Request example cURL
curl https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/workflows/$WORKFLOW_NAME \
-H "Authorization: Bearer $CLOUDFLARE_API_TOKEN"
200Example
{
"errors": [\
{\
"code": 0,\
"message": "message"\
}\
],
"messages": [\
{\
"code": 0,\
"message": "message"\
}\
],
"result": {
"id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"class_name": "class_name",
"created_on": "2019-12-27T18:11:19.117Z",
"instances": {
"complete": 0,
"errored": 0,
"paused": 0,
"queued": 0,
"running": 0,
"terminated": 0,
"waiting": 0,
"waitingForPause": 0
},
"modified_on": "2019-12-27T18:11:19.117Z",
"name": "x",
"script_name": "script_name",
"triggered_on": "2019-12-27T18:11:19.117Z"
},
"success": true,
"result_info": {
"count": 0,
"per_page": 0,
"total_count": 0,
"cursor": "cursor",
"page": 0
}
}
Create Modify Workflow -> Envelope<{ id, class\_name, created\_on, 7 more... }\>
put/accounts/{account\_id}/workflows/{workflow\_name}
Create/modify Workflow
Deletes A Workflow -> Envelope<{ status, success }\>
delete/accounts/{account\_id}/workflows/{workflow\_name}
Deletes a Workflow. This only deletes the Workflow and does not delete or modify any Worker associated to this Workflow or bounded to it.
[Workflows](https://developers.cloudflare.com/api/resources/workflows/)
### Instances
workflows.instances
Methods
List Of Workflow Instances -> V4PagePaginationArray<{ id, created\_on, ended\_on, 5 more... }\>
get/accounts/{account\_id}/workflows/{workflow\_name}/instances
List of workflow instances
Get Logs And Status From Instance -> Envelope<{ end, error, output, 8 more... }\>
get/accounts/{account\_id}/workflows/{workflow\_name}/instances/{instance\_id}
Get logs and status from instance
Create A New Workflow Instance -> Envelope<{ id, status, version\_id, 1 more... }\>
post/accounts/{account\_id}/workflows/{workflow\_name}/instances
Create a new workflow instance
Batch Create New Workflow Instances -> SinglePage<{ id, status, version\_id, 1 more... }\>
post/accounts/{account\_id}/workflows/{workflow\_name}/instances/batch
Batch create new Workflow instances
[Workflows](https://developers.cloudflare.com/api/resources/workflows/)
[Instances](https://developers.cloudflare.com/api/resources/workflows/subresources/instances/)
### Events
workflows.instances.events
Methods
Send Event To Instance -> Envelope
post/accounts/{account\_id}/workflows/{workflow\_name}/instances/{instance\_id}/events/{event\_type}
Send event to instance
[Workflows](https://developers.cloudflare.com/api/resources/workflows/)
[Instances](https://developers.cloudflare.com/api/resources/workflows/subresources/instances/)
### Status
workflows.instances.status
Methods
Change Status Of Instance -> Envelope<{ status, timestamp }\>
patch/accounts/{account\_id}/workflows/{workflow\_name}/instances/{instance\_id}/status
Change status of instance
[Workflows](https://developers.cloudflare.com/api/resources/workflows/)
### Versions
workflows.versions
Methods
List Deployed Workflow Versions -> V4PagePaginationArray<{ id, class\_name, created\_on, 2 more... }\>
get/accounts/{account\_id}/workflows/{workflow\_name}/versions
List deployed Workflow versions
Get Workflow Version Details -> Envelope<{ id, class\_name, created\_on, 2 more... }\>
get/accounts/{account\_id}/workflows/{workflow\_name}/versions/{version\_id}
Get Workflow version details

---
# Cloudflare API | Workflows › Versions
[Cloudflare API](https://developers.cloudflare.com/api/)
HTTP
[Docs](https://developers.cloudflare.com/)
SearchCTRL+K
API Reference
[Overview](https://developers.cloudflare.com/api/)
Account & User Management
[Abuse Reports](https://developers.cloudflare.com/api/resources/abuse_reports/)
[Accounts](https://developers.cloudflare.com/api/resources/accounts/)
[Alerting](https://developers.cloudflare.com/api/resources/alerting/)
[Audit Logs](https://developers.cloudflare.com/api/resources/audit_logs/)
[Billing](https://developers.cloudflare.com/api/resources/billing/)
[IAM](https://developers.cloudflare.com/api/resources/iam/)
[Memberships](https://developers.cloudflare.com/api/resources/memberships/)
[Resource Sharing](https://developers.cloudflare.com/api/resources/resource_sharing/)
[User](https://developers.cloudflare.com/api/resources/user/)
[Custom Pages](https://developers.cloudflare.com/api/resources/custom_pages/)
AI
[AI](https://developers.cloudflare.com/api/resources/ai/)
[AI Gateway](https://developers.cloudflare.com/api/resources/ai_gateway/)
[AI Search](https://developers.cloudflare.com/api/resources/ai_search/)
[Vectorize](https://developers.cloudflare.com/api/resources/vectorize/)
Certificate Management
[ACM](https://developers.cloudflare.com/api/resources/acm/)
[Certificate Authorities](https://developers.cloudflare.com/api/resources/certificate_authorities/)
[Client Certificates](https://developers.cloudflare.com/api/resources/client_certificates/)
[Custom Certificates](https://developers.cloudflare.com/api/resources/custom_certificates/)
[Custom Hostnames](https://developers.cloudflare.com/api/resources/custom_hostnames/)
[DCV Delegation](https://developers.cloudflare.com/api/resources/dcv_delegation/)
[Hostnames](https://developers.cloudflare.com/api/resources/hostnames/)
[Keyless Certificates](https://developers.cloudflare.com/api/resources/keyless_certificates/)
[MTLS Certificates](https://developers.cloudflare.com/api/resources/mtls_certificates/)
[Origin CA Certificates](https://developers.cloudflare.com/api/resources/origin_ca_certificates/)
[Origin Post Quantum Encryption](https://developers.cloudflare.com/api/resources/origin_post_quantum_encryption/)
[Origin TLS Client Auth](https://developers.cloudflare.com/api/resources/origin_tls_client_auth/)
[SSL](https://developers.cloudflare.com/api/resources/ssl/)
Cloudflare One
[Email Security](https://developers.cloudflare.com/api/resources/email_security/)
[Zero Trust](https://developers.cloudflare.com/api/resources/zero_trust/)
DNS
[Account Custom Nameservers](https://developers.cloudflare.com/api/resources/custom_nameservers/)
[DNS](https://developers.cloudflare.com/api/resources/dns/)
[DNS Firewall](https://developers.cloudflare.com/api/resources/dns_firewall/)
Domain/Zone Management
[Registrar](https://developers.cloudflare.com/api/resources/registrar/)
[Zones](https://developers.cloudflare.com/api/resources/zones/)
IP Addresses
[Addressing](https://developers.cloudflare.com/api/resources/addressing/)
[IPs](https://developers.cloudflare.com/api/resources/ips/)
Media
[Calls](https://developers.cloudflare.com/api/resources/calls/)
[Images](https://developers.cloudflare.com/api/resources/images/)
[Stream](https://developers.cloudflare.com/api/resources/stream/)
[Realtime Kit](https://developers.cloudflare.com/api/resources/realtime_kit/)
Networking
[Magic Cloud Networking](https://developers.cloudflare.com/api/resources/magic_cloud_networking/)
[Magic Network Monitoring](https://developers.cloudflare.com/api/resources/magic_network_monitoring/)
[Magic Transit](https://developers.cloudflare.com/api/resources/magic_transit/)
[Network Interconnects](https://developers.cloudflare.com/api/resources/network_interconnects/)
Observability
[Diagnostics](https://developers.cloudflare.com/api/resources/diagnostics/)
[Healthchecks](https://developers.cloudflare.com/api/resources/healthchecks/)
[Logpush](https://developers.cloudflare.com/api/resources/logpush/)
[Logs](https://developers.cloudflare.com/api/resources/logs/)
[RUM](https://developers.cloudflare.com/api/resources/rum/)
[Security Center](https://developers.cloudflare.com/api/resources/security_center/)
Radar
[Radar](https://developers.cloudflare.com/api/resources/radar/)
Routing & Performance
[Argo](https://developers.cloudflare.com/api/resources/argo/)
[Cache](https://developers.cloudflare.com/api/resources/cache/)
[Email Routing](https://developers.cloudflare.com/api/resources/email_routing/)
[Load Balancers](https://developers.cloudflare.com/api/resources/load_balancers/)
[Smart Shield](https://developers.cloudflare.com/api/resources/smart_shield/)
[Spectrum](https://developers.cloudflare.com/api/resources/spectrum/)
[Speed](https://developers.cloudflare.com/api/resources/speed/)
[Waiting Rooms](https://developers.cloudflare.com/api/resources/waiting_rooms/)
[Web3](https://developers.cloudflare.com/api/resources/web3/)
Rules
[Cloud Connector](https://developers.cloudflare.com/api/resources/cloud_connector/)
[Managed Transforms](https://developers.cloudflare.com/api/resources/managed_transforms/)
[Page Rules](https://developers.cloudflare.com/api/resources/page_rules/)
[Rules Lists](https://developers.cloudflare.com/api/resources/rules/)
[Rules Trace](https://developers.cloudflare.com/api/resources/request_tracers/)
[Rulesets](https://developers.cloudflare.com/api/resources/rulesets/)
[Snippets](https://developers.cloudflare.com/api/resources/snippets/)
[URL Normalization](https://developers.cloudflare.com/api/resources/url_normalization/)
Security
[API Gateway](https://developers.cloudflare.com/api/resources/api_gateway/)
[Schema Validation](https://developers.cloudflare.com/api/resources/schema_validation/)
[Bot Management](https://developers.cloudflare.com/api/resources/bot_management/)
[Botnet Feed](https://developers.cloudflare.com/api/resources/botnet_feed/)
[Content Scanning](https://developers.cloudflare.com/api/resources/content_scanning/)
[Filters](https://developers.cloudflare.com/api/resources/filters/)
[Firewall](https://developers.cloudflare.com/api/resources/firewall/)
[Fraud](https://developers.cloudflare.com/api/resources/fraud/)
[Leaked Credential Checks](https://developers.cloudflare.com/api/resources/leaked_credential_checks/)
[Page Shield](https://developers.cloudflare.com/api/resources/page_shield/)
[Rate Limits](https://developers.cloudflare.com/api/resources/rate_limits/)
[Security TXT](https://developers.cloudflare.com/api/resources/security_txt/)
[Token Validation](https://developers.cloudflare.com/api/resources/token_validation/)
[Turnstile](https://developers.cloudflare.com/api/resources/turnstile/)
Storage & Databases
[D1](https://developers.cloudflare.com/api/resources/d1/)
[Hyperdrive](https://developers.cloudflare.com/api/resources/hyperdrive/)
[KV](https://developers.cloudflare.com/api/resources/kv/)
[Queues](https://developers.cloudflare.com/api/resources/queues/)
[R2](https://developers.cloudflare.com/api/resources/r2/)
[R2 Data Catalog](https://developers.cloudflare.com/api/resources/r2_data_catalog/)
[Secrets Store](https://developers.cloudflare.com/api/resources/secrets_store/)
[Pipelines](https://developers.cloudflare.com/api/resources/pipelines/)
Threat Intelligence
[Brand Protection](https://developers.cloudflare.com/api/resources/brand_protection/)
[Cloudforce One](https://developers.cloudflare.com/api/resources/cloudforce_one/)
[Intel](https://developers.cloudflare.com/api/resources/intel/)
[URL Scanner](https://developers.cloudflare.com/api/resources/url_scanner/)
Workers & Pages
[Browser Rendering](https://developers.cloudflare.com/api/resources/browser_rendering/)
[Durable Objects](https://developers.cloudflare.com/api/resources/durable_objects/)
[Pages](https://developers.cloudflare.com/api/resources/pages/)
[Workers](https://developers.cloudflare.com/api/resources/workers/)
[Workers Builds](https://developers.cloudflare.com/api/resources/workers_builds/)
[Workers For Platforms](https://developers.cloudflare.com/api/resources/workers_for_platforms/)
[Workflows](https://developers.cloudflare.com/api/resources/workflows/)
[List all Workflows](https://developers.cloudflare.com/api/resources/workflows/methods/list/)
[Get Workflow details](https://developers.cloudflare.com/api/resources/workflows/methods/get/)
[Create/modify Workflow](https://developers.cloudflare.com/api/resources/workflows/methods/update/)
[Deletes a Workflow](https://developers.cloudflare.com/api/resources/workflows/methods/delete/)
* * *
[Instances](https://developers.cloudflare.com/api/resources/workflows/subresources/instances/)
* * *
[Versions](https://developers.cloudflare.com/api/resources/workflows/subresources/versions/)
[List deployed Workflow versions](https://developers.cloudflare.com/api/resources/workflows/subresources/versions/methods/list/)
[Get Workflow version details](https://developers.cloudflare.com/api/resources/workflows/subresources/versions/methods/get/)
Shared
[Shared](https://developers.cloudflare.com/api/resources/$shared/)
[Organizations](https://developers.cloudflare.com/api/resources/organizations/)
[Connectivity](https://developers.cloudflare.com/api/resources/connectivity/)
[Zaraz](https://developers.cloudflare.com/api/resources/zaraz/)
[AutoRAG](https://developers.cloudflare.com/api/resources/autorag/)
### Workflows
workflows
Methods
List All Workflows -> V4PagePaginationArray<{ id, class\_name, created\_on, 5 more... }\>
get/accounts/{account\_id}/workflows
List all Workflows
Get Workflow Details -> Envelope<{ id, class\_name, created\_on, 5 more... }\>
get/accounts/{account\_id}/workflows/{workflow\_name}
Get Workflow details
Create Modify Workflow -> Envelope<{ id, class\_name, created\_on, 7 more... }\>
put/accounts/{account\_id}/workflows/{workflow\_name}
Create/modify Workflow
Deletes A Workflow -> Envelope<{ status, success }\>
delete/accounts/{account\_id}/workflows/{workflow\_name}
Deletes a Workflow. This only deletes the Workflow and does not delete or modify any Worker associated to this Workflow or bounded to it.
[Workflows](https://developers.cloudflare.com/api/resources/workflows/)
### Instances
workflows.instances
Methods
List Of Workflow Instances -> V4PagePaginationArray<{ id, created\_on, ended\_on, 5 more... }\>
get/accounts/{account\_id}/workflows/{workflow\_name}/instances
List of workflow instances
Get Logs And Status From Instance -> Envelope<{ end, error, output, 8 more... }\>
get/accounts/{account\_id}/workflows/{workflow\_name}/instances/{instance\_id}
Get logs and status from instance
Create A New Workflow Instance -> Envelope<{ id, status, version\_id, 1 more... }\>
post/accounts/{account\_id}/workflows/{workflow\_name}/instances
Create a new workflow instance
Batch Create New Workflow Instances -> SinglePage<{ id, status, version\_id, 1 more... }\>
post/accounts/{account\_id}/workflows/{workflow\_name}/instances/batch
Batch create new Workflow instances
[Workflows](https://developers.cloudflare.com/api/resources/workflows/)
[Instances](https://developers.cloudflare.com/api/resources/workflows/subresources/instances/)
### Events
workflows.instances.events
Methods
Send Event To Instance -> Envelope
post/accounts/{account\_id}/workflows/{workflow\_name}/instances/{instance\_id}/events/{event\_type}
Send event to instance
[Workflows](https://developers.cloudflare.com/api/resources/workflows/)
[Instances](https://developers.cloudflare.com/api/resources/workflows/subresources/instances/)
### Status
workflows.instances.status
Methods
Change Status Of Instance -> Envelope<{ status, timestamp }\>
patch/accounts/{account\_id}/workflows/{workflow\_name}/instances/{instance\_id}/status
Change status of instance
[Workflows](https://developers.cloudflare.com/api/resources/workflows/)
### Versions
workflows.versions
Methods
List Deployed Workflow Versions -> V4PagePaginationArray<{ id, class\_name, created\_on, 2 more... }\>
get/accounts/{account\_id}/workflows/{workflow\_name}/versions
List deployed Workflow versions
Get Workflow Version Details -> Envelope<{ id, class\_name, created\_on, 2 more... }\>
get/accounts/{account\_id}/workflows/{workflow\_name}/versions/{version\_id}
Get Workflow version details

---
# Cloudflare API | Workflows › Deletes A Workflow
[Cloudflare API](https://developers.cloudflare.com/api/)
HTTP
[Docs](https://developers.cloudflare.com/)
SearchCTRL+K
API Reference
[Overview](https://developers.cloudflare.com/api/)
Account & User Management
[Abuse Reports](https://developers.cloudflare.com/api/resources/abuse_reports/)
[Accounts](https://developers.cloudflare.com/api/resources/accounts/)
[Alerting](https://developers.cloudflare.com/api/resources/alerting/)
[Audit Logs](https://developers.cloudflare.com/api/resources/audit_logs/)
[Billing](https://developers.cloudflare.com/api/resources/billing/)
[IAM](https://developers.cloudflare.com/api/resources/iam/)
[Memberships](https://developers.cloudflare.com/api/resources/memberships/)
[Resource Sharing](https://developers.cloudflare.com/api/resources/resource_sharing/)
[User](https://developers.cloudflare.com/api/resources/user/)
[Custom Pages](https://developers.cloudflare.com/api/resources/custom_pages/)
AI
[AI](https://developers.cloudflare.com/api/resources/ai/)
[AI Gateway](https://developers.cloudflare.com/api/resources/ai_gateway/)
[AI Search](https://developers.cloudflare.com/api/resources/ai_search/)
[Vectorize](https://developers.cloudflare.com/api/resources/vectorize/)
Certificate Management
[ACM](https://developers.cloudflare.com/api/resources/acm/)
[Certificate Authorities](https://developers.cloudflare.com/api/resources/certificate_authorities/)
[Client Certificates](https://developers.cloudflare.com/api/resources/client_certificates/)
[Custom Certificates](https://developers.cloudflare.com/api/resources/custom_certificates/)
[Custom Hostnames](https://developers.cloudflare.com/api/resources/custom_hostnames/)
[DCV Delegation](https://developers.cloudflare.com/api/resources/dcv_delegation/)
[Hostnames](https://developers.cloudflare.com/api/resources/hostnames/)
[Keyless Certificates](https://developers.cloudflare.com/api/resources/keyless_certificates/)
[MTLS Certificates](https://developers.cloudflare.com/api/resources/mtls_certificates/)
[Origin CA Certificates](https://developers.cloudflare.com/api/resources/origin_ca_certificates/)
[Origin Post Quantum Encryption](https://developers.cloudflare.com/api/resources/origin_post_quantum_encryption/)
[Origin TLS Client Auth](https://developers.cloudflare.com/api/resources/origin_tls_client_auth/)
[SSL](https://developers.cloudflare.com/api/resources/ssl/)
Cloudflare One
[Email Security](https://developers.cloudflare.com/api/resources/email_security/)
[Zero Trust](https://developers.cloudflare.com/api/resources/zero_trust/)
DNS
[Account Custom Nameservers](https://developers.cloudflare.com/api/resources/custom_nameservers/)
[DNS](https://developers.cloudflare.com/api/resources/dns/)
[DNS Firewall](https://developers.cloudflare.com/api/resources/dns_firewall/)
Domain/Zone Management
[Registrar](https://developers.cloudflare.com/api/resources/registrar/)
[Zones](https://developers.cloudflare.com/api/resources/zones/)
IP Addresses
[Addressing](https://developers.cloudflare.com/api/resources/addressing/)
[IPs](https://developers.cloudflare.com/api/resources/ips/)
Media
[Calls](https://developers.cloudflare.com/api/resources/calls/)
[Images](https://developers.cloudflare.com/api/resources/images/)
[Stream](https://developers.cloudflare.com/api/resources/stream/)
[Realtime Kit](https://developers.cloudflare.com/api/resources/realtime_kit/)
Networking
[Magic Cloud Networking](https://developers.cloudflare.com/api/resources/magic_cloud_networking/)
[Magic Network Monitoring](https://developers.cloudflare.com/api/resources/magic_network_monitoring/)
[Magic Transit](https://developers.cloudflare.com/api/resources/magic_transit/)
[Network Interconnects](https://developers.cloudflare.com/api/resources/network_interconnects/)
Observability
[Diagnostics](https://developers.cloudflare.com/api/resources/diagnostics/)
[Healthchecks](https://developers.cloudflare.com/api/resources/healthchecks/)
[Logpush](https://developers.cloudflare.com/api/resources/logpush/)
[Logs](https://developers.cloudflare.com/api/resources/logs/)
[RUM](https://developers.cloudflare.com/api/resources/rum/)
[Security Center](https://developers.cloudflare.com/api/resources/security_center/)
Radar
[Radar](https://developers.cloudflare.com/api/resources/radar/)
Routing & Performance
[Argo](https://developers.cloudflare.com/api/resources/argo/)
[Cache](https://developers.cloudflare.com/api/resources/cache/)
[Email Routing](https://developers.cloudflare.com/api/resources/email_routing/)
[Load Balancers](https://developers.cloudflare.com/api/resources/load_balancers/)
[Smart Shield](https://developers.cloudflare.com/api/resources/smart_shield/)
[Spectrum](https://developers.cloudflare.com/api/resources/spectrum/)
[Speed](https://developers.cloudflare.com/api/resources/speed/)
[Waiting Rooms](https://developers.cloudflare.com/api/resources/waiting_rooms/)
[Web3](https://developers.cloudflare.com/api/resources/web3/)
Rules
[Cloud Connector](https://developers.cloudflare.com/api/resources/cloud_connector/)
[Managed Transforms](https://developers.cloudflare.com/api/resources/managed_transforms/)
[Page Rules](https://developers.cloudflare.com/api/resources/page_rules/)
[Rules Lists](https://developers.cloudflare.com/api/resources/rules/)
[Rules Trace](https://developers.cloudflare.com/api/resources/request_tracers/)
[Rulesets](https://developers.cloudflare.com/api/resources/rulesets/)
[Snippets](https://developers.cloudflare.com/api/resources/snippets/)
[URL Normalization](https://developers.cloudflare.com/api/resources/url_normalization/)
Security
[API Gateway](https://developers.cloudflare.com/api/resources/api_gateway/)
[Schema Validation](https://developers.cloudflare.com/api/resources/schema_validation/)
[Bot Management](https://developers.cloudflare.com/api/resources/bot_management/)
[Botnet Feed](https://developers.cloudflare.com/api/resources/botnet_feed/)
[Content Scanning](https://developers.cloudflare.com/api/resources/content_scanning/)
[Filters](https://developers.cloudflare.com/api/resources/filters/)
[Firewall](https://developers.cloudflare.com/api/resources/firewall/)
[Fraud](https://developers.cloudflare.com/api/resources/fraud/)
[Leaked Credential Checks](https://developers.cloudflare.com/api/resources/leaked_credential_checks/)
[Page Shield](https://developers.cloudflare.com/api/resources/page_shield/)
[Rate Limits](https://developers.cloudflare.com/api/resources/rate_limits/)
[Security TXT](https://developers.cloudflare.com/api/resources/security_txt/)
[Token Validation](https://developers.cloudflare.com/api/resources/token_validation/)
[Turnstile](https://developers.cloudflare.com/api/resources/turnstile/)
Storage & Databases
[D1](https://developers.cloudflare.com/api/resources/d1/)
[Hyperdrive](https://developers.cloudflare.com/api/resources/hyperdrive/)
[KV](https://developers.cloudflare.com/api/resources/kv/)
[Queues](https://developers.cloudflare.com/api/resources/queues/)
[R2](https://developers.cloudflare.com/api/resources/r2/)
[R2 Data Catalog](https://developers.cloudflare.com/api/resources/r2_data_catalog/)
[Secrets Store](https://developers.cloudflare.com/api/resources/secrets_store/)
[Pipelines](https://developers.cloudflare.com/api/resources/pipelines/)
Threat Intelligence
[Brand Protection](https://developers.cloudflare.com/api/resources/brand_protection/)
[Cloudforce One](https://developers.cloudflare.com/api/resources/cloudforce_one/)
[Intel](https://developers.cloudflare.com/api/resources/intel/)
[URL Scanner](https://developers.cloudflare.com/api/resources/url_scanner/)
Workers & Pages
[Browser Rendering](https://developers.cloudflare.com/api/resources/browser_rendering/)
[Durable Objects](https://developers.cloudflare.com/api/resources/durable_objects/)
[Pages](https://developers.cloudflare.com/api/resources/pages/)
[Workers](https://developers.cloudflare.com/api/resources/workers/)
[Workers Builds](https://developers.cloudflare.com/api/resources/workers_builds/)
[Workers For Platforms](https://developers.cloudflare.com/api/resources/workers_for_platforms/)
[Workflows](https://developers.cloudflare.com/api/resources/workflows/)
[List all Workflows](https://developers.cloudflare.com/api/resources/workflows/methods/list/)
[Get Workflow details](https://developers.cloudflare.com/api/resources/workflows/methods/get/)
[Create/modify Workflow](https://developers.cloudflare.com/api/resources/workflows/methods/update/)
[Deletes a Workflow](https://developers.cloudflare.com/api/resources/workflows/methods/delete/)
* * *
[Instances](https://developers.cloudflare.com/api/resources/workflows/subresources/instances/)
* * *
[Versions](https://developers.cloudflare.com/api/resources/workflows/subresources/versions/)
Shared
[Shared](https://developers.cloudflare.com/api/resources/$shared/)
[Organizations](https://developers.cloudflare.com/api/resources/organizations/)
[Connectivity](https://developers.cloudflare.com/api/resources/connectivity/)
[Zaraz](https://developers.cloudflare.com/api/resources/zaraz/)
[AutoRAG](https://developers.cloudflare.com/api/resources/autorag/)
### Workflows
workflows
Methods
List All Workflows -> V4PagePaginationArray<{ id, class\_name, created\_on, 5 more... }\>
get/accounts/{account\_id}/workflows
List all Workflows
Get Workflow Details -> Envelope<{ id, class\_name, created\_on, 5 more... }\>
get/accounts/{account\_id}/workflows/{workflow\_name}
Get Workflow details
Create Modify Workflow -> Envelope<{ id, class\_name, created\_on, 7 more... }\>
put/accounts/{account\_id}/workflows/{workflow\_name}
Create/modify Workflow
Deletes A Workflow -> Envelope<{ status, success }\>
delete/accounts/{account\_id}/workflows/{workflow\_name}
Deletes a Workflow. This only deletes the Workflow and does not delete or modify any Worker associated to this Workflow or bounded to it.
Security
API Token
The preferred authorization scheme for interacting with the Cloudflare API. [Create a token](https://developers.cloudflare.com/fundamentals/api/get-started/create-token/)
.
Example: Authorization: Bearer Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY
Accepted Permissions (at least one required)
Workers Scripts Write
path Parameters
account\_id: string
workflow\_name: string
(maxLength: 64, minLength: 1)
Response fields
errors: Array<{ code, message }\>
messages: Array<{ code, message }\>
result: { status, success }
success: true
result\_info: { count, per\_page, total\_count, 2 more... }
Optional
Request example cURL
curl https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/workflows/$WORKFLOW_NAME \
-X DELETE \
-H "Authorization: Bearer $CLOUDFLARE_API_TOKEN"
200Example
{
"errors": [\
{\
"code": 0,\
"message": "message"\
}\
],
"messages": [\
{\
"code": 0,\
"message": "message"\
}\
],
"result": {
"status": "ok",
"success": true
},
"success": true,
"result_info": {
"count": 0,
"per_page": 0,
"total_count": 0,
"cursor": "cursor",
"page": 0
}
}
[Workflows](https://developers.cloudflare.com/api/resources/workflows/)
### Instances
workflows.instances
Methods
List Of Workflow Instances -> V4PagePaginationArray<{ id, created\_on, ended\_on, 5 more... }\>
get/accounts/{account\_id}/workflows/{workflow\_name}/instances
List of workflow instances
Get Logs And Status From Instance -> Envelope<{ end, error, output, 8 more... }\>
get/accounts/{account\_id}/workflows/{workflow\_name}/instances/{instance\_id}
Get logs and status from instance
Create A New Workflow Instance -> Envelope<{ id, status, version\_id, 1 more... }\>
post/accounts/{account\_id}/workflows/{workflow\_name}/instances
Create a new workflow instance
Batch Create New Workflow Instances -> SinglePage<{ id, status, version\_id, 1 more... }\>
post/accounts/{account\_id}/workflows/{workflow\_name}/instances/batch
Batch create new Workflow instances
[Workflows](https://developers.cloudflare.com/api/resources/workflows/)
[Instances](https://developers.cloudflare.com/api/resources/workflows/subresources/instances/)
### Events
workflows.instances.events
Methods
Send Event To Instance -> Envelope
post/accounts/{account\_id}/workflows/{workflow\_name}/instances/{instance\_id}/events/{event\_type}
Send event to instance
[Workflows](https://developers.cloudflare.com/api/resources/workflows/)
[Instances](https://developers.cloudflare.com/api/resources/workflows/subresources/instances/)
### Status
workflows.instances.status
Methods
Change Status Of Instance -> Envelope<{ status, timestamp }\>
patch/accounts/{account\_id}/workflows/{workflow\_name}/instances/{instance\_id}/status
Change status of instance
[Workflows](https://developers.cloudflare.com/api/resources/workflows/)
### Versions
workflows.versions
Methods
List Deployed Workflow Versions -> V4PagePaginationArray<{ id, class\_name, created\_on, 2 more... }\>
get/accounts/{account\_id}/workflows/{workflow\_name}/versions
List deployed Workflow versions
Get Workflow Version Details -> Envelope<{ id, class\_name, created\_on, 2 more... }\>
get/accounts/{account\_id}/workflows/{workflow\_name}/versions/{version\_id}
Get Workflow version details

---
# Cloudflare API | Workflows › Instances
[Cloudflare API](https://developers.cloudflare.com/api/)
HTTP
[Docs](https://developers.cloudflare.com/)
SearchCTRL+K
API Reference
[Overview](https://developers.cloudflare.com/api/)
Account & User Management
[Abuse Reports](https://developers.cloudflare.com/api/resources/abuse_reports/)
[Accounts](https://developers.cloudflare.com/api/resources/accounts/)
[Alerting](https://developers.cloudflare.com/api/resources/alerting/)
[Audit Logs](https://developers.cloudflare.com/api/resources/audit_logs/)
[Billing](https://developers.cloudflare.com/api/resources/billing/)
[IAM](https://developers.cloudflare.com/api/resources/iam/)
[Memberships](https://developers.cloudflare.com/api/resources/memberships/)
[Resource Sharing](https://developers.cloudflare.com/api/resources/resource_sharing/)
[User](https://developers.cloudflare.com/api/resources/user/)
[Custom Pages](https://developers.cloudflare.com/api/resources/custom_pages/)
AI
[AI](https://developers.cloudflare.com/api/resources/ai/)
[AI Gateway](https://developers.cloudflare.com/api/resources/ai_gateway/)
[AI Search](https://developers.cloudflare.com/api/resources/ai_search/)
[Vectorize](https://developers.cloudflare.com/api/resources/vectorize/)
Certificate Management
[ACM](https://developers.cloudflare.com/api/resources/acm/)
[Certificate Authorities](https://developers.cloudflare.com/api/resources/certificate_authorities/)
[Client Certificates](https://developers.cloudflare.com/api/resources/client_certificates/)
[Custom Certificates](https://developers.cloudflare.com/api/resources/custom_certificates/)
[Custom Hostnames](https://developers.cloudflare.com/api/resources/custom_hostnames/)
[DCV Delegation](https://developers.cloudflare.com/api/resources/dcv_delegation/)
[Hostnames](https://developers.cloudflare.com/api/resources/hostnames/)
[Keyless Certificates](https://developers.cloudflare.com/api/resources/keyless_certificates/)
[MTLS Certificates](https://developers.cloudflare.com/api/resources/mtls_certificates/)
[Origin CA Certificates](https://developers.cloudflare.com/api/resources/origin_ca_certificates/)
[Origin Post Quantum Encryption](https://developers.cloudflare.com/api/resources/origin_post_quantum_encryption/)
[Origin TLS Client Auth](https://developers.cloudflare.com/api/resources/origin_tls_client_auth/)
[SSL](https://developers.cloudflare.com/api/resources/ssl/)
Cloudflare One
[Email Security](https://developers.cloudflare.com/api/resources/email_security/)
[Zero Trust](https://developers.cloudflare.com/api/resources/zero_trust/)
DNS
[Account Custom Nameservers](https://developers.cloudflare.com/api/resources/custom_nameservers/)
[DNS](https://developers.cloudflare.com/api/resources/dns/)
[DNS Firewall](https://developers.cloudflare.com/api/resources/dns_firewall/)
Domain/Zone Management
[Registrar](https://developers.cloudflare.com/api/resources/registrar/)
[Zones](https://developers.cloudflare.com/api/resources/zones/)
IP Addresses
[Addressing](https://developers.cloudflare.com/api/resources/addressing/)
[IPs](https://developers.cloudflare.com/api/resources/ips/)
Media
[Calls](https://developers.cloudflare.com/api/resources/calls/)
[Images](https://developers.cloudflare.com/api/resources/images/)
[Stream](https://developers.cloudflare.com/api/resources/stream/)
[Realtime Kit](https://developers.cloudflare.com/api/resources/realtime_kit/)
Networking
[Magic Cloud Networking](https://developers.cloudflare.com/api/resources/magic_cloud_networking/)
[Magic Network Monitoring](https://developers.cloudflare.com/api/resources/magic_network_monitoring/)
[Magic Transit](https://developers.cloudflare.com/api/resources/magic_transit/)
[Network Interconnects](https://developers.cloudflare.com/api/resources/network_interconnects/)
Observability
[Diagnostics](https://developers.cloudflare.com/api/resources/diagnostics/)
[Healthchecks](https://developers.cloudflare.com/api/resources/healthchecks/)
[Logpush](https://developers.cloudflare.com/api/resources/logpush/)
[Logs](https://developers.cloudflare.com/api/resources/logs/)
[RUM](https://developers.cloudflare.com/api/resources/rum/)
[Security Center](https://developers.cloudflare.com/api/resources/security_center/)
Radar
[Radar](https://developers.cloudflare.com/api/resources/radar/)
Routing & Performance
[Argo](https://developers.cloudflare.com/api/resources/argo/)
[Cache](https://developers.cloudflare.com/api/resources/cache/)
[Email Routing](https://developers.cloudflare.com/api/resources/email_routing/)
[Load Balancers](https://developers.cloudflare.com/api/resources/load_balancers/)
[Smart Shield](https://developers.cloudflare.com/api/resources/smart_shield/)
[Spectrum](https://developers.cloudflare.com/api/resources/spectrum/)
[Speed](https://developers.cloudflare.com/api/resources/speed/)
[Waiting Rooms](https://developers.cloudflare.com/api/resources/waiting_rooms/)
[Web3](https://developers.cloudflare.com/api/resources/web3/)
Rules
[Cloud Connector](https://developers.cloudflare.com/api/resources/cloud_connector/)
[Managed Transforms](https://developers.cloudflare.com/api/resources/managed_transforms/)
[Page Rules](https://developers.cloudflare.com/api/resources/page_rules/)
[Rules Lists](https://developers.cloudflare.com/api/resources/rules/)
[Rules Trace](https://developers.cloudflare.com/api/resources/request_tracers/)
[Rulesets](https://developers.cloudflare.com/api/resources/rulesets/)
[Snippets](https://developers.cloudflare.com/api/resources/snippets/)
[URL Normalization](https://developers.cloudflare.com/api/resources/url_normalization/)
Security
[API Gateway](https://developers.cloudflare.com/api/resources/api_gateway/)
[Schema Validation](https://developers.cloudflare.com/api/resources/schema_validation/)
[Bot Management](https://developers.cloudflare.com/api/resources/bot_management/)
[Botnet Feed](https://developers.cloudflare.com/api/resources/botnet_feed/)
[Content Scanning](https://developers.cloudflare.com/api/resources/content_scanning/)
[Filters](https://developers.cloudflare.com/api/resources/filters/)
[Firewall](https://developers.cloudflare.com/api/resources/firewall/)
[Fraud](https://developers.cloudflare.com/api/resources/fraud/)
[Leaked Credential Checks](https://developers.cloudflare.com/api/resources/leaked_credential_checks/)
[Page Shield](https://developers.cloudflare.com/api/resources/page_shield/)
[Rate Limits](https://developers.cloudflare.com/api/resources/rate_limits/)
[Security TXT](https://developers.cloudflare.com/api/resources/security_txt/)
[Token Validation](https://developers.cloudflare.com/api/resources/token_validation/)
[Turnstile](https://developers.cloudflare.com/api/resources/turnstile/)
Storage & Databases
[D1](https://developers.cloudflare.com/api/resources/d1/)
[Hyperdrive](https://developers.cloudflare.com/api/resources/hyperdrive/)
[KV](https://developers.cloudflare.com/api/resources/kv/)
[Queues](https://developers.cloudflare.com/api/resources/queues/)
[R2](https://developers.cloudflare.com/api/resources/r2/)
[R2 Data Catalog](https://developers.cloudflare.com/api/resources/r2_data_catalog/)
[Secrets Store](https://developers.cloudflare.com/api/resources/secrets_store/)
[Pipelines](https://developers.cloudflare.com/api/resources/pipelines/)
Threat Intelligence
[Brand Protection](https://developers.cloudflare.com/api/resources/brand_protection/)
[Cloudforce One](https://developers.cloudflare.com/api/resources/cloudforce_one/)
[Intel](https://developers.cloudflare.com/api/resources/intel/)
[URL Scanner](https://developers.cloudflare.com/api/resources/url_scanner/)
Workers & Pages
[Browser Rendering](https://developers.cloudflare.com/api/resources/browser_rendering/)
[Durable Objects](https://developers.cloudflare.com/api/resources/durable_objects/)
[Pages](https://developers.cloudflare.com/api/resources/pages/)
[Workers](https://developers.cloudflare.com/api/resources/workers/)
[Workers Builds](https://developers.cloudflare.com/api/resources/workers_builds/)
[Workers For Platforms](https://developers.cloudflare.com/api/resources/workers_for_platforms/)
[Workflows](https://developers.cloudflare.com/api/resources/workflows/)
[List all Workflows](https://developers.cloudflare.com/api/resources/workflows/methods/list/)
[Get Workflow details](https://developers.cloudflare.com/api/resources/workflows/methods/get/)
[Create/modify Workflow](https://developers.cloudflare.com/api/resources/workflows/methods/update/)
[Deletes a Workflow](https://developers.cloudflare.com/api/resources/workflows/methods/delete/)
* * *
[Instances](https://developers.cloudflare.com/api/resources/workflows/subresources/instances/)
[List of workflow instances](https://developers.cloudflare.com/api/resources/workflows/subresources/instances/methods/list/)
[Get logs and status from instance](https://developers.cloudflare.com/api/resources/workflows/subresources/instances/methods/get/)
[Create a new workflow instance](https://developers.cloudflare.com/api/resources/workflows/subresources/instances/methods/create/)
[Batch create new Workflow instances](https://developers.cloudflare.com/api/resources/workflows/subresources/instances/methods/bulk/)
* * *
[Events](https://developers.cloudflare.com/api/resources/workflows/subresources/instances/subresources/events/)
* * *
[Status](https://developers.cloudflare.com/api/resources/workflows/subresources/instances/subresources/status/)
* * *
[Versions](https://developers.cloudflare.com/api/resources/workflows/subresources/versions/)
Shared
[Shared](https://developers.cloudflare.com/api/resources/$shared/)
[Organizations](https://developers.cloudflare.com/api/resources/organizations/)
[Connectivity](https://developers.cloudflare.com/api/resources/connectivity/)
[Zaraz](https://developers.cloudflare.com/api/resources/zaraz/)
[AutoRAG](https://developers.cloudflare.com/api/resources/autorag/)
### Workflows
workflows
Methods
List All Workflows -> V4PagePaginationArray<{ id, class\_name, created\_on, 5 more... }\>
get/accounts/{account\_id}/workflows
List all Workflows
Get Workflow Details -> Envelope<{ id, class\_name, created\_on, 5 more... }\>
get/accounts/{account\_id}/workflows/{workflow\_name}
Get Workflow details
Create Modify Workflow -> Envelope<{ id, class\_name, created\_on, 7 more... }\>
put/accounts/{account\_id}/workflows/{workflow\_name}
Create/modify Workflow
Deletes A Workflow -> Envelope<{ status, success }\>
delete/accounts/{account\_id}/workflows/{workflow\_name}
Deletes a Workflow. This only deletes the Workflow and does not delete or modify any Worker associated to this Workflow or bounded to it.
[Workflows](https://developers.cloudflare.com/api/resources/workflows/)
### Instances
workflows.instances
Methods
List Of Workflow Instances -> V4PagePaginationArray<{ id, created\_on, ended\_on, 5 more... }\>
get/accounts/{account\_id}/workflows/{workflow\_name}/instances
List of workflow instances
Get Logs And Status From Instance -> Envelope<{ end, error, output, 8 more... }\>
get/accounts/{account\_id}/workflows/{workflow\_name}/instances/{instance\_id}
Get logs and status from instance
Create A New Workflow Instance -> Envelope<{ id, status, version\_id, 1 more... }\>
post/accounts/{account\_id}/workflows/{workflow\_name}/instances
Create a new workflow instance
Batch Create New Workflow Instances -> SinglePage<{ id, status, version\_id, 1 more... }\>
post/accounts/{account\_id}/workflows/{workflow\_name}/instances/batch
Batch create new Workflow instances
[Workflows](https://developers.cloudflare.com/api/resources/workflows/)
[Instances](https://developers.cloudflare.com/api/resources/workflows/subresources/instances/)
### Events
workflows.instances.events
Methods
Send Event To Instance -> Envelope
post/accounts/{account\_id}/workflows/{workflow\_name}/instances/{instance\_id}/events/{event\_type}
Send event to instance
[Workflows](https://developers.cloudflare.com/api/resources/workflows/)
[Instances](https://developers.cloudflare.com/api/resources/workflows/subresources/instances/)
### Status
workflows.instances.status
Methods
Change Status Of Instance -> Envelope<{ status, timestamp }\>
patch/accounts/{account\_id}/workflows/{workflow\_name}/instances/{instance\_id}/status
Change status of instance
[Workflows](https://developers.cloudflare.com/api/resources/workflows/)
### Versions
workflows.versions
Methods
List Deployed Workflow Versions -> V4PagePaginationArray<{ id, class\_name, created\_on, 2 more... }\>
get/accounts/{account\_id}/workflows/{workflow\_name}/versions
List deployed Workflow versions
Get Workflow Version Details -> Envelope<{ id, class\_name, created\_on, 2 more... }\>
get/accounts/{account\_id}/workflows/{workflow\_name}/versions/{version\_id}
Get Workflow version details

---
# Agents · Cloudflare Agents docs
[Skip to content](https://developers.cloudflare.com/workflows/examples/agents/#_top)
Copy page
Build Agents on Cloudflare
==========================
The Agents SDK enables you to build and deploy AI-powered agents that can autonomously perform tasks, communicate with clients in real time, call AI models, persist state, schedule tasks, run asynchronous workflows, browse the web, query data from your database, support human-in-the-loop interactions, and [a lot more](https://developers.cloudflare.com/agents/api-reference/)
.
### Ship your first Agent
[](https://developers.cloudflare.com/workflows/examples/agents/#ship-your-first-agent)
To use the Agent starter template and create your first Agent with the Agents SDK:
1. Create a new project:
npx create-cloudflare@latest --template cloudflare/agents-starter
2. Install dependencies:
npm install
3. Set up your environment:
Create a `.dev.vars` file:
OPENAI_API_KEY=your_openai_api_key
4. Run locally:
npm start
5. Deploy:
npm run deploy
Head to the guide on [building a chat agent](https://developers.cloudflare.com/agents/getting-started/build-a-chat-agent)
to learn how the starter project is built and how to use it as a foundation for your own agents.
If you're already building on [Workers](https://developers.cloudflare.com/workers/)
, you can install the `agents` package directly into an existing project:
npm i agents
And then define your first Agent by creating a class that extends the `Agent` class:
* [JavaScript](https://developers.cloudflare.com/workflows/examples/agents/#tab-panel-723)
* [TypeScript](https://developers.cloudflare.com/workflows/examples/agents/#tab-panel-724)
import { Agent } from "agents";
export class MyAgent extends Agent { // Define methods on the Agent: // https://developers.cloudflare.com/agents/api-reference/agents-api/ // // Every Agent has built in state via this.setState and this.sql // Built-in scheduling via this.schedule // Agents support WebSockets, HTTP requests, state synchronization and // can run for seconds, minutes or hours: as long as the tasks need.}
import { Agent } from "agents";
export class MyAgent extends Agent { // Define methods on the Agent: // https://developers.cloudflare.com/agents/api-reference/agents-api/ // // Every Agent has built in state via this.setState and this.sql // Built-in scheduling via this.schedule // Agents support WebSockets, HTTP requests, state synchronization and // can run for seconds, minutes or hours: as long as the tasks need.}
Lastly, add the [Durable Objects](https://developers.cloudflare.com/durable-objects/)
binding to your wrangler file:
* [wrangler.jsonc](https://developers.cloudflare.com/workflows/examples/agents/#tab-panel-721)
* [wrangler.toml](https://developers.cloudflare.com/workflows/examples/agents/#tab-panel-722)
{ "$schema": "./node_modules/wrangler/config-schema.json", "durable_objects": { "bindings": [ { "name": "MyAgent", "class_name": "MyAgent" } ] }, "migrations": [ { "tag": "v1", "new_sqlite_classes": [ "MyAgent" ] } ]}
[[durable_objects.bindings]]name = "MyAgent"class_name = "MyAgent"
[[migrations]]tag = "v1"new_sqlite_classes = ["MyAgent"]
Dive into the [Agent SDK reference](https://developers.cloudflare.com/agents/api-reference/agents-api/)
to learn more about how to use the Agents SDK package and defining an `Agent`.
### Why build agents on Cloudflare?
[](https://developers.cloudflare.com/workflows/examples/agents/#why-build-agents-on-cloudflare)
We built the Agents SDK with a few things in mind:
* **Batteries (state) included**: Agents come with [built-in state management](https://developers.cloudflare.com/agents/api-reference/store-and-sync-state/)
, with the ability to automatically sync state between an Agent and clients, trigger events on state changes, and read+write to each Agent's SQL database.
* **Communicative**: You can connect to an Agent via [WebSockets](https://developers.cloudflare.com/agents/api-reference/websockets/)
and stream updates back to client in real-time. Handle a long-running response from a reasoning model, the results of an [asynchronous workflow](https://developers.cloudflare.com/agents/api-reference/run-workflows/)
, or build a chat app that builds on the `useAgent` hook included in the Agents SDK.
* **Extensible**: Agents are code. Use the [AI models](https://developers.cloudflare.com/agents/api-reference/using-ai-models/)
you want, bring-your-own headless browser service, pull data from your database hosted in another cloud, add your own methods to your Agent and call them.
Agents built with Agents SDK can be deployed directly to Cloudflare and run on top of [Durable Objects](https://developers.cloudflare.com/durable-objects/)
— which you can think of as stateful micro-servers that can scale to tens of millions — and are able to run wherever they need to. Run your Agents close to a user for low-latency interactivity, close to your data for throughput, and/or anywhere in between.
* * *
### Build on the Cloudflare Platform
[](https://developers.cloudflare.com/workflows/examples/agents/#build-on-the-cloudflare-platform)
**[Workers](https://developers.cloudflare.com/workers/)
**
Build serverless applications and deploy instantly across the globe for exceptional performance, reliability, and scale.
**[AI Gateway](https://developers.cloudflare.com/ai-gateway/)
**
Observe and control your AI applications with caching, rate limiting, request retries, model fallback, and more.
**[Vectorize](https://developers.cloudflare.com/vectorize/)
**
Build full-stack AI applications with Vectorize, Cloudflare’s vector database. Adding Vectorize enables you to perform tasks such as semantic search, recommendations, anomaly detection or can be used to provide context and memory to an LLM.
**[Workers AI](https://developers.cloudflare.com/workers-ai/)
**
Run machine learning models, powered by serverless GPUs, on Cloudflare's global network.
**[Workflows](https://developers.cloudflare.com/workflows/)
**
Build stateful agents that guarantee executions, including automatic retries, persistent state that runs for minutes, hours, days, or weeks.
Was this helpful?
-----------------
* **Resources**
* [API](https://developers.cloudflare.com/api/)
* [New to Cloudflare?](https://developers.cloudflare.com/fundamentals/)
* [Directory](https://developers.cloudflare.com/directory/)
* [Sponsorships](https://developers.cloudflare.com/sponsorships/)
* [Open Source](https://github.com/cloudflare)
* **Support**
* [Help Center](https://support.cloudflare.com/)
* [System Status](https://www.cloudflarestatus.com/)
* [Compliance](https://www.cloudflare.com/trust-hub/compliance-resources/)
* [GDPR](https://www.cloudflare.com/trust-hub/gdpr/)
* **Company**
* [cloudflare.com](https://www.cloudflare.com/)
* [Our team](https://www.cloudflare.com/people/)
* [Careers](https://www.cloudflare.com/careers/)
* **Tools**
* [Cloudflare Radar](https://radar.cloudflare.com/)
* [Speed Test](https://speed.cloudflare.com/)
* [Is BGP Safe Yet?](https://isbgpsafeyet.com/)
* [RPKI Toolkit](https://rpki.cloudflare.com/)
* [Certificate Transparency](https://ct.cloudflare.com/)
* **Community**
* [X](https://x.com/cloudflare)
* [Discord](http://discord.cloudflare.com/)
* [YouTube](https://www.youtube.com/cloudflare)
* [GitHub](https://github.com/cloudflare/cloudflare-docs)
* © 2026 Cloudflare, Inc.
* [Privacy Policy](https://www.cloudflare.com/privacypolicy/)
* [Terms of Use](https://www.cloudflare.com/website-terms/)
* [Report Security Issues](https://www.cloudflare.com/disclosure/)
* [Trademark](https://www.cloudflare.com/trademark/)
*  Your Privacy Choices
Back to top

---
# Cloudflare API | Workflows › List All Workflows
[Cloudflare API](https://developers.cloudflare.com/api/)
HTTP
[Docs](https://developers.cloudflare.com/)
SearchCTRL+K
API Reference
[Overview](https://developers.cloudflare.com/api/)
Account & User Management
[Abuse Reports](https://developers.cloudflare.com/api/resources/abuse_reports/)
[Accounts](https://developers.cloudflare.com/api/resources/accounts/)
[Alerting](https://developers.cloudflare.com/api/resources/alerting/)
[Audit Logs](https://developers.cloudflare.com/api/resources/audit_logs/)
[Billing](https://developers.cloudflare.com/api/resources/billing/)
[IAM](https://developers.cloudflare.com/api/resources/iam/)
[Memberships](https://developers.cloudflare.com/api/resources/memberships/)
[Resource Sharing](https://developers.cloudflare.com/api/resources/resource_sharing/)
[User](https://developers.cloudflare.com/api/resources/user/)
[Custom Pages](https://developers.cloudflare.com/api/resources/custom_pages/)
AI
[AI](https://developers.cloudflare.com/api/resources/ai/)
[AI Gateway](https://developers.cloudflare.com/api/resources/ai_gateway/)
[AI Search](https://developers.cloudflare.com/api/resources/ai_search/)
[Vectorize](https://developers.cloudflare.com/api/resources/vectorize/)
Certificate Management
[ACM](https://developers.cloudflare.com/api/resources/acm/)
[Certificate Authorities](https://developers.cloudflare.com/api/resources/certificate_authorities/)
[Client Certificates](https://developers.cloudflare.com/api/resources/client_certificates/)
[Custom Certificates](https://developers.cloudflare.com/api/resources/custom_certificates/)
[Custom Hostnames](https://developers.cloudflare.com/api/resources/custom_hostnames/)
[DCV Delegation](https://developers.cloudflare.com/api/resources/dcv_delegation/)
[Hostnames](https://developers.cloudflare.com/api/resources/hostnames/)
[Keyless Certificates](https://developers.cloudflare.com/api/resources/keyless_certificates/)
[MTLS Certificates](https://developers.cloudflare.com/api/resources/mtls_certificates/)
[Origin CA Certificates](https://developers.cloudflare.com/api/resources/origin_ca_certificates/)
[Origin Post Quantum Encryption](https://developers.cloudflare.com/api/resources/origin_post_quantum_encryption/)
[Origin TLS Client Auth](https://developers.cloudflare.com/api/resources/origin_tls_client_auth/)
[SSL](https://developers.cloudflare.com/api/resources/ssl/)
Cloudflare One
[Email Security](https://developers.cloudflare.com/api/resources/email_security/)
[Zero Trust](https://developers.cloudflare.com/api/resources/zero_trust/)
DNS
[Account Custom Nameservers](https://developers.cloudflare.com/api/resources/custom_nameservers/)
[DNS](https://developers.cloudflare.com/api/resources/dns/)
[DNS Firewall](https://developers.cloudflare.com/api/resources/dns_firewall/)
Domain/Zone Management
[Registrar](https://developers.cloudflare.com/api/resources/registrar/)
[Zones](https://developers.cloudflare.com/api/resources/zones/)
IP Addresses
[Addressing](https://developers.cloudflare.com/api/resources/addressing/)
[IPs](https://developers.cloudflare.com/api/resources/ips/)
Media
[Calls](https://developers.cloudflare.com/api/resources/calls/)
[Images](https://developers.cloudflare.com/api/resources/images/)
[Stream](https://developers.cloudflare.com/api/resources/stream/)
[Realtime Kit](https://developers.cloudflare.com/api/resources/realtime_kit/)
Networking
[Magic Cloud Networking](https://developers.cloudflare.com/api/resources/magic_cloud_networking/)
[Magic Network Monitoring](https://developers.cloudflare.com/api/resources/magic_network_monitoring/)
[Magic Transit](https://developers.cloudflare.com/api/resources/magic_transit/)
[Network Interconnects](https://developers.cloudflare.com/api/resources/network_interconnects/)
Observability
[Diagnostics](https://developers.cloudflare.com/api/resources/diagnostics/)
[Healthchecks](https://developers.cloudflare.com/api/resources/healthchecks/)
[Logpush](https://developers.cloudflare.com/api/resources/logpush/)
[Logs](https://developers.cloudflare.com/api/resources/logs/)
[RUM](https://developers.cloudflare.com/api/resources/rum/)
[Security Center](https://developers.cloudflare.com/api/resources/security_center/)
Radar
[Radar](https://developers.cloudflare.com/api/resources/radar/)
Routing & Performance
[Argo](https://developers.cloudflare.com/api/resources/argo/)
[Cache](https://developers.cloudflare.com/api/resources/cache/)
[Email Routing](https://developers.cloudflare.com/api/resources/email_routing/)
[Load Balancers](https://developers.cloudflare.com/api/resources/load_balancers/)
[Smart Shield](https://developers.cloudflare.com/api/resources/smart_shield/)
[Spectrum](https://developers.cloudflare.com/api/resources/spectrum/)
[Speed](https://developers.cloudflare.com/api/resources/speed/)
[Waiting Rooms](https://developers.cloudflare.com/api/resources/waiting_rooms/)
[Web3](https://developers.cloudflare.com/api/resources/web3/)
Rules
[Cloud Connector](https://developers.cloudflare.com/api/resources/cloud_connector/)
[Managed Transforms](https://developers.cloudflare.com/api/resources/managed_transforms/)
[Page Rules](https://developers.cloudflare.com/api/resources/page_rules/)
[Rules Lists](https://developers.cloudflare.com/api/resources/rules/)
[Rules Trace](https://developers.cloudflare.com/api/resources/request_tracers/)
[Rulesets](https://developers.cloudflare.com/api/resources/rulesets/)
[Snippets](https://developers.cloudflare.com/api/resources/snippets/)
[URL Normalization](https://developers.cloudflare.com/api/resources/url_normalization/)
Security
[API Gateway](https://developers.cloudflare.com/api/resources/api_gateway/)
[Schema Validation](https://developers.cloudflare.com/api/resources/schema_validation/)
[Bot Management](https://developers.cloudflare.com/api/resources/bot_management/)
[Botnet Feed](https://developers.cloudflare.com/api/resources/botnet_feed/)
[Content Scanning](https://developers.cloudflare.com/api/resources/content_scanning/)
[Filters](https://developers.cloudflare.com/api/resources/filters/)
[Firewall](https://developers.cloudflare.com/api/resources/firewall/)
[Fraud](https://developers.cloudflare.com/api/resources/fraud/)
[Leaked Credential Checks](https://developers.cloudflare.com/api/resources/leaked_credential_checks/)
[Page Shield](https://developers.cloudflare.com/api/resources/page_shield/)
[Rate Limits](https://developers.cloudflare.com/api/resources/rate_limits/)
[Security TXT](https://developers.cloudflare.com/api/resources/security_txt/)
[Token Validation](https://developers.cloudflare.com/api/resources/token_validation/)
[Turnstile](https://developers.cloudflare.com/api/resources/turnstile/)
Storage & Databases
[D1](https://developers.cloudflare.com/api/resources/d1/)
[Hyperdrive](https://developers.cloudflare.com/api/resources/hyperdrive/)
[KV](https://developers.cloudflare.com/api/resources/kv/)
[Queues](https://developers.cloudflare.com/api/resources/queues/)
[R2](https://developers.cloudflare.com/api/resources/r2/)
[R2 Data Catalog](https://developers.cloudflare.com/api/resources/r2_data_catalog/)
[Secrets Store](https://developers.cloudflare.com/api/resources/secrets_store/)
[Pipelines](https://developers.cloudflare.com/api/resources/pipelines/)
Threat Intelligence
[Brand Protection](https://developers.cloudflare.com/api/resources/brand_protection/)
[Cloudforce One](https://developers.cloudflare.com/api/resources/cloudforce_one/)
[Intel](https://developers.cloudflare.com/api/resources/intel/)
[URL Scanner](https://developers.cloudflare.com/api/resources/url_scanner/)
Workers & Pages
[Browser Rendering](https://developers.cloudflare.com/api/resources/browser_rendering/)
[Durable Objects](https://developers.cloudflare.com/api/resources/durable_objects/)
[Pages](https://developers.cloudflare.com/api/resources/pages/)
[Workers](https://developers.cloudflare.com/api/resources/workers/)
[Workers Builds](https://developers.cloudflare.com/api/resources/workers_builds/)
[Workers For Platforms](https://developers.cloudflare.com/api/resources/workers_for_platforms/)
[Workflows](https://developers.cloudflare.com/api/resources/workflows/)
[List all Workflows](https://developers.cloudflare.com/api/resources/workflows/methods/list/)
[Get Workflow details](https://developers.cloudflare.com/api/resources/workflows/methods/get/)
[Create/modify Workflow](https://developers.cloudflare.com/api/resources/workflows/methods/update/)
[Deletes a Workflow](https://developers.cloudflare.com/api/resources/workflows/methods/delete/)
* * *
[Instances](https://developers.cloudflare.com/api/resources/workflows/subresources/instances/)
* * *
[Versions](https://developers.cloudflare.com/api/resources/workflows/subresources/versions/)
Shared
[Shared](https://developers.cloudflare.com/api/resources/$shared/)
[Organizations](https://developers.cloudflare.com/api/resources/organizations/)
[Connectivity](https://developers.cloudflare.com/api/resources/connectivity/)
[Zaraz](https://developers.cloudflare.com/api/resources/zaraz/)
[AutoRAG](https://developers.cloudflare.com/api/resources/autorag/)
### Workflows
workflows
Methods
List All Workflows -> V4PagePaginationArray<{ id, class\_name, created\_on, 5 more... }\>
get/accounts/{account\_id}/workflows
List all Workflows
Security
API Token
The preferred authorization scheme for interacting with the Cloudflare API. [Create a token](https://developers.cloudflare.com/fundamentals/api/get-started/create-token/)
.
Example: Authorization: Bearer Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY
Accepted Permissions (at least one required)
Workers Tail Read Workers Scripts Write Workers Scripts Read
path Parameters
account\_id: string
query Parameters
page: number
Optional
(minimum: 1, default: 1)
per\_page: number
Optional
(maximum: 100, minimum: 1, default: 10)
search: string
Optional
(maxLength: 64, minLength: 1)
Allows filtering workflows\` name.
Response fields
errors: Array<{ code, message }\>
messages: Array<{ code, message }\>
result: Array<{ id, class\_name, created\_on, 5 more... }\>
success: true
result\_info: { count, per\_page, total\_count, 2 more... }
Optional
Request example cURL
curl https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/workflows \
-H "Authorization: Bearer $CLOUDFLARE_API_TOKEN"
200Example
{
"errors": [\
{\
"code": 0,\
"message": "message"\
}\
],
"messages": [\
{\
"code": 0,\
"message": "message"\
}\
],
"result": [\
{\
"id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\
"class_name": "class_name",\
"created_on": "2019-12-27T18:11:19.117Z",\
"instances": {\
"complete": 0,\
"errored": 0,\
"paused": 0,\
"queued": 0,\
"running": 0,\
"terminated": 0,\
"waiting": 0,\
"waitingForPause": 0\
},\
"modified_on": "2019-12-27T18:11:19.117Z",\
"name": "x",\
"script_name": "script_name",\
"triggered_on": "2019-12-27T18:11:19.117Z"\
}\
],
"success": true,
"result_info": {
"count": 0,
"per_page": 0,
"total_count": 0,
"cursor": "cursor",
"page": 0
}
}
Get Workflow Details -> Envelope<{ id, class\_name, created\_on, 5 more... }\>
get/accounts/{account\_id}/workflows/{workflow\_name}
Get Workflow details
Create Modify Workflow -> Envelope<{ id, class\_name, created\_on, 7 more... }\>
put/accounts/{account\_id}/workflows/{workflow\_name}
Create/modify Workflow
Deletes A Workflow -> Envelope<{ status, success }\>
delete/accounts/{account\_id}/workflows/{workflow\_name}
Deletes a Workflow. This only deletes the Workflow and does not delete or modify any Worker associated to this Workflow or bounded to it.
[Workflows](https://developers.cloudflare.com/api/resources/workflows/)
### Instances
workflows.instances
Methods
List Of Workflow Instances -> V4PagePaginationArray<{ id, created\_on, ended\_on, 5 more... }\>
get/accounts/{account\_id}/workflows/{workflow\_name}/instances
List of workflow instances
Get Logs And Status From Instance -> Envelope<{ end, error, output, 8 more... }\>
get/accounts/{account\_id}/workflows/{workflow\_name}/instances/{instance\_id}
Get logs and status from instance
Create A New Workflow Instance -> Envelope<{ id, status, version\_id, 1 more... }\>
post/accounts/{account\_id}/workflows/{workflow\_name}/instances
Create a new workflow instance
Batch Create New Workflow Instances -> SinglePage<{ id, status, version\_id, 1 more... }\>
post/accounts/{account\_id}/workflows/{workflow\_name}/instances/batch
Batch create new Workflow instances
[Workflows](https://developers.cloudflare.com/api/resources/workflows/)
[Instances](https://developers.cloudflare.com/api/resources/workflows/subresources/instances/)
### Events
workflows.instances.events
Methods
Send Event To Instance -> Envelope
post/accounts/{account\_id}/workflows/{workflow\_name}/instances/{instance\_id}/events/{event\_type}
Send event to instance
[Workflows](https://developers.cloudflare.com/api/resources/workflows/)
[Instances](https://developers.cloudflare.com/api/resources/workflows/subresources/instances/)
### Status
workflows.instances.status
Methods
Change Status Of Instance -> Envelope<{ status, timestamp }\>
patch/accounts/{account\_id}/workflows/{workflow\_name}/instances/{instance\_id}/status
Change status of instance
[Workflows](https://developers.cloudflare.com/api/resources/workflows/)
### Versions
workflows.versions
Methods
List Deployed Workflow Versions -> V4PagePaginationArray<{ id, class\_name, created\_on, 2 more... }\>
get/accounts/{account\_id}/workflows/{workflow\_name}/versions
List deployed Workflow versions
Get Workflow Version Details -> Envelope<{ id, class\_name, created\_on, 2 more... }\>
get/accounts/{account\_id}/workflows/{workflow\_name}/versions/{version\_id}
Get Workflow version details

---