> For the complete documentation index, see [llms.txt](https://docs.themochi.app/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.themochi.app/start-here/readme.md).

# Overview

Use the Mochi Public API to connect your own software to Mochi. You can read leads, bookings, analytics, and revenue. Approved integrations can also update data.

An **organization** is a Mochi workspace. Every connection can access only one organization and only the actions that Mochi has approved for it.

## Choose where to start

| Your goal                                                             | Start with                                                               |
| --------------------------------------------------------------------- | ------------------------------------------------------------------------ |
| Try the API with one safe, read-only request                          | [Make your first API request](/start-here/getting-started.md)            |
| Decide between an API key, browser sign-in, or an existing connection | [Choose how to authenticate](/start-here/authentication.md)              |
| Create, rotate, or revoke a controlled self-serve key                 | [Create and manage an API key](/start-here/manage-api-keys.md)           |
| Connect an AI tool                                                    | [Connect an AI agent](/common-tasks/connect-ai-agent.md)                 |
| Continue a tool that is already connected through MCP                 | [Already connected through MCP?](/common-tasks/already-connected-mcp.md) |
| Build a specific integration                                          | Choose a guide under **Common tasks** in the sidebar                     |
| Look up an exact path, field, or response                             | Use the generated **API Reference**                                      |

If you are new to APIs, start with the first row. A successful first request proves that your key, organization, and basic permission are correct. It does not change any Mochi data.

## Base URL

```
https://api.themochi.app
```

Add an endpoint path to this address. Current paths begin with `/v1/`. Most requests and responses use JSON, a standard text format for structured data.

## Your first-success path

1. When Mochi has enabled your organization, create or obtain an API key with the `leads:read` permission.
2. Follow [Make your first API request](/start-here/getting-started.md).
3. Confirm the response shape shown in [Make your first API request](/start-here/getting-started.md): it contains `data` and `next_cursor`. An empty `data` list is still a success.
4. Continue with a [language example](/start-here/code-examples.md) or a guide under **Common tasks**.

Do not copy changing endpoint fields or response schemas from a task guide into your integration. Check the generated API reference when you implement a request.

## Keep credentials private

An API key works like a password for an integration. Keep it in a server-side secret manager. Never put it in a web page, mobile app, source file, screenshot, prompt, log, or support message.

## For documentation maintainers and AI agents

The canonical documentation origin is <https://docs.themochi.app>. Use this order so an integration is based on the current contract rather than remembered examples:

1. Read <https://docs.themochi.app/llms.txt> and choose the smallest relevant task guide.
2. Read that guide for the goal, authentication choice, minimum scopes, safe sequence, and verification behavior.
3. Inspect the generated OpenAPI reference for exact paths, parameters, payloads, and response schemas.
4. If using the Mochi CLI, inspect the installed `mochi --help` and command help for its current read-only surface.

Use <https://docs.themochi.app/llms-full.txt> only for broad research across the documentation. If the current documentation or OpenAPI contract is unavailable, or if prose and OpenAPI disagree, stop and report the drift instead of guessing.

This `docs/public-api/` directory is the editable source. GitBook renders and publishes it; GitBook UI edits are not canonical and must not replace reviewed Git changes.

## Availability during the initial rollout

The self-serve Developers and Public API OAuth paths are in a controlled pilot. The Developers menu is available only to manually approved organizations; documentation or a direct URL never grants access. See [Create and manage an API key](/start-here/manage-api-keys.md) for the eligibility and safety rules.

Ask your existing Mochi implementation or account contact if you need access when the controlled path is unavailable.
