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

# Overview

> Control Plane endpoint structure and shared request schema.

All API actions are multiplexed through the `/v1/manage` endpoint. Provide an `action` string plus the required fields for that operation. On success, handlers return `2xx` JSON payloads outlined below. Failures return structured errors:

```json theme={null}
{
  "error": "Human-readable message",
  "action": "addDocs" // present on server errors
}
```

Shared request schema:

| Field       | Type   | Required | Notes                                                                                                                                                                                                                                                                                                |
| ----------- | ------ | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `action`    | string | ✅        | One of `initUpload`, `startBuild`, `getJobStatus`, `getIndex`, `listIndexes`, `deleteIndex`, `addDocs`, `deleteDocs`, `getDocs`, `getIndexUrl`, `createWebSource`, `listWebSources`, `getWebSource`, `resyncWebSource`, `updateWebSource`, `deleteWebSource`, `initParseIndex`, `confirmParseIndex`. |
| `projectId` | string | ✅        | Project identifier issued by Moss Control.                                                                                                                                                                                                                                                           |
| `indexName` | string | ▶︎       | Required for index-scoped actions.                                                                                                                                                                                                                                                                   |

> **Required headers:** `x-project-key` with your project access key and `x-service-version: v1`.

## Supported actions at a glance

| Action            | Purpose                                            | Extra required fields                           |
| ----------------- | -------------------------------------------------- | ----------------------------------------------- |
| `initUpload`      | Get a presigned URL to upload index data.          | `indexName`, `modelId`, `docCount`, `dimension` |
| `startBuild`      | Trigger an index build after uploading data.       | `jobId`                                         |
| `getJobStatus`    | Check the status of an async build job.            | `jobId`                                         |
| `getIndex`        | Fetch metadata for a single index.                 | `indexName`                                     |
| `listIndexes`     | Enumerate every index under the project.           | None                                            |
| `deleteIndex`     | Remove an index record and assets.                 | `indexName`                                     |
| `getIndexUrl`     | Get download URLs for a built index.               | `indexName`                                     |
| `addDocs`         | Upsert documents into an existing index.           | `indexName`, `docs`                             |
| `deleteDocs`      | Remove documents by ID.                            | `indexName`, `docIds`                           |
| `getDocs`         | Retrieve stored documents (without embeddings).    | `indexName`                                     |
| `createWebSource` | Crawl a website and build an index from its pages. | `rootUrl`, `indexName`                          |
| `listWebSources`  | Enumerate every web source under the project.      | None                                            |
| `getWebSource`    | Fetch a single web source by ID.                   | `sourceId`                                      |
| `resyncWebSource` | Re-crawl a website and refresh its index.          | `sourceId`                                      |
| `updateWebSource` | Change a web source's refresh schedule.            | `sourceId`, `refreshCadence`                    |
| `deleteWebSource` | Remove a web source (the index is kept).           | `sourceId`                                      |

`initParseIndex` and `confirmParseIndex` expose the file-parsing pipeline behind
[`createIndexFromFiles`](/docs/reference/js/files); prefer the SDK method rather than
calling them directly.
