Authentication
How to authenticate with the Micro API
The Micro API uses API keys for authentication. Every request must include your API key in the x-api-key header.
curl https://api.micro.so/v2/prism/query/{teamId}/contact \ -H "x-api-key: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "query": { "select": ["full_name", "email"] } }'Getting an API key
Section titled “Getting an API key”- Open Micro and go to Settings → API
- Click Generate API key
- Copy the key — it won’t be shown again
Keeping keys secure
Section titled “Keeping keys secure”- Never commit API keys to source control
- Use environment variables:
process.env.MICRO_API_KEY - Revoke or regenerate keys any time in Settings → API
Team ID
Section titled “Team ID”Most API endpoints require a {teamId} in the URL path. You can find your team ID in Settings → API. We plan to derive this from the API key automatically in a future version.
Errors
Section titled “Errors”If your key is missing or invalid you’ll get:
| Status | Meaning |
|---|---|
401 | No key provided |
403 | Key is invalid or doesn’t have access to this team |