Answers and errors
Every answer is JSON with a success flag. A refused request says why.
A good answer has success: true and the result in data. A list adds meta with the paging.
{
"success": true,
"data": [
{
"id": "…",
"name": "Priya Sharma"
}
],
"meta": {
"total": 128,
"page": 1,
"limit": 20,
"totalPages": 7,
"totalCapped": false
}
}A refused request has success: false and a message. For a wrong field, errors names the field and what to fix:
{
"success": false,
"message": "Validation failed: body",
"errors": [
{
"name": "name",
"errors": [
"Enter the name"
]
},
{
"name": "phone",
"errors": [
"Add a phone number or an email"
]
}
]
}| Code | Means |
|---|---|
| 200 / 201 | It worked. 201 means something was created. |
| 400 | Something sent was wrong. errors lists each field. |
| 401 | No key, a wrong key, or a revoked key. |
| 402 | The plan has ended. Reading works; changes are refused until it is renewed. |
| 403 | The member behind the key may not do this, or the plan doesn't include it. |
| 404 | Not found, or not a lead that member may see. |
| 409 | A clash, e.g. a phone number the workspace keeps unique already exists. |
| 429 | Too many requests: 300 a minute for each key. Wait a minute. |
Something missing or unclear? Tell us and we will fix this page.