/v1/account
account
Account: balance, usage, credit subscription and API keys via the API.
With the account endpoints your program reads balance, usage and credit subscription, and manages API keys. That way you build your own reports and alerts for a low balance.
Costs and limits
| What | Credits |
|---|---|
| Read account, balance, usage and credit subscription | free |
Limit: 30 requests per minute. Create, update and delete: 10 per minute.
All account endpoints are free. Every response shows your current balance in meta.credits_remaining.
Always send the API key in the header x-api-key here. As the parameter api_key in the URL, the API rejects it with 400. A bearer token needs the ability account:read.
Endpoints
| Method | Path | Purpose | Access |
|---|---|---|---|
| GET |
/v1/account |
Your account. | API key |
| GET |
/v1/account/credits |
Balance and expiry dates. | API key |
| GET |
/v1/account/usage |
Usage in a period, summed up. | API key |
| GET |
/v1/account/usage/transactions |
Single requests with costs. | API key |
| GET |
/v1/account/subscription |
Your credit subscription. | API key |
| GET |
/v1/account/api-keys |
Your API keys. | API key |
| POST |
/v1/account/api-keys |
New API key. | Admin token |
| DELETE |
/v1/account/api-keys/{id} |
Delete an API key. | Admin token |
| POST |
/v1/auth/tokens/create |
Create a bearer token. | API key |
| GET · DELETE |
/v1/auth/tokens |
List and revoke bearer tokens. | API key |
Account
GET /v1/account returns name, email address, language and, in plan, your credit subscription, such as pro or max. Without a credit subscription, plan is null.
curl -G "https://handelsregister.ai/api/v1/account" \ -H "x-api-key: YOUR_API_KEY"
import requests response = requests.get( "https://handelsregister.ai/api/v1/account", headers={"x-api-key": "YOUR_API_KEY"}, ) data = response.json()
const url = new URL("https://handelsregister.ai/api/v1/account"); const response = await fetch(url, { headers: { "x-api-key": "YOUR_API_KEY" }, }); const data = await response.json();
1{2 "account": {3 "id": 2,4 "name": "Max Mustermann",5 "email": "[email protected]",6 "email_verified": true,7 "language": "de",8 "plan": "max",9 "member_since": "2026-09-02T17:07:10+00:00"10 },11 "meta": {12 "request_credit_cost": 0,13 "credits_remaining": 14514 }15}
Balance
GET /v1/account/credits shows your balance and when credits expire.
curl -G "https://handelsregister.ai/api/v1/account/credits" \ -H "x-api-key: YOUR_API_KEY"
import requests response = requests.get( "https://handelsregister.ai/api/v1/account/credits", headers={"x-api-key": "YOUR_API_KEY"}, ) data = response.json()
const url = new URL("https://handelsregister.ai/api/v1/account/credits"); const response = await fetch(url, { headers: { "x-api-key": "YOUR_API_KEY" }, }); const data = await response.json();
| Field | Meaning |
|---|---|
| balance.total | Your total balance. |
| balance.subscription |
Credits from the credit subscription, including those carried over on a plan change (rollover).
|
| balance.purchased | Top-up credits and start credits. |
| next_expiry |
The next credits to expire, with amount and expires_at. null if nothing expires.
|
| breakdown |
Every credit grant with its remaining amount amount, origin source and expiry date valid_until. source is subscription, rollover, purchase or registration.
|
1{2 "balance": {3 "total": 145,4 "subscription": 0,5 "purchased": 1456 },7 "next_expiry": null,8 "meta": {9 "request_credit_cost": 0,10 "credits_remaining": 14511 }12}
balance.total regularly. It costs nothing.
Usage
GET /v1/account/usage sums up requests and credits used for a period, per endpoint and per day or month. Requests from the web app and Monitoring count too.
curl -G "https://handelsregister.ai/api/v1/account/usage" \ -H "x-api-key: YOUR_API_KEY" \ --data-urlencode 'from=2026-11-01' \ --data-urlencode 'group_by=day'
import requests response = requests.get( "https://handelsregister.ai/api/v1/account/usage", headers={"x-api-key": "YOUR_API_KEY"}, params={ "from": "2026-11-01", "group_by": "day", }, ) data = response.json()
const url = new URL("https://handelsregister.ai/api/v1/account/usage"); url.searchParams.append("from", "2026-11-01"); url.searchParams.append("group_by", "day"); const response = await fetch(url, { headers: { "x-api-key": "YOUR_API_KEY" }, }); const data = await response.json();
| Name | Type | Description | Example |
|---|---|---|---|
| fromQuery | stringoptional |
Start as YYYY-MM-DD or ISO 8601. If omitted: start of the month. |
2026-11-01 |
| toQuery | stringoptional | End, inclusive. A plain date counts until the end of the day. If omitted: now. | – |
| group_byQuery | stringoptional |
If omitted, the API groups periods of up to 92 days by day, longer ones by month.Values: day, month |
day |
A period covers at most 366 days.
totals holds the sums, by_endpoint the breakdown, sorted by credits. series.buckets contains every day or month, including those without usage.
1{2 "period": {3 "from": "2026-11-01T00:00:00+00:00",4 "to": "2026-11-01T07:54:44+00:00"5 },6 "totals": {7 "requests": 80,8 "credits_used": 3209 },10 "by_endpoint": [11 {12 "endpoint": "/api/v1/signals",13 "requests": 7,14 "credits_used": 14015 },16 {17 "endpoint": "/api/v1/fetch-organization",18 "requests": 25,19 "credits_used": 12020 },21 {22 "endpoint": "/api/v1/search-companies",23 "requests": 47,24 "credits_used": 4025 },26 {27 "endpoint": "/api/v1/signals/e23c12835d697c00512944ebdfb8260f",28 "requests": 1,29 "credits_used": 2030 }31 ],32 "series": {33 "group_by": "day",34 "buckets": [35 {36 "date": "2026-11-01",37 "requests": 80,38 "credits_used": 32039 }40 ]41 },42 "meta": {43 "request_credit_cost": 0,44 "credits_remaining": 14545 }46}
Single requests
GET /v1/account/usage/transactions lists every charged request with endpoint, credits, the request parameters and the time, newest first.
curl -G "https://handelsregister.ai/api/v1/account/usage/transactions" \ -H "x-api-key: YOUR_API_KEY" \ --data-urlencode 'per_page=3'
import requests response = requests.get( "https://handelsregister.ai/api/v1/account/usage/transactions", headers={"x-api-key": "YOUR_API_KEY"}, params={ "per_page": "3", }, ) data = response.json()
const url = new URL("https://handelsregister.ai/api/v1/account/usage/transactions"); url.searchParams.append("per_page", "3"); const response = await fetch(url, { headers: { "x-api-key": "YOUR_API_KEY" }, }); const data = await response.json();
| Name | Type | Description | Example |
|---|---|---|---|
| fromQuery | stringoptional |
Start as YYYY-MM-DD or ISO 8601. If omitted: start of the month. |
– |
| toQuery | stringoptional | End, inclusive. A plain date counts until the end of the day. If omitted: now. | – |
| endpointQuery | stringoptional |
Only requests with exactly this label, as it appears in endpoint. |
– |
| per_pageQuery | integeroptional |
Entries per page. The API lowers larger values to 100.Default: 25Limits: at least 1 |
3 |
| cursorQuery | stringoptional |
The value pagination.next_cursor of the previous page, for the next page. |
– |
api_key_id names the API key the request ran with. That way you assign costs to single integrations. For requests from the web app it is null.
If next_cursor is null, you have reached the end.
1{2 "transactions": [3 {4 "id": 1116,5 "endpoint": "/api/v1/search-companies",6 "credits": 1,7 "parameters": {8 "q": "",9 "ai_search": false,10 "filters": {11 "postal_code": "91710",12 "active": true13 },14 "sort": null,15 "order": null,16 "status": 200,17 "search_type": "standard"18 },19 "created_at": "2026-11-01T07:55:02+00:00",20 "api_key_id": 1021 },22 {23 "id": 1115,24 "endpoint": "/api/v1/search-companies",25 "credits": 1,26 "parameters": {27 "q": "",28 "ai_search": false,29 "filters": {30 "postal_code": "91710",31 "active": true32 },33 "sort": null,34 "order": null,35 "status": 200,36 "search_type": "standard"37 },38 "created_at": "2026-11-01T07:55:01+00:00",39 "api_key_id": 1040 },41 {42 "id": 1114,43 "endpoint": "/api/v1/search-companies",44 "credits": 1,45 "parameters": {46 "q": "",47 "ai_search": false,48 "filters": {49 "industry_code": "62.1"50 },51 "sort": null,52 "order": null,53 "status": 200,54 "search_type": "standard"55 },56 "created_at": "2026-11-01T07:55:00+00:00",57 "api_key_id": 1058 }59 ],60 "pagination": {61 "per_page": 3,62 "next_cursor": "eyJjcmVhdGVkX2F0IjoiMjAyNi0xMS0wMSAwNzo1NTowMCIsImlkIjoxMTE0LCJfcG9pbnRzVG9OZXh0SXRlbXMiOnRydWV9"63 },64 "period": {65 "from": "2026-11-01T00:00:00+00:00",66 "to": "2026-11-01T07:55:02+00:00"67 },68 "meta": {69 "request_credit_cost": 0,70 "credits_remaining": 14571 }72}
Credit subscription
GET /v1/account/subscription shows your credit subscription with plan, status, billing period and features. Without a credit subscription, subscription is null.
cancel_at_period_end is true if the credit subscription ends at the end of the period. features holds the credits per month and the bonus on top-up credits in percent.
curl -G "https://handelsregister.ai/api/v1/account/subscription" \ -H "x-api-key: YOUR_API_KEY"
import requests response = requests.get( "https://handelsregister.ai/api/v1/account/subscription", headers={"x-api-key": "YOUR_API_KEY"}, ) data = response.json()
const url = new URL("https://handelsregister.ai/api/v1/account/subscription"); const response = await fetch(url, { headers: { "x-api-key": "YOUR_API_KEY" }, }); const data = await response.json();
1{2 "subscription": {3 "plan": "max",4 "status": "active",5 "billing_interval": "month",6 "cancel_at_period_end": false,7 "current_period_start": "2026-10-26T21:51:51+00:00",8 "current_period_end": "2026-11-26T21:51:51+00:00",9 "trial_ends_at": null,10 "canceled_at": null,11 "features": {12 "credits_per_month": 75000,13 "bonus_percentage": 15,14 "non_expiring_credits": true,15 "support_level": "priority"16 }17 },18 "meta": {19 "request_credit_cost": 0,20 "credits_remaining": 14521 }22}
Manage API keys
GET /v1/account/api-keys lists your API keys, newest first. The list never shows whole keys, only the last eight characters.
is_current marks the key you are making this request with. usage_last_30d shows its usage over the last 30 days.
curl -G "https://handelsregister.ai/api/v1/account/api-keys" \ -H "x-api-key: YOUR_API_KEY"
import requests response = requests.get( "https://handelsregister.ai/api/v1/account/api-keys", headers={"x-api-key": "YOUR_API_KEY"}, ) data = response.json()
const url = new URL("https://handelsregister.ai/api/v1/account/api-keys"); const response = await fetch(url, { headers: { "x-api-key": "YOUR_API_KEY" }, }); const data = await response.json();
1{2 "api_keys": [3 {4 "id": 10,5 "key_last_8": "Ab12Cd34",6 "is_current": true,7 "created_at": "2026-11-01T04:17:31+00:00",8 "last_used_at": "2026-11-01T07:55:12+00:00",9 "usage_last_30d": {10 "requests": 97,11 "credits_used": 41112 }13 }14 ],15 "total": 1,16 "meta": {17 "request_credit_cost": 0,18 "credits_remaining": 14519 }20}
Creating and deleting only works with the admin token, not with an API key. You create it under Account › API keys in the section “For developers: manage keys via the API”. It is valid for one year, and a new one replaces the old one.
POST /v1/account/api-keys creates a key. The response contains it in full, only this once. Up to 25 keys can be active at the same time.
curl -X POST "https://handelsregister.ai/api/v1/account/api-keys" \ -H "Authorization: Bearer YOUR_ADMIN_TOKEN"
import requests response = requests.post( "https://handelsregister.ai/api/v1/account/api-keys", headers={"Authorization": "Bearer YOUR_ADMIN_TOKEN"}, ) data = response.json()
const response = await fetch("https://handelsregister.ai/api/v1/account/api-keys", { method: "POST", headers: { "Authorization": "Bearer YOUR_ADMIN_TOKEN", }, }); const data = await response.json();
1{2 "api_key": {3 "id": 13,4 "key": "…",5 "created_at": "2026-11-01T08:32:00+00:00"6 },7 "meta": {8 "message": "Store this key securely. It grants full data access to this account.",9 "request_credit_cost": 0,10 "credits_remaining": 14511 }12}
DELETE /v1/account/api-keys/{id} deletes a key right away. From then on the API rejects requests with it.
Bearer tokens
Instead of the API key, a program can also authenticate with a bearer token. You manage tokens under /v1/auth/tokens, with your API key in the header x-api-key.
POST /v1/auth/tokens/create creates a token. It is in the response under token, only this once.
curl -X POST "https://handelsregister.ai/api/v1/auth/tokens/create" \ -H "x-api-key: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "token_name": "CRM-Sync", "abilities": [ "api:data", "account:read" ] }'
import requests response = requests.post( "https://handelsregister.ai/api/v1/auth/tokens/create", headers={"x-api-key": "YOUR_API_KEY"}, json={ "token_name": "CRM-Sync", "abilities": [ "api:data", "account:read" ] }, ) data = response.json()
const response = await fetch("https://handelsregister.ai/api/v1/auth/tokens/create", { method: "POST", headers: { "x-api-key": "YOUR_API_KEY", "Content-Type": "application/json", }, body: JSON.stringify({ "token_name": "CRM-Sync", "abilities": [ "api:data", "account:read" ] }), }); const data = await response.json();
| Name | Type | Description | Example |
|---|---|---|---|
| token_nameBody | stringrequired | A name you recognize the token by, such as the name of your application.Limits: at most 255 characters |
CRM-Sync |
| abilitiesBody | list of stringoptional |
The abilities as a list. If omitted, the token gets api:data for the data endpoints and account:read for the account endpoints. monitoring:manage allows changes to monitors.Default: ["*"] |
["api:data","account:read"] |
| expires_atBody | string (date-time)optional | Expiry date in the future. If omitted, the token is valid until you revoke it. | – |
1{2 "token": "…",3 "name": "CRM-Sync",4 "abilities": [5 "api:data",6 "account:read"7 ],8 "expires_at": null,9 "created_at": "2026-11-01T08:31:26.000000Z",10 "meta": {11 "message": "Token created successfully. Store this token securely as it will not be shown again.",12 "credits_remaining": 14513 }14}
Only the admin token has the ability account:keys for API keys and signing secrets. It cannot be granted through the API.
GET /v1/auth/tokens lists all tokens of your account with name, abilities and last use, including the admin token.
DELETE /v1/auth/tokens/{id} revokes a token.
DELETE /v1/auth/tokens revokes all tokens at once, including the admin token. After that you need a new admin token to manage keys.
Errors
Errors have the structure {"error": "…", "meta": {"message": "…"}}. Errors cost nothing.
| Status | Cause | What you can do |
|---|---|---|
| 400 |
api_key is in the URL. |
Send the key in the header x-api-key. |
| 400 |
A parameter is invalid, such as a date, group_by or a period that is too long. |
Correct the value as meta.message describes. |
| 401 | No API key or token, or an invalid one. |
Send the key in the header x-api-key. |
| 401 |
No API key, or an invalid one. A bearer token does not work under /v1/auth. |
Send the API key in the header x-api-key. |
| 403 |
The bearer token lacks the ability account:read. |
Use the API key or a token with account:read. |
| 403 | Your account's email address is not confirmed yet, or the account is locked. | Open the link from the confirmation email. If the account is locked, support can help. |
| 403 | This call needs the admin token. An API key is not enough, and neither is another token. |
Send it with Authorization: Bearer and the admin token. |
| 404 | No key or token with this ID. | Take the ID from the list. |
| 422 |
The maximum number of API keys has been reached (too_many_keys). |
Delete an old key. |
| 429 | Too many requests. |
Retry after Retry-After. |
| 500 |
A value is invalid: token_name is missing or too long, abilities is not a list, or expires_at is not in the future. |
Correct the values. With Accept: application/json the error comes as JSON. |
1{2 "error": "invalid_request",3 "meta": {4 "message": "'group_by' must be one of: day, month.",5 "request_credit_cost": 0,6 "credits_remaining": 1457 }8}