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

# REST API

> Base URL, authentication and response format

The SDKs wrap these endpoints. Call them directly from any language.

## Base URL

```
https://api.kerne.io/v1
```

## Authentication

Every request carries your app id in `x-app-id`. Most also carry a bearer token:

```bash theme={"system"}
curl "https://api.kerne.io/v1/billing/entitlements/export_pdf?customer=user_123" \
  -H "x-app-id: $KERNE_APP_ID" \
  -H "Authorization: Bearer $KERNE_SECRET_KEY"
```

| Token | Use |
| - | - |
| Secret key (`sk_...`) | From your backend. Acts on any customer: name it with `customer`. |
| User access token | Acts as that user, on their own data only. |
| None | Public routes: pricing, auth config, sign-up and login, joining the waitlist, validating an invitation. |

Never send your secret key from a browser.

## Responses

Requests and responses are JSON. A successful response is the resource itself, without an envelope. Errors share one shape, described in [Errors](https://docs.kerne.io/concepts/error-codes.md).

Every response has an `X-Request-Id` header. Include it when you report a problem.


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