# API documentation

All API endpoints authenticate using bearer tokens (`Authorization: Bearer cbs_<token>`). There are two types of API key:

* **Partner key** — tied to a partner group; can access resources across all organisations within that group.
* **Organisation key** — tied to a single organisation; can only access resources belonging to that organisation.

The sections below describe which APIs are available to each key type.

## Partner-level only

These APIs are restricted to partner keys. Requests made with an organisation key will be rejected.

They cover tenant provisioning — creating and managing organisations, merchants, memberships, and enrolments.

| API                        | Methods                       | Docs                                                           |
| -------------------------- | ----------------------------- | -------------------------------------------------------------- |
| Organisations              | `POST` `GET` `PATCH` `DELETE` | [Organisations](/developer/api-documentation/organisations.md) |
| Merchants                  | `POST` `GET` `PATCH` `DELETE` | [Merchants](/developer/api-documentation/merchants.md)         |
| Memberships                | `POST` `GET` `PATCH` `DELETE` | [Memberships](/developer/api-documentation/memberships.md)     |
| Enrolments V1 (deprecated) | `POST` `GET` `DELETE`         | —                                                              |
| Enrolments V2              | `POST` `GET` `DELETE`         | [Enrolments](/developer/api-documentation/enrolments.md)       |

{% hint style="info" %}
**Note:** Enrolments V1 is deprecated. Use the V2 enrolments API for all new integrations. V2 adds support for enrolling a descriptor with multiple merchants in a single request.
{% endhint %}

{% hint style="info" %}
**Note:** Access to the Merchants and Enrolments V2 APIs with an organisation key can be enabled for select organisations on request. Contact support if you need this.
{% endhint %}

## Organisation and partner level

These APIs accept both key types. Data is automatically scoped to the organisations the key has access to.

| API            | Methods              | Docs                                                             |
| -------------- | -------------------- | ---------------------------------------------------------------- |
| Alerts         | `GET` `PATCH`        | [Alerts](/developer/api-documentation/alerts.md)                 |
| Orders         | `GET` `POST` `PATCH` | [Orders](/developer/api-documentation/orders.md)                 |
| Integrations   | `GET` `POST` `PATCH` | [Integrations](/developer/api-documentation/integrations.md)     |
| Lookups        | `GET`                | [Lookups](/developer/api-documentation/lookups.md)               |
| Representments | `GET` `POST` `PATCH` | —                                                                |
| Scheme Notices | `GET`                | [Scheme Notices](/developer/api-documentation/scheme-notices.md) |
| Simulations    | `POST` `PATCH`       | [Simulations](/developer/api-documentation/simulations.md)       |


---

# Agent Instructions: 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:

```
GET https://docs.chargebackstop.com/developer/api-documentation.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
