Authentication
All API requests (except/v1/health) require a Bearer token in the Authorization header.
API key format
Keys use the prefixvtly_live_ followed by a random string:
Test keys
Test keys use the prefixvtly_test_ and enable test mode. With a test key:
- No upstream VIES/HMRC calls are made
- No quota is consumed
- Rate limit headers are omitted
- Responses include
meta.mode: "test" - Magic VAT numbers return predictable scenarios
How keys are stored
API keys are hashed with SHA-256 before storage. Vatly never stores your raw key. This means:- If you lose your key, it cannot be recovered — you’ll need to generate a new one
- Even if the database were compromised, your key cannot be reversed
What happens without a valid key
| Scenario | Result |
|---|---|
No Authorization header | 401 — unauthorized |
| Invalid or revoked key | 401 — unauthorized |
| Wrong format (not Bearer) | 401 — unauthorized |
docs_url pointing to the relevant error page.