canonical: https://jentic.com/apis/enforcedflow.com/enforcedflow

# EnforcedFlow API

Jentic publishes the only available OpenAPI specification for EnforcedFlow API, keeping it validated and agent-ready. EnforcedFlow provides no-code AI automation with human-in-the-loop review tasks and round-robin agent management. The API lets developers create review tasks, register agents into groups, fetch the next available agent, and run simple round-robin assignment for any list of items. It is targeted at teams that want AI workflows where a human reviews or approves automated decisions.

## For AI agents

Create human-in-the-loop review tasks, register reviewer agents, and pull the next assignment via round-robin distribution.

## Scope

Does not handle full workflow design, document signing, or chat-based collaboration - use for creating human-in-the-loop tasks and round-robin reviewer assignment only.

## Capabilities

- Create a human-in-the-loop review task tied to an automated decision
- Register or update an agent within a named review group
- List agents that belong to a specific review group
- Fetch the next agent in a round-robin to assign work to
- Run round-robin assignment for arbitrary items, not just agents

## Use cases

### AI Output Review Queue

When an AI agent produces a sensitive output (e.g. a contract clause or a refund decision), it calls POST /tasks to file a human-in-the-loop review task. EnforcedFlow then routes that task to the next available reviewer. This gives teams a quick way to add an oversight layer to LLM workflows without building a custom queue.

Example prompt: On any LLM output flagged 'high-risk', create a review task in EnforcedFlow with the relevant context

### Reviewer Pool Management

Use POST /agents to register a reviewer into a named group and GET /agents to list everyone currently on rotation. Combined with GET `/agents/next`, this gives ops teams a working assignment queue with one API surface and no infrastructure of their own.

Example prompt: Register reviewer 'alice@example.com' in group 'compliance' and confirm she appears in the group listing

### Generic Round-Robin Distribution

GET `/round-robin/next` returns the next item from any list using a simple round-robin counter, useful for distributing leads, tickets, or escalations beyond just reviewer assignment. The same primitive backs the agent assignment flow.

Example prompt: Call the round-robin endpoint to assign the next inbound lead to one of three sales reps

### Agent-Driven Approval Pipeline

An AI agent that drafts customer-facing replies searches Jentic for 'create a review task', loads EnforcedFlow's POST /tasks schema, and creates a task each time the draft passes a confidence threshold for human review. Reviewers are pulled via GET `/agents/next` so assignment stays balanced.

Example prompt: On every drafted email above 200 words, create a task in EnforcedFlow and assign it to the next agent in 'email-review'

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| POST | `/tasks` | Create a human-in-the-loop task |
| POST | `/agents` | Add or update an agent |
| GET | `/agents` | List agents in a group |
| GET | `/agents/next` | Get the next agent in round-robin |
| GET | `/round-robin/next` | Get the next item in a generic round-robin |

## Key resources

- **Tasks** — Human-in-the-loop review tasks
- **Agents** — Reviewer agents organised into groups
- **Round-Robin** — Generic round-robin assignment endpoint

## Why Jentic

- **Setup:** Wiring the EnforcedFlow API by hand means setting up its X-API-Key header, formatting task, agent, and round-robin calls, and handling your own errors against https://api.enforcedflow.com/v1. Through Jentic you install once, import the EnforcedFlow API from the API Directory, store the key once, and your agent calls it.
- **Permission scoping:** The EnforcedFlow API creates tasks and agents through body-based POST calls with no resource id in the URL path, so scope it by operation: limit the agent to the operations it needs, such as reading the next round-robin reviewer, and leave task creation out of the allowed set unless you add it.
- **Credential handling:** Your EnforcedFlow API key is stored once, encrypted, by your own Jentic One instance and injected at execution time. It never enters the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'create a human-in-the-loop task' or 'get the next reviewer in the rotation', and Jentic returns the matching EnforcedFlow operation with its input schema so the agent calls the right endpoint without browsing the reference docs.

## Related APIs

- **EndorseFlow API** — EndorseFlow handles testimonial requests, EnforcedFlow handles review-task assignment - both are lightweight workflow APIs but different domains.
- **EngageBay CRM REST API** — EngageBay holds the customer or ticket; EnforcedFlow can route reviews of those records to humans.
- **Engage.so API** — Engage.so sends user messages; EnforcedFlow can gate which messages go out via human review.

## FAQ

### Why is there no official OpenAPI spec for EnforcedFlow API?

EnforcedFlow does not publish an OpenAPI specification publicly. Jentic generates and maintains this spec so that AI agents and developers can call EnforcedFlow API via structured tooling. It is validated against the live API and kept up to date. Get started with Jentic One, the self-hosted execution layer.

### What authentication does the EnforcedFlow API use?

The API uses an API key via the `apiKey` security scheme. Through Jentic, the key is stored encrypted in the vault and supplied at execution time so the agent never sees the raw value.

### Can I create human-in-the-loop tasks with EnforcedFlow?

Yes. POST /tasks creates a review task that EnforcedFlow then routes to the next available reviewer. Use POST /agents first to register the reviewers in the relevant group.

### How does round-robin assignment work in EnforcedFlow?

GET `/agents/next` returns the next reviewer for a group, and GET `/round-robin/next` returns the next item in a generic round-robin. Both endpoints maintain the rotation state server-side, so callers don't have to track who's up next.

### What are the rate limits for the EnforcedFlow API?

The OpenAPI spec does not declare rate limits. Treat as workspace-scoped throttling and back off on HTTP 429; confirm the exact limits with EnforcedFlow support.

### How do I create a review task through Jentic?

Run `pip install jentic`, search 'create a human in the loop review task', and Jentic returns POST /tasks with its input schema. The agent supplies task context and executes against base URL https://api.enforcedflow.com/v1.

### Can I limit what my agent is allowed to do with the EnforcedFlow API?

Yes. Because you run Jentic One yourself, your own rules decide which EnforcedFlow operations the agent may call, and the API scopes cleanly by operation since tasks and agents are created through body-based POST calls with no resource id in the URL path. You can, for example, allow only read operations like GET `/agents/next` or GET `/round-robin/next` so the agent can fetch the next reviewer, while leaving POST /tasks and POST /agents out of the allowed set unless you explicitly grant them. The stored API key is injected at execution time by your instance, so the agent acts only within the operations you permit.
