Authentication
How to authenticate with the Emfas API
All API requests require authentication using an API key. Include your key in the Authorization header using the Bearer scheme.
Using Your API Key
Add the Authorization header to every request:
curl "https://api.emfas.ai/v1/products" \
-H "Authorization: Bearer YOUR_API_KEY"Getting an API Key
- Log in to your Emfas workspace
- Open Settings (gear icon in the top-right)
- Click the API tab
- Click + to create a new key, give it a reference name, and click Generate key
- Copy the key immediately — it is only shown once
If you don't see the API tab in Settings, contact the Emfas team to enable API access for your organization.
Authentication Errors
If authentication fails, you'll receive a 401 Unauthorized response:
{
"error": "Unauthorized - missing or invalid authentication"
}Common causes:
- Missing
Authorizationheader - Invalid or revoked API key
- Malformed header (missing "Bearer " prefix)