# Bézier API

{% hint style="danger" %}
The Bézier API has been in production for less than a year and should NOT be considered stable. We **strongly recommend** that customers wanting to integrate processes with Bézier [contact us](https://bezier.octue.com/contact) first.

With that said, we 'eat our own dogfood': the Bézier frontend is built on the same API we expose to customers, so we're rapidly improving and stabilising it.

Until general release, the instructions below **won't work** - but this page should give you a flavour of what's coming.
{% endhint %}

## Using GraphQL

The Bézier API is based on GraphQL, not on REST principles. For some, this may seem counterintuitive at first - but trust us, it's well worth a couple of days learning this powerful technology, as it saves weeks of time and effort down the line.

We chose GraphQL because it allows us to:

* **Reduce errors** by getting data types consistent all the way from the database to the frontend
* **Improve performance** by querying for all the data we need in one request, rather than many
* **Reduce code complexity** by avoiding data normalisation problems (common with REST APIs having resources served on different endpoints), while automatically handling caching on the client side

For further reading, there's a good[ blog from GitHub](https://github.blog/developer-skills/github/the-github-graphql-api/) on why they shifted to GraphQL.

## Browsing the API

{% hint style="warning" %}
The graphical browser is LIVE! If you mutate data on this tool, you will see the it change in real life! To avoid making a mess of your production data, we recommend you create a duplicate organisation, with test data,  to use as a sandbox for building your integrations.
{% endhint %}

Getting started is simple! Log into Bézier first (so you can query your own data), then navigate to the [graphical browser for the API](https://api.bezier.octue.com/graphql/). Use the Documentation panel on the left to browse the contents of the API and build a query. Execute the query ▶️ and you've got data!

<figure><picture><source srcset="/files/2lzuJAvYz9zwas05B9dI" media="(prefers-color-scheme: dark)"><img src="/files/Pagy0gAIeFFpfDuT2RRj" alt=""></picture><figcaption></figcaption></figure>

## Generating tokens

To generate tokens for automating against the API, please [contact us](https://bezier.octue.com/contact/).


---

# 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.bezier.octue.com/developers/bezier-api.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.
