Errors
Error codes and how to handle them
The Micro API uses standard HTTP status codes. Errors return a JSON body with a message field describing what went wrong.
{ "message": "Invalid filter: unknown property slug 'emial'"}Status codes
Section titled “Status codes”| Code | Name | When it happens |
|---|---|---|
400 | Bad Request | Malformed request body, invalid filter operator, unknown property slug, missing required field |
401 | Unauthorized | Missing x-api-key header |
403 | Forbidden | API key is invalid, revoked, or doesn’t have access to the requested team |
404 | Not Found | Object ID doesn’t exist or isn’t accessible |
429 | Too Many Requests | Rate limit exceeded — see Rate Limits |
500 | Internal Server Error | Something went wrong on our end |
Handling errors
Section titled “Handling errors”const res = await fetch(`https://api.micro.so/v2/prism/query/${teamId}/contact`, { method: 'POST', headers: { 'x-api-key': apiKey, 'Content-Type': 'application/json' }, body: JSON.stringify({ query: { select: ['full_name'] } }),});
if (!res.ok) { const error = await res.json(); throw new Error(`Micro API error ${res.status}: ${error.message}`);}Common 400 errors
Section titled “Common 400 errors”- Unknown property slug — check the slug against the Objects reference
- Invalid operator — filter operators are case-sensitive (
=not==) - Missing
select— every query requires at least one property inselect - Invalid
objectType— must be one ofcontact,organization,identity,deal,action,event,document