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

# Authentication

> API keys, scopes and expiry.

Send your API key with every request in the `Authorization` header:

```http theme={null}
Authorization: Bearer wt_live_...
```

A request without a valid key gets `401 Unauthorized`. That includes a key that was revoked or has expired.

Also send a `User-Agent` header that names your software, such as `User-Agent: my-crm-sync/1.0`. Some
HTTP libraries send a default that our firewall blocks with `403`.

> [!WARNING]
>
> Only call the API from your own server. A browser would technically be allowed to call it, but then
> everyone who opens your website can read the key, and with it your orders and the names and email
> addresses of your buyers.

## Scopes

Each key has one or more scopes. A request for data the key has no scope for gets `403 Forbidden`.

| Scope | Gives access to |
| - | - |
| `events:read` | Events, their timeslots and ticket types |
| `orders:read` | Orders, including the name and email address of the buyer |
| `tickets:read` | Tickets, including the name and email address of the holder |

`GET /public/v1/organization` works with any scope. Give a key only the scopes the software needs.

## Expiry

When you create a key you choose how long it works: 1 month, 6 months, 1 year (the default) or no
expiry. The administrators of your organization get an email 14 days before a key expires. Create a
new key, put it in your software, then revoke the old one.

A key without expiry keeps working until someone revokes it. Only choose it when you rotate keys
yourself.

## Managing keys

Under **Settings > Integrations > API keys** you see every key with its scopes, who created it, when it
expires, when it was last used and how many requests it made. Revoke a key there as soon as it may have
leaked; it stops working immediately.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.