Skip to Content
SparrowCRMDevelopers

Errors

The response format, and the status codes your code should handle.

Response format

Every response has a success flag. Successful responses put the result in data:

{
  "success": true,
  "data": { "id": "1152921504606846977", "firstName": "Priya" }
}

Errors have success: false, the HTTP status and a message:

{
  "success": false,
  "statusCode": 404,
  "error": "Contact not found"
}

Responses can also include fields such as timestamp, path and method. Some errors add an errorCode that your code can check.

Status codes

StatusMeaning
400The request is invalid, for example a required field is missing.
401The API key is missing or invalid.
402Your plan doesn't include this feature. The body has "errorCode": "FEATURE_NOT_ENABLED".
403The key isn't allowed to do this.
404The record doesn't exist.
500Something went wrong on our side. Try again later.

Ids are strings

Record ids are 64-bit numbers, which is more than JavaScript numbers can hold exactly, so the API always sends them as strings. Store and compare them as strings.

On this page