# The Flows API: demo flows from code, reviewed by people

> The Flows API lets a coding agent such as Claude Code, or your own script, write demo flows for TalkDemo from your product's code and tests. With a workspace API key, it reads an agent's flow context, validates flows and proposes them as drafts. It can never activate, edit or delete a flow: a person reviews each draft on the Flows tab and marks it active.

Source: https://talkdemo.com/integrations/flows-api · Updated 2026-11-20

## Key takeaways

- Keys are created by a workspace Admin in Settings, with read and draft scopes, an expiry and an optional limit to one agent.
- Drafts use the same flow format and the same checks as an imported recording: sign-in steps and secret-looking values are removed.
- The key never sees the demo login and cannot activate, change or delete a flow.
- The TalkDemo CLI and MCP server that wrap the API are not on npm yet; the API works without them.

## What the Flows API can do

| Request | What it does |
| --- | --- |
| Flow context | Returns the agent's demo tenant address, allowed pages, guardrails and existing flows, never the login |
| Validate drafts | Checks flows without saving them and lists the steps that need a look |
| Propose drafts | Saves one or more flows as drafts, all or nothing, with an optional idempotency key so a retry never duplicates |
| Read a flow | Returns one flow so a coding agent can improve it and propose a new draft |

## How Claude Code uses the Flows API

Your developers already have the clearest map of your product: its routes, navigation and end-to-end tests. On the Flows tab, Add flow has a Create flows with Claude Code panel with a prompt to copy. Run inside your repository, the coding agent reads the code, picks the journeys buyers ask about, writes each flow with stable selectors and spoken narration, validates it and proposes it. The drafts arrive on the Flows tab with the source Claude Code.

TalkDemo never receives your source code. The coding agent runs on your developer's machine and sends only the flows it proposes. It is told to suggest data-testid attributes as a separate change for your developers to review, never to edit application code silently.

## Keys, limits and review

- Keys are shown once and stored only as a keyed hash. They expire after 30, 90, 180 or 365 days and can be revoked at any time.
- Each request re-checks that the key's creator is still an Admin or Member of the workspace.
- Requests are rate limited per key, and browser pages on other sites cannot call the API.
- Drafts that touch pages outside your allowed hosts and paths are flagged for review.

## Frequently asked questions

### Do we need the CLI to use the Flows API?

No. The API is plain HTTPS with a bearer key, so any script can call it. The TalkDemo CLI and MCP server make it easier for coding agents; they are not on npm yet.

### Can an API key put a flow in front of prospects?

No. Keys can only propose drafts. A person on your team reviews each draft and marks it active before the agent uses it.

### Which plans include the Flows API?

Recorded flows belong to live product mode, which comes with the Growth plan and above.

### Does the coding agent see our demo password?

No. Flow context never includes the demo login or login steps, and secret-looking values in proposed flows are removed on TalkDemo's side.

## Related pages

- [Create flows with Claude Code](https://talkdemo.com/help/product-and-flows/create-flows-with-claude-code)
- [API keys](https://talkdemo.com/help/team-and-settings/api-keys)
- [Recorded flows](https://talkdemo.com/features/recorded-flows)
- [Guardrails and demo tenants](https://talkdemo.com/features/guardrails-and-demo-tenants)
