> For the complete documentation index, see [llms.txt](https://docs.yoplanning.support/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.yoplanning.support/en/developpeur/api-agent-yoplanning.md).

# Yoplanning Agent API

Yoplanning offers an **Agent API**, which allows you to control Yoplanning programmatically—or via an AI assistant—exactly as if you were using the web interface. The complete technical reference (all endpoints, all fields) is available in the Swagger:

{% embed url="<https://yoplanning.pro/api/agent/v1/swagger/>" %}
Full Yoplanning Agent API Reference
{% endembed %}

This article does not replace this technical reference: it explains the general principle, what this API is used for, and above all the precautions to take before connecting it to anything.

### Methodology

The Agent API follows a few simple principles, but these should be kept in mind before using it:

* **This is a direct bridge to Yoplanning's internal code** — the same code that the web interface calls. Writing via the API has exactly the same behavior, validations, and side effects as a manual action within Yoplanning. There's no hidden logic: what the interface allows, the API allows; what the interface rejects, the API also rejects, with the same error.
* **Everything is team-scoped.** Almost every address starts with your team ID (`/teams/{teamId}/…`), and a token only gives access to the team for which it was created.
* **The "round-trip" rule for any modification:** The existing object is retrieved, the desired field(s) are modified, and then the entire object is resubmitted. An update is not a partial fix: any field missing from the submission is reset. This is a common source of error if it is not anticipated.
* **Authentication by token**, specific to a user and a team, transmitted in each request via the `Authorization` header.

### What is it for?

The Agent API allows you to create, configure, modify or delete almost anything that Yoplanning manages: clients, products, sessions, orders, payments, staff, promo codes, booking engine, resellers, etc. — with the same rights as the person whose token it is.

In practice, it is used to connect Yoplanning to an external system (website, internal tool, other business software) or to an AI assistant to which we want to delegate configuration or management tasks in natural language, rather than doing everything manually in the interface.

### Risks to be aware of before connecting a tool to this API

This is **not** a read-only API: it provides access as powerful as a logged-in Yoplanning user account. Before connecting it to a tool, script, or AI assistant, keep these points in mind:

{% hint style="danger" %}
**The token is strictly confidential data — just like a password.** Any person or program in their possession can act on your team exactly as you can: create, modify, delete.

Never paste it into a code repository (even a private one), an unencrypted message, an email, a screenshot, or a tool you don't fully trust. If it leaks, consider it compromised: generate a new one immediately from your advanced preferences, or contact <support@yoplanning.com> if you're unsure how to proceed.
{% endhint %}

* **The side effects are real.** A script can send a confirmation email, record a payment, send an invitation, or delete data for real—just once, as the interface would. A poorly designed script or agent can therefore trigger very real actions from your customers or team, not just modify data internally.
* **An update replaces the entire object.** If the tool you connect does not reread the object before sending it back modified, it may unintentionally delete fields instead of leaving them as they are.
* **The token carries the rights of the person who created it.** If you connect an AI assistant to this API, it will be able to do—and undo—everything that person can do on this team. Clearly define what you ask it to do, especially for any irreversible action (deletion, sending emails or SMS messages, processing payments), and prioritize a token created specifically for this purpose rather than your main personal token if the tool allows it.

### To go further

For a lighter, read-only AI integration, limited by your own permissions, see also the article [Connecting to Yoplanning via MCP](/en/developpeur/se-connecter-a-yoplanning-via-mcp.md). For complete details on the Agent API resources and fields, the current reference remains [Swagger](https://yoplanning.pro/api/agent/v1/swagger/).


---

# 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.yoplanning.support/en/developpeur/api-agent-yoplanning.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.
