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"
      ]
    }
  ]
}
CodeMeans
200 / 201It worked. 201 means something was created.
400Something sent was wrong. errors lists each field.
401No key, a wrong key, or a revoked key.
402The plan has ended. Reading works; changes are refused until it is renewed.
403The member behind the key may not do this, or the plan doesn't include it.
404Not found, or not a lead that member may see.
409A clash, e.g. a phone number the workspace keeps unique already exists.
429Too many requests: 300 a minute for each key. Wait a minute.

Something missing or unclear? Tell us and we will fix this page.