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

# API Overview

> Base URL, request/response conventions, pagination cursors, Idempotency-Key retries, SSE streaming, and error codes for REST API v1.

Enablement Studio REST API v1 exposes the same server logic behind the Web Studio and remote MCP connector over standard JSON (and optional Server-Sent Events for specialist turns).

## Base URL

```text Production theme={null}
https://enablementstudio.ai
```

Trailing slashes are ignored on all routes. Incoming `Cookie` headers are stripped before authentication—API routes read only `Authorization: Bearer <token>`. Responses carry `Content-Type: application/json; charset=utf-8` (except SSE streams) and `Cache-Control: no-store`.

## Error format

Every non-2xx response returns a structured JSON error envelope with a stable machine-readable `code` and human-readable English `message`:

```json theme={null}
{
  "error": {
    "code": "signed_out",
    "message": "Sign in to continue."
  }
}
```

## Pagination cursors

`GET /api/v1/projects` and `GET /api/v1/kits` accept `limit` (`1`–`200`, default `100`) and an opaque `cursor` returned in `next_cursor`. Keep passing `next_cursor` while `has_more` is `true`.

## Idempotent runs

`POST /api/v1/runs` accepts an optional `Idempotency-Key` header (`1`–`128` characters matching `[A-Za-z0-9._:-]`). Replaying the exact same request with the same key returns HTTP `200` with the original run instead of starting a second draft. Reusing an active key with a different `product` or `text` returns `409 idempotency_conflict`.

## Streaming specialist turns (SSE)

Send `Accept: text/event-stream` on `POST /api/v1/kits/{kit}/threads/{agent}/turns` to stream token deltas:

* `turn` — Recorded user turn metadata
* `status` — Stage updates
* `delta` — Incremental response text chunks
* `done` (or `error`) — Terminal payload carrying the full `TurnResponse` including any pending `patch` and `current` diff arrays


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