# Credits (https://webmetic.de/docs/en/api/datenmodell/credits)

`GET /contacts/credits` returns this object. For example, before your workflow unlocks the email address of the head of sales at Bergquell Mineralbrunnen, it checks here whether your credits are enough.

The number in `balance` applies to your whole account, and the dashboard shows it in the **Credits** window under **Available credits**.

[Credits in the API](https://webmetic.de/docs/en/api/credits) describes which calls cost credits. Where credits come from and how you buy more is covered under [Credits](https://webmetic.de/docs/en/credits).

## Request [#request]

The request is free, doesn't change your credits, and needs neither a particular plan nor a contact setup.

You need the **Visitor Intelligence** key, which admins find under [**Menu** > **Integrations** > **API**](https://app.webmetic.de/?menu=api_details). The Enrichment and Data Layer keys don't work here.

```bash tab="cURL" tab-group="lang"
curl "https://hub.webmetic.de/contacts/credits" \
  -H "Authorization: wmtc_YOUR_API_KEY"
```

```js tab="JavaScript" tab-group="lang"
const res = await fetch('https://hub.webmetic.de/contacts/credits', {
  headers: { Authorization: 'wmtc_YOUR_API_KEY' },
});
const credits = await res.json();
```

```python tab="Python" tab-group="lang"
import requests

res = requests.get(
    "https://hub.webmetic.de/contacts/credits",
    headers={"Authorization": "wmtc_YOUR_API_KEY"},
)
credits = res.json()
```

## Fields [#fields]

Both fields are always present and never `null`, and `costs` always contains the same four fields.

| Field | Type | Description |
| --- | --- | --- |
| `balance` | `integer` | How many credits your account has right now |
| `costs` | `object` | Cost per action in credits, the same for every account |
| `costs.search` | `integer` | Searching for contacts. The search is currently free |
| `costs.email` | `integer` | Unlocking the email address, with the LinkedIn profile when one exists |
| `costs.phone` | `integer` | Unlocking the phone numbers |
| `costs.email_phone` | `integer` | Unlocking email and phone in one call. The sum of `costs.email` and `costs.phone` |

## Rules [#rules]

These rules apply to the values:

- **Whole number**: `balance` is always a whole number and never negative.
- **No credits**: If your account never received credits or has used them all, `balance` is `0`, and that's not an error. Your account only gets the welcome bonus once you set up contacts.
- **No expiry**: Credits don't expire, and Webmetic doesn't reset them each month. The monthly credits of Starter and Growth are added to the ones you have.
- **One value**: `balance` doesn't split credits by origin, such as welcome bonus, plan, or purchase. The API returns no history of the credits you used.
- **List values**: `costs` shows what a new unlock costs. Data you already unlocked and data types Webmetic doesn't deliver cost nothing. What a call deducted is in the `credits_used` field of its response, as described under [Contact](https://webmetic.de/docs/en/api/datenmodell/contact).
- **Not enough credits**: If your credits aren't enough, `/contacts/reveal` and `/contacts/find` answer with status `402` and the code `INSUFFICIENT_CREDITS`. `detail.available` in the error has the same value as `balance`, and `detail.required` gives the credits the action needs. For details, see [Errors](https://webmetic.de/docs/en/api/fehler).

## Used by [#used-by]

- **Endpoint**: [`GET /contacts/credits`](https://webmetic.de/docs/en/api/referenz/contacts/credits)
- **Responses**: `credits_remaining` in [`/contacts/search`](https://webmetic.de/docs/en/api/referenz/contacts/search), [`/contacts/reveal`](https://webmetic.de/docs/en/api/referenz/contacts/reveal), and [`/contacts/find`](https://webmetic.de/docs/en/api/referenz/contacts/find), the same value as `balance` after the call
- **AI assistant**: The [AI assistant](https://webmetic.de/docs/en/ki-assistent/tools-und-prompts) also uses the same credits with the tool `reveal_contact`
