Authenticate API requests
How to send your API key with each request.
Last updated April 27, 2026
Pass your API key in the Authorization header on every request. Bearer-style is the only supported format.
GET /api/v1/stores HTTP/1.1
Host: maptera.switchlabs.dev
Authorization: Bearer YOUR_API_KEYcURL example
curl https://maptera.switchlabs.dev/api/v1/stores \
-H "Authorization: Bearer YOUR_API_KEY"JavaScript (fetch)
const res = await fetch("https://maptera.switchlabs.dev/api/v1/stores", {
headers: {
"Authorization": `Bearer ${process.env.MAPTERA_API_KEY}`,
},
});
const stores = await res.json();Common 401 causes
- Missing the "Bearer " prefix in the header
- Using a revoked key
- Including the key in the URL instead of the header (not supported)
- Trailing whitespace or newlines in the key
Was this article helpful?
Related articles
Did this article miss your question?
Email our team and we will help directly.