> ## Documentation Index
> Fetch the complete documentation index at: https://docs.ai-gust.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Use the aiGust API

> Where the API lives, how its URLs are built, and where to find the full reference.

With the aiGust API, your software does what a user does in the portal: read figures, list administrations, create client users, and more. Anything your [service user](https://docs.ai-gust.io/integrate/authentication.md) may do in the portal, it may do through the API.

## The full reference

The complete API is documented in the [API reference](https://api.prod.ai-gust.io/api/redoc) (ReDoc), with every endpoint, parameter and schema. This guide only explains the basics, and walks you through common [use cases](#use-cases).

## Base URL

| Environment | API base URL | Portal |
| - | - | - |
| Production | `https://api.prod.ai-gust.io/api/v01` | [app.ai-gust.io](https://app.ai-gust.io) |
| Development | `https://api.dev.ai-gust.io/api/v01` | [app-dev.ai-gust.io](https://app-dev.ai-gust.io) |

Build and test your integration on development, then switch to production. The examples in this guide use production.

Almost every endpoint sits under a firm, which the API calls a **tenant**:

```
/tenants/{tenant_id}/...
/tenants/{tenant_id}/administrations/{administration_id}/...
```

To find the ID of your firm, ask for the profile of your service user. The `tenant` in the response holds the `id`:

```bash theme={null}
curl "https://api.prod.ai-gust.io/api/v01/settings/profile" \
  -H "Authorization: Bearer {ACCESS_TOKEN}"
```

## Before you start

1. [Get a client ID and secret](https://docs.ai-gust.io/integrate/authentication.md#get-a-client-id-and-secret).
2. [Request an access token](https://docs.ai-gust.io/integrate/authentication.md#request-an-access-token), and send it as a bearer token with every call.

## Good to know

* **Lists are paged.** List endpoints take `page_size`, and return a `next` value to fetch the next page.
* **IDs are UUIDs** that aiGust creates, such as the ID of an administration. To find an administration by its VAT number, see [Find an administration](https://docs.ai-gust.io/integrate/provision-client-users.md#find-an-administration).
* **Timestamps** are ISO 8601, in UTC.
* **`401` and `403`:** see [What the service user may do](https://docs.ai-gust.io/integrate/authentication.md#what-the-service-user-may-do).

## Use cases

| Use case | Guide |
| - | - |
| Give your clients access to aiGust from your own portal, and manage which administrations they see | [Provision client users](https://docs.ai-gust.io/integrate/provision-client-users.md) |
| Send bookkeeping or other data to aiGust in an agreed format | [External data uploads](https://docs.ai-gust.io/integrate/ext-upload-overview.md) |

Want to do something else with the API? Contact us at [support@ai-gust.io](mailto:support@ai-gust.io).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.