> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.rasen.ai/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.rasen.ai/_mcp/server.

# Rasen Developer API

> Find where to start with the Rasen Developer API, its base URL, and the rules that every request shares.

## Summary

The Rasen Developer API is the server-to-server interface to the same agents, calls and results that
you manage in the Rasen app. This page gives the paths through these docs, the base URL and the
rules that every request shares. It does not document single operations; see the
[API reference](/api-reference).

## Choose your path

| Goal                     | Start here                                                                          | Outcome                                                          |
| ------------------------ | ----------------------------------------------------------------------------------- | ---------------------------------------------------------------- |
| Make one request         | [Quickstart](/get-started/quickstart)                                               | Verify a key, then create an agent with a retry-safe request.    |
| Build an agent           | [Agent lifecycle](/guides/agents)                                                   | Create, configure, validate and publish a version.               |
| Connect external systems | [Tools and MCP servers](/guides/tools)                                              | Add webhook tools or discover tools from an MCP server.          |
| Route and start calls    | [Route phone calls](/guides/phone-numbers), then [Calls and results](/guides/calls) | Assign an existing number, start a call and read its result.     |
| Operate an integration   | [Integration checklist](/get-started/integration-checklist)                         | Handle keys, retries, concurrent edits, paging and support data. |
| Find one endpoint        | [API reference](/api-reference)                                                     | See its request, response, errors and generated examples.        |

## Build, launch, improve

The API follows the same three-part workflow as the Rasen product:

1. **Build.** Create agents, edit drafts and variables, select voices, add tools and publish immutable
   versions.
2. **Launch.** Connect a carrier, import an existing number, assign an agent, and start individual
   calls or campaigns.
3. **Improve.** Read transcripts, recordings, extraction, summaries and tool outcomes, export
   campaign evidence by batch ID, and measure usage by agent or call.

Knowledge sources and direct agent libraries are available. Publication freezes ready sources
into retrieval snapshots and fallback sources into bounded prompt context. See
[Knowledge](/guides/knowledge).

See [API availability](/get-started/api-availability) for the operation-family status.

## Base URL

Every path in this API starts with `/v1` on the configured dedicated API host. The host is configured per environment, so the
base URL has the form below, and your environment supplies the host:

```bash
export RASEN_API_BASE="https://api.rasen.ai/v1"
```

The path and version do not depend on the host. This documentation uses the
base URL above. The Developers page in the Rasen app shows the base URL of your environment.

## Reference and examples

| Need                                                               | Where                                                                                      |
| ------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ |
| Every operation, with its request, response, errors and examples   | [API reference](/api-reference)                                                            |
| A task from start to end, with curl, Python and TypeScript samples | The guides under Build with Rasen, starting with the [Quickstart](/get-started/quickstart) |
| What changed, and what goes away                                   | [Changelog](/changelog) and [Deprecations](/deprecations)                                  |

## What every request shares

| Rule                                                                                  | Where it is described                           |
| ------------------------------------------------------------------------------------- | ----------------------------------------------- |
| A workspace-owned bearer key authenticates every request and selects the workspace.   | [Authentication](/get-started/authentication)   |
| Errors carry a registered `code`, safe `details`, a `retry` class and the request ID. | [Errors](/concepts/errors)                      |
| Mutations take an `Idempotency-Key`; a repeat returns the original answer.            | [Idempotency and replay](/concepts/idempotency) |
| Edits take `If-Match` with the ETag of your last read.                                | [Revisions and ETags](/concepts/revisions)      |
| Lists return pages with an opaque `next_cursor`.                                      | [Pagination](/concepts/pagination)              |
| List filters repeat a query parameter; large ID sets use a POST search.               | [Filters and limits](/concepts/filters)         |
| Requests are rate limited per key and per workspace.                                  | [Rate limits](/concepts/rate-limits)            |
| Agents, MCP servers, Knowledge sources and secrets accept your own `resource_key`.    | [Resource keys](/concepts/resource-keys)        |

Timestamps are UTC RFC 3339. Request bodies are strict: an unknown field is refused. Response
enums can gain values over time, so treat an unknown value as unknown rather than as an error.
Language fields take BCP 47 tags.

## What is not in this API

Key management (create, list, rotate, revoke) happens in the app. Carrier number purchase and
release, training and quality APIs, platform event webhooks and granular key permissions are
outside this version. Bring-your-own media is limited to
[agent sessions](/guides/calls#run-an-agent-on-a-call-leg-you-already-own) on a call leg you
already own. Transcript SSE is available for verified call
results; poll the REST resources for other changes.

For campaign creation and controls, see [Campaigns](/guides/campaigns). For provider connections
and number import, see [Telephony connections](/guides/telephony). To issue or revoke a hosted
test-call link, see [Hosted test-call links](/guides/share-links).

## Your first integration

1. Get a workspace key and store it as a managed secret. See
   [Authentication](/get-started/authentication).
2. Run the [Quickstart](/get-started/quickstart) to verify the key and make a safe mutation.
3. Follow the [Agent lifecycle](/guides/agents), then [Calls and results](/guides/calls).
4. Before deployment, use the [Integration checklist](/get-started/integration-checklist).

## Related

* [Quickstart](/get-started/quickstart)
* [Authentication](/get-started/authentication)
* [API reference](/api-reference)