> ## Documentation Index
> Fetch the complete documentation index at: https://docs.myworklayer.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Introduction

> Create custom interfaces to interact with your work factory. Use the headless Factory API to build visual, interactive UIs while Worklayer handles orchestration, apps, memory, and human-in-the-loop reviews.

**Create custom interfaces to interact with your work factory.**

The Worklayer web app covers standard chat and factory setup. The headless **Factory API** lets you build purpose-built, visual interfaces for your team or customers—like an issue-resolution dashboard with impact scores, PR links, CI status, and one-click actions, or a support console with inline refund approvals—while Worklayer runs the orchestration, connected [apps](https://docs.myworklayer.com/apps.md), skills, memory, files, and human-in-the-loop [Reviews](https://docs.myworklayer.com/review.md) underneath.

Each API key connects your application to one **Worklayer factory**. With the Factory API, you can:

* Open **[Rooms](https://docs.myworklayer.com/rooms.md)** to isolate workstreams—for example, one Room per issue, support ticket, or customer.
* Send **[Events](https://docs.myworklayer.com/events.md)** to tell your factory what happened in your app and control whether it reacts immediately, queues the work, or stores it as background context.
* Read **[Room History](https://docs.myworklayer.com/rooms.md#room-history)** to display conversations and factory replies in your UI.
* Follow, stream, and steer **[Workers](https://docs.myworklayer.com/workers.md)** as they execute multi-step tasks across your connected apps in the background.
* Surface and resolve **[Reviews](https://docs.myworklayer.com/review.md)** right inside your UI whenever work needs human approval, an answer, or an app connection.
* Configure **[Subscriptions](https://docs.myworklayer.com/subscriptions.md)** to receive signed webhooks the moment your factory responds, updates status, or needs input.

## Why Factory API?

Chat boxes flatten complex work into walls of text. Real operational workflows work better in structured, interactive interfaces: an engineering dashboard showing user impact, merge risk, live agent progress, and a one-click **"Fix with Agent"** button; a support console embedded inside your help desk; or an ops queue where leads approve actions with a single keystroke.

You focus on the user experience and structured data display. Worklayer handles the hard agent infrastructure underneath:

* **Connected apps and guardrails.** Connect built-in [apps](https://docs.myworklayer.com/apps.md) (GitHub, Sentry, PostHog, Stripe, Slack, Cursor Cloud Agents, and more), custom remote MCP servers, or your own OpenAPI specs—with per-tool policies (`allow`, `ask`, `auto`, `disable`) that protect sensitive actions.
* **Durability.** Every accepted Event is persisted before the API responds. Retrying with the same `Idempotency-Key` never duplicates work, and failed webhook deliveries retry automatically for nearly 24 hours.
* **Channels, Signals, and timers.** Combine API Events with first-party [Channels](https://docs.myworklayer.com/channels.md) (like Slack), app [Signals](https://docs.myworklayer.com/signals.md) (like Gmail), scheduled runs, and self-managed Monitors—without maintaining your own cron jobs or event queues.
* **Isolated workstreams, shared knowledge.** Each Room keeps its own history, Events, notes, and Workers strictly isolated, while the factory shares apps, skills, long-term memory, and files across everything it does.
* **Human-in-the-loop by default.** When a task hits a sensitive action or an ambiguous decision, the factory pauses and opens a [Review](https://docs.myworklayer.com/review.md). People can respond from your custom UI, the Worklayer web app, or Slack.

## What you can build

> [card] [Auto issue resolve factory](https://docs.myworklayer.com/quickstart.md)
>
> Rank incoming bugs by user impact and criticality, trigger a Worker with one click ("Fix with Agent") to investigate and dispatch a connected coding agent to open a PR, surface CI status and merge risk, pause for human sign-off, and track post-merge health or rollbacks in a live dashboard.

> [card] [Support factory](https://docs.myworklayer.com/events.md)
>
> Create one Room per ticket, stream customer replies as Events, let Workers look up orders and prepare resolutions, require lead approval before issuing refunds, and post updates back to your help desk.

> [card] [Operations factory](https://docs.myworklayer.com/channels.md)
>
> Combine Slack Channels, Gmail Signals, and custom API Events to triage inbound requests, update internal systems, and escalate exceptions to your team.

## Get started

The fastest way to build on the Factory API is **UI-first**: describe the interface you want, let your coding agent mock it with static data, then hand it these docs to wire up Rooms, Events, Reviews, Worker streams, and Subscriptions.

> [card] [Create your first factory](https://docs.myworklayer.com/quickstart.md)
>
> Follow the UI-first coding-agent workflow—with copy-paste prompts—or walk through every endpoint with cURL.

> [card] [Core concepts](https://docs.myworklayer.com/factory.md)
>
> Understand Factories, Apps, Rooms, Events, Channels, Workers, Review, and Subscriptions.

> [card] [API reference](https://docs.myworklayer.com/api-reference/rooms/list-rooms.md)
>
> Explore every endpoint, payload schema, and error response.

> [card] [Worklayer MCP](https://docs.myworklayer.com/mcp/overview.md)
>
> Connect Claude Code, Cursor, Codex, and other MCP clients directly to your Worklayer workspace.

## Core concepts at a glance

| Concept | What it does |
| - | - |
| **[Factory](https://docs.myworklayer.com/factory.md)** | The workspace tied to your API key. Holds apps, skills, memory, files, databases, and members. |
| **[Apps & integrations](https://docs.myworklayer.com/apps.md)** | Connected third-party apps, custom remote MCP servers, OpenAPI specs, and per-tool approval policies. |
| **[Room](https://docs.myworklayer.com/rooms.md)** | An isolated conversation with your factory—for example, one Room per issue, ticket, or work item. |
| **[Event](https://docs.myworklayer.com/events.md)** | A fact or update sent to a Room (such as `"order 1188 was charged twice"` or `"user clicked Fix with Agent"`). |
| **[Channel](https://docs.myworklayer.com/channels.md)** | A two-way communication surface connected to your factory, such as Slack. |
| **[Signal](https://docs.myworklayer.com/signals.md)** | An automatic Event feed from a connected app, such as incoming Gmail messages. |
| **[Worker](https://docs.myworklayer.com/workers.md)** | A background task the factory spawns to run connected tools, sandboxed orchestration scripts, and Monitors. |
| **[Review](https://docs.myworklayer.com/review.md)** | A pause point where a Worker waits for human approval, an answer, or an app connection. |
| **[Subscription](https://docs.myworklayer.com/subscriptions.md)** | A signed HTTPS webhook endpoint notified whenever the factory responds, changes state, or needs input. |

## API conventions

### Base URL

All Factory API routes are served under `/v1`. Most endpoints are scoped to a Room (`/v1/rooms/{roomId}/...`), while Subscription routes (`/v1/subscriptions`) apply across the entire factory.

```text theme={null}
https://api.myworklayer.com/v1
```

Requests and responses use JSON, except the [Worker stream](https://docs.myworklayer.com/workers.md#stream-a-run), which uses Server-Sent Events (`text/event-stream`).

### Server-side only

The API does not enable cross-origin browser requests (CORS). Keep your API key on your backend and call the Factory API from server-side code. All `fetch` examples in these docs work in Node.js 18+.

> [!NOTE]
>
> Factories, connected [apps](https://docs.myworklayer.com/apps.md), skills, tool approval policies, API keys, Channels, Signals, and scheduled runs are configured in the Worklayer web app rather than through `/v1` API endpoints.

### Rate limits

The API currently enforces a limit of **100 requests per 5 seconds**. Exceeding the limit returns `429 Too Many Requests`.

### Error responses

Error responses follow a consistent JSON shape:

```json theme={null}
{
  "statusCode": 404,
  "message": "Room not found.",
  "error": "Not Found"
}
```

| Status | Meaning |
| - | - |
| `400` | Invalid request body, query parameter, or cursor. Unknown fields are rejected. |
| `401` | Missing, malformed, or revoked API key. |
| `402` | The Worker cannot continue because of a billing limit. |
| `403` | Action not allowed—for example, renaming or archiving the [main Room](https://docs.myworklayer.com/rooms.md#the-main-room). |
| `404` | The Room, Worker, Event, or Review does not exist for this API key or Room. |
| `409` | Conflict—such as reusing an `Idempotency-Key` with a different payload or answering an already-resolved Review. |
| `413` | Event payload exceeds the 1 MiB limit. |
| `422` | A Worker history entry is too large to serialize in the response. |
| `429` | Rate limit exceeded. Back off and retry. |
| `503` | Temporary service unavailability. Retry safely using the same `Idempotency-Key`. |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.