# The dzbot API

Everything your dzbot server holds — players, wallets, orders, factions, tickets — for your own Discord bot, website, dashboard or script. The API is the one the dzbot app itself runs on.

[Open the reference](https://developers.dzbot.de/api/reference) [TypeScript SDK](https://developers.dzbot.de/sdk/) [Lists and search](https://developers.dzbot.de/api/search)

> Only after how full DayZ servers are? The [public server data](https://developers.dzbot.de/api/public) needs no key and no dzbot server.

## API keys and sign-in

Keys and sign-ins belong to an [app](https://developers.dzbot.de/api/apps) — your bot or website as dzbot sees it. Every request carries either an API key or the access token of a player who signed in with [Sign in with dzbot](https://developers.dzbot.de/sdk/oauth), as a bearer token:

```
Authorization: Bearer dzk_your_key_here
```

Create keys in the admin area of your server under **Developers**, in an app. Give each key a note so you know later what uses it, copy it right away — the full key is only shown once — and delete it to revoke it at once. Treat keys like passwords: never commit them or post them in public channels.

A key belongs to one server and carries its own list of access rights: it reaches exactly what those rights open, nothing of another server. On a server with ticket **support levels**, a key also needs the matching `admin.tickets.level_<id>` right — without any level right it sees no tickets at all.

## Base URL and server

All endpoints live under

```
https://api.dzbot.de/api
```

and every request names its server in the `X-Server-Subdomain` header — the subdomain of your server's dzbot page:

```
curl "https://api.dzbot.de/api/admin/search/player?q=Survivor" \
  -H "Authorization: Bearer dzk_your_key_here" \
  -H "X-Server-Subdomain: your-server"
```

A player's wallet balance belongs to the organization: it is one balance shared by all servers of the organization.

## What the API covers

### Players

Profiles, wallets and transactions, groups, notes, restrictions.

### Shop

Orders, the item catalogue, kits, subscriptions and coupons.

### Server

Factions, bases, zones, tickets, logs, settings and the rest of the admin area.

Every list is read through one search endpoint — see [Lists and search](https://developers.dzbot.de/api/search). Reading one row, creating, changing and deleting each have their own endpoint in the [reference](https://developers.dzbot.de/api/reference).

## Don't poll, listen

For what happens on the server — kills, orders, tickets — let dzbot tell you: [webhooks](https://developers.dzbot.de/sdk/webhooks) push every event to your bot, [live events](https://developers.dzbot.de/sdk/live) stream them into a browser. The [event catalog](https://developers.dzbot.de/sdk/events) lists them all.

## Rate limits

120 requests a minute per key or signed-in token, 600 per app; over that the API answers `429` with `Retry-After`. For data that changes rarely, once a minute is plenty. See [Apps and keys](https://developers.dzbot.de/api/apps#rate-limits).

## OpenAPI

The OpenAPI specification is at

```
https://api.dzbot.de/api/docs.json
```

Import it into Postman, Insomnia or any OpenAPI generator to get a typed client for your language. The [reference](https://developers.dzbot.de/api/reference) renders the same file.

---

Web page: https://developers.dzbot.de/api/ · All pages: https://developers.dzbot.de/llms.txt
