# Authentication (/authentication)



Every request carries a key:

```http
Authorization: Bearer sk_live_...
```

Keys in the query string or the request body are **refused**. A URL is logged by
every proxy it passes through, and that is how customer keys leak.

## Keys are shown once [#keys-are-shown-once]

We store a hash, not the key. The plaintext exists only in the response that
creates it — copy it then. If you lose it, revoke it and issue another; there is
no way to read it back.

You can hold several keys at once and revoke them one at a time, which is what
makes rotation possible without downtime: issue the new one, move your traffic,
revoke the old one.

## Scopes [#scopes]

A key carries scopes, fixed at creation. A call outside them answers `403` with
`insufficient_scope` and names the scope it wanted.

<ScopeTable />

Give a key the least it needs. A key that only reports delivery status wants
`messages:read` and nothing else — if it leaks, it cannot send.

## Admin keys [#admin-keys]

Your keys always answer `GET /account` with `type: "user"`. Keys that belong to
SendKuy staff rather than to an account answer with `type: "admin"`, and `plan`,
`credits` and `usage` come back `null` rather than missing. A shape that
disappears forces you to guess; a shape that is null can be checked.
