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

# Erstan Developer API

> Run published agents and build agent drafts from external systems.

Use the Erstan Developer API to let external systems start published agents and read their results. For interactive Claude and Codex clients, the official Erstan plugin adds OAuth-authenticated MCP tools and maintained Skills for building agents and working with authorized workspace content.

The first supported workflow is:

1. Create a scoped API key in Erstan.
2. List the agents that key can access.
3. Start an agent run.
4. Poll the run until it completes.

## Base URL

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

## Authentication

Public API requests use a workspace API key as a bearer token.

```http theme={null}
Authorization: Bearer ers_live_...
```

API keys are created in the Erstan app by a workspace owner or admin. The secret is shown once when the key is created.

## Endpoints

| Endpoint                                | Purpose                                                         |
| --------------------------------------- | --------------------------------------------------------------- |
| `GET /v1/public/agents`                 | List published agents available to the API key.                 |
| `GET /v1/public/agents/{agentId}`       | Read lanes, input schemas, and attachment support for an agent. |
| `POST /v1/public/agents/{agentId}/runs` | Start a run for an agent lane the key creator can run.          |
| `GET /v1/public/runs/{runId}`           | Poll run status and read the final response.                    |

See [Quickstart](/developers/quickstart) for a copy-paste flow.

## Build agents over MCP

Install the official Erstan plugin and authorize the **Build** profile for the recommended browser-based OAuth flow. Advanced automation clients can connect directly to `POST /v1/mcp` with an API key holding `agents:read` plus `agents:write`. In either case, Erstan rechecks the connection owner's live access on every call. See [Connect a Coding Agent](/developers/connect-coding-agent) for installation and [Build agents over MCP](/developers/build-agents) for the complete authoring workflow.

For a complete NetSuite scheduled-script example with email body plus optional file attachment, see [NetSuite OCR Quote Intake](/developers/netsuite-ocr-quote-intake).
