> For the complete documentation index, see [llms.txt](https://docs.aethercube.fr/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.aethercube.fr/developers/backend-api/overview.md). Agents can also search and read this documentation through its [MCP server](https://docs.aethercube.fr/~gitbook/mcp).

# Overview

The backend is a Go service over PostgreSQL and Redis. It handles accounts, sessions, the server directory, news and release information. Players use it through the launcher, and server owners use it to register a server.

This section is for you if you want to read that data from your own tool. It documents the **public** read endpoints: the server directory, the news feed and the release information. The account, session, administration and server-owner endpoints are not covered here.

The full contract is `backend-services/api/openapi.yaml`.

## Conventions

* Base path: `/api/v1`. The host depends on the deployment. Production uses HTTPS.
* Requests and responses are JSON.
* Every response carries an `X-Request-ID` header. Send your own `X-Request-ID` to correlate logs.

### Success envelope

```json
{ "success": true, "data": { } }
```

### Error envelope

```json
{
  "success": false,
  "error": {
    "code": "VALIDATION_FAILED",
    "message": "limit must be between 1 and 100",
    "request_id": "..."
  }
}
```

`code` is a stable identifier. Codes are only ever added. Branch on `code`, not on `message`.

Codes you can meet on the public endpoints:

| Code                             | Status | Meaning                                                     |
| -------------------------------- | ------ | ----------------------------------------------------------- |
| `VALIDATION_FAILED`              | 400    | A parameter is invalid.                                     |
| `INVALID_SORT`                   | 400    | `sort` is not one of the listed values.                     |
| `NOT_FOUND`                      | 404    | The resource does not exist.                                |
| `SERVER_NOT_FOUND`               | 404    | The server id is unknown, malformed, or not visible to you. |
| `TOKEN_INVALID`, `TOKEN_EXPIRED` | 401    | The bearer token is not accepted.                           |
| `RATE_LIMIT_EXCEEDED`            | 429    | Too many requests.                                          |
| `INTERNAL_ERROR`                 | 500    | A server error.                                             |
| `DEPENDENCY_UNAVAILABLE`         | 503    | A dependency of the backend is down.                        |

### Pagination

List endpoints that use pages return:

```json
{ "pagination": { "page": 1, "limit": 20, "total": 1, "total_pages": 1 } }
```

The news feed uses a cursor instead.

## Endpoints in this section

| Endpoint                       | Auth                    | Page                                                                                        |
| ------------------------------ | ----------------------- | ------------------------------------------------------------------------------------------- |
| `GET /api/v1/servers`          | Bearer token by default | [Server directory](https://docs.aethercube.fr/developers/backend-api/directory.md)          |
| `GET /api/v1/servers/regions`  | Same as the list        | [Server directory](https://docs.aethercube.fr/developers/backend-api/directory.md)          |
| `GET /api/v1/servers/tags`     | Same as the list        | [Server directory](https://docs.aethercube.fr/developers/backend-api/directory.md)          |
| `GET /api/v1/servers/{id}`     | Same as the list        | [Server directory](https://docs.aethercube.fr/developers/backend-api/directory.md)          |
| `GET /api/v1/news`             | None                    | [News and versions](https://docs.aethercube.fr/developers/backend-api/news-and-versions.md) |
| `GET /api/v1/versions/current` | None                    | [News and versions](https://docs.aethercube.fr/developers/backend-api/news-and-versions.md) |
| `GET /api/v1/versions`         | None                    | [News and versions](https://docs.aethercube.fr/developers/backend-api/news-and-versions.md) |

## Health

| Endpoint            | Meaning                                                  |
| ------------------- | -------------------------------------------------------- |
| `GET /health/live`  | The process is up.                                       |
| `GET /health/ready` | The process can serve requests: its dependencies answer. |

Use them for probes.

## Running a backend

To run your own backend for development, see [Backend](https://docs.aethercube.fr/developers/building-from-source/backend.md).


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.aethercube.fr/developers/backend-api/overview.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
