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

# Console API

> API reference for the PerfGrid console: invoices, services, domains and support tickets of one billing account

> [!NOTE]
>
> This reference covers the **console** at console.perfgrid.com. The **Grid Hosting panel API** at hosting-panel.net is a different API with its own tokens: see the [Grid Hosting panel API](https://perfgrid.com/docs/api-reference/introduction.md).

## Authentication

Create a token in the console under **More** > **API tokens** (you need two-factor authentication or a passkey first), and send it in the `Authorization` header with every request. See [API tokens](https://perfgrid.com/docs/console/api/api-tokens.md).

```bash theme={null}
Authorization: Bearer pgapi_...
```

A token belongs to one member and one billing account, so paths have no billing account in them. It can do what both its own abilities and the member's permissions allow.

## Base URL

```
https://console.perfgrid.com/api/v1
```

Check a token with `GET /me`:

```bash theme={null}
curl https://console.perfgrid.com/api/v1/me \
  -H "Authorization: Bearer pgapi_..."
```

```json theme={null}
{
  "data": {
    "token": {
      "id": "01K8...",
      "name": "Backup script",
      "prefix": "pgapi_abc123",
      "abilities": ["billing.view", "services.view"],
      "expires_at": "2027-01-29T10:00:00+00:00"
    },
    "user": { "id": "01K8...", "name": "Anna Jensen", "email": "anna@example.dk" },
    "customer": { "id": "01K8...", "name": "Example ApS", "country": "DK", "currency": "EUR", "status": "active" }
  }
}
```

`abilities` lists what the token may do right now: the abilities it was given that the member still has.

Responses are JSON with their content under `data`. Amounts are decimal strings next to their currency, times are ISO 8601 in UTC, and lists are paged with a cursor: pass `meta.next_cursor` as `cursor` to get the next page (`per_page` 1 to 100, default 25).

## Abilities

`GET /me` and `/notifications` work with any token. Other endpoints need an ability. A "manage" ability doesn't include the matching "view" one.

| Ability | Label in the console | Gives access to |
| - | - | - |
| `billing.view` | **View invoices** | Invoices, credit notes, PDFs, billing details, credit |
| `billing.pay` | **Pay invoices** | Paying invoices, payment links, putting credit on an invoice |
| `billing.manage` | **Manage billing details** | Automatic use of credit |
| `services.view` | **View services** | Services, access details, disk usage |
| `services.manage` | **Manage services** | Usage alerts, hosting panel login links, changes and cancellations |
| `services.order` | **Place orders** | Changes that cost more, such as upgrades |
| `domains.view` | **View domains** | Domains and domain contacts |
| `domains.manage` | **Manage domains** | Nameservers, DNSSEC, lock, auto-renew, privacy, registrant, auth code, domain contacts |
| `support.view` | **View support tickets** | Tickets and their files |
| `support.create` | **Open support tickets** | Opening tickets and replying |

## Rate limits

Each token may make **120 requests a minute**, of which at most **30** may change something (any request other than `GET`). The API and the MCP server share both limits. Over the limit, the API answers `429` with a `Retry-After` header.

## Errors

Errors come back as JSON with a `message`.

| Status | When |
| - | - |
| `401` | No token, or it is unknown, revoked or expired, or its member left the billing account |
| `403` | The token or the member lacks the ability, or the token isn't allowed from your IP address |
| `404` | Nothing with that id in the token's billing account |
| `422` | The request isn't valid. `errors` lists the messages per field |
| `429` | Too many requests. Wait for the time in `Retry-After` |

## MCP server

The same tokens connect AI assistants to the PerfGrid MCP server at `https://console.perfgrid.com/mcp`, with the token in the `Authorization` header. The tools an assistant sees follow the token's abilities. See [API tokens](https://perfgrid.com/docs/console/api/api-tokens.md).


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