Source: https://docs.debitura.com/clients/getting-started/authentication

# Authentication

Authenticate with the Customer API using an API key in the `XApiKey` header. The key grants full access to all endpoints for your client account.

<a id="getting-your-api-key"></a>

## Getting Your API Key

Generate keys in the [Creditor Portal → API Keys](https://app.debitura.com/CreditorApiKey). You can create multiple keys (e.g., for different systems or team members).

<a id="making-requests"></a>

## Making Requests

Include your API key in every request:

```bash
curl https://customer-api.debitura.com/me \
  -H "XApiKey: YOUR_API_KEY"
```

A successful response confirms your key is valid:

```json
{
  "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "companyName": "Acme Corporation",
  "companyRegistrationNumber": "12345678",
  "country": "DK",
  "officeEmail": "billing@acme.com"
}
```

For authentication errors (`401`), see [Error Handling](https://docs.debitura.com/developer-concepts/error-handling.md).

See [Environments](https://docs.debitura.com/developer-concepts/environments.md) for base URLs and test mode, or continue to the [Quickstart](https://docs.debitura.com/clients/getting-started/quickstart-create-first-case.md) to create your first case.
