Skip to main content

Create a key

1

Open API keys

Sign in and open Settings → API keys. Only business admins can create keys.
2

Name it

Name it after the system that will use it, for example Shop backend.
3

Limit it (optional)

Choose scopes, allowed IP addresses and an expiry date.
4

Copy it

The key starts with tlv_ and is shown only once. Messaly stores a hash of it, not the key.

Send it with every request

Use either header:

Scopes

A key with no scopes selected can call every endpoint. Give each system only the scopes it needs, so a leaked key can do less. A call outside the key’s scopes gets 403. Each endpoint in the API reference names the scope it needs.

IP allowlist

Add your servers’ public IP addresses to a key and it will be refused (403) from anywhere else. Leave the list empty to allow any address.

When it goes wrong

Keep keys on your server. Never put one in a mobile app, browser code or a public repository: anyone holding it can send messages billed to your wallet. If a key leaks, disable it in Settings → API keys straight away and create a new one. The page shows when each key was last used.