> 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)   |
| Connect an AI tool                                                    | [Connect an AI agent](/common-tasks/connect-ai-agent.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. Get an API key with the `leads:read` permission from your Mochi contact.
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

Mochi currently issues API keys to approved organizations. A key works only for its organization and its assigned permissions. An endpoint may appear in the API reference before Mochi enables it for your organization.

Ask your existing Mochi implementation or account contact if you need access to an endpoint that is not enabled.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.themochi.app/start-here/readme.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
