Authorization header. Without it, the API immediately rejects the request with a 401 Unauthorized response. Keep your key secure — treat it with the same care as a password.
Authorization Header
Include the following header with every API request, replacingYOUR_API_KEY with your actual key:
Obtaining an API Key
You generate API keys from your mFoundry account settings. See the API Keys guide for a step-by-step walkthrough of creating a key, setting its scopes, and rotating it when needed. Each key is displayed only once at creation time — copy it immediately and store it in a secrets manager or environment variable.Key Scopes
Not all API keys have the same level of access. When you create a key at Settings > API Keys, you choose its scope:- Read-only — the key can call
GETendpoints but cannot create, update, or delete resources. - Full access — the key can call all endpoints your account role permits.
- Resource-scoped — some keys can be restricted to specific resources (for example, projects only), preventing accidental access to user or webhook endpoints.
Error Responses
When authentication fails, the API returns one of the following errors:
A
401 means you need to check that your key is correct and properly formatted. A 403 means the key is recognized but scoped too narrowly — you need a key with broader permissions or the appropriate resource scope.