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

# API overview

> Authenticate with BillingServ and start using the supported public API.

The BillingServ API lets your application manage customers, packages, invoices, orders, support tickets, usage, reports, and other supported account resources.

## Base URL

Use your BillingServ installation's v2 API URL:

```text theme={null}
https://your-billingserv-domain.com/api/v2
```

API v1 is deprecated. New integrations should use v2.

## Authentication

Generate a live API key from **Admin → API Information**, then send it as a bearer token:

```http theme={null}
Authorization: Bearer <live_api_key>
Accept: application/json
```

The full key is shown once. Store it securely and never expose it in browser code, logs, or a public repository. Regenerating the key invalidates the previous key.

```bash theme={null}
curl "https://your-billingserv-domain.com/api/v2/customer/lists" \
  -H "Authorization: Bearer <live_api_key>" \
  -H "Accept: application/json"
```

## Request and response format

Send JSON for request bodies unless an endpoint documents another format:

```http theme={null}
Content-Type: application/json
```

Successful responses contain `"success": true`. Errors use the relevant HTTP status and include an error message or validation errors.

| Status | Meaning                                           |
| ------ | ------------------------------------------------- |
| `200`  | Request completed successfully                    |
| `401`  | API key is missing or invalid                     |
| `403`  | The authenticated account cannot use the endpoint |
| `422`  | Request validation failed                         |
| `429`  | Rate limit exceeded                               |

## Keep your system synchronized

Polling the API is not required for every change. Configure [webhooks](/api-reference/webhooks/overview) to receive customer, payment, invoice, order, subscription, credit note, and support events as they happen.
