---
title: "REST API"
description: "Call BrainGrid from your own code at api.braingrid.ai"
url: "https://www.braingrid.ai/docs/api/overview"
---

The BrainGrid REST API is version 1, served at:

```text
https://api.braingrid.ai/v1
```

For example, `GET https://api.braingrid.ai/v1/projects` lists the projects of your organization.

## Authentication [#authentication]

Send your BrainGrid access token in the `Authorization` header:

```bash
curl https://api.braingrid.ai/v1/projects \
  -H "Authorization: Bearer $BRAINGRID_TOKEN"
```

A request with no token, or with a token that is not valid, gets `401` as JSON. The API never
redirects to a sign-in page.

Every request runs in the organization the token belongs to. A project of another organization
answers `404`.

## Endpoints [#endpoints]

The OpenAPI document lists every endpoint, its parameters and its answers:
[https://www.braingrid.ai/openapi.json](https://www.braingrid.ai/openapi.json).

## The app host address [#the-app-host-address]

The same API also answers at `https://app.braingrid.ai/api/v1`. It stays supported: code that
uses it keeps working. New code should use `https://api.braingrid.ai/v1`.

## Errors [#errors]

| Status | Meaning                                                                           |
| ------ | --------------------------------------------------------------------------------- |
| `401`  | No token, or the token is not valid.                                              |
| `404`  | The resource does not exist in your organization, or the path is not under `/v1`. |
| `429`  | Too many requests from your address. Wait for the time in `Retry-After`.          |
