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

# Authentication

> API keys, and the scopes that say what each one may do.

Send your key as a bearer token on every request:

```bash theme={"system"}
curl https://api.postinger.dev/v1/accounts \
  -H "Authorization: Bearer pst_live_…"
```

> [!NOTE]
>
> Create a key under **API Keys** in [Postinger](https://postinger.dev). A key belongs to one workspace and only does what its scopes allow.

Keep keys secret: anyone with one can post to your accounts. Use them from your server, never from a browser or a mobile app.

## Scopes

A key gets the scopes chosen when it was created. Each endpoint needs one; without it the answer is `403`.

| Scope | Allows |
| - | - |
| `accounts:read` | Listing connected accounts |
| `posts:read` | Listing and reading posts |
| `posts:write` | Creating, changing and retrying posts |
| `posts:delete` | Deleting posts |
| `media:read` | Reading media |
| `media:write` | Uploading media |
| `analytics:read` | Reading analytics |

`GET /v1/me` works with any key, whatever its scopes.

## Revoking

Revoke a key under **API Keys**, or with the key itself: `DELETE /v1/me`. A revoked key answers `401` from then on.


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