Skip to content
Last updated

API Errors

If a request contains an invalid value (based on the validation property of a given field), the API returns a 400 Bad Request error detailing the first invalid field found. If one field fails validation, none of the provided fields will be updated.

An incorrect value that is otherwise valid (such as a phone number that is formatted correctly, but which isn't registered) will not result in an error. Instead, these values are stored, and the field's status is updated later to reflect the verification result.

For the best user experience, mirror the API's validation checks on the frontend and only submit values that pass these checks.

API status codes

The following status codes are used by the Trustap API when reporting success or failure of API requests.

CodeDescription
200, 201OK. Everything worked as expected.
400Bad Request. The request was unacceptable, often due to a missing required parameter or invalid value
401Unauthorized. No valid API key provided. Check your API Key or follow our setup guide if you do not yet have one.
403Forbidden. The API key does not have permissions to perform the request. If you are marking a call on behalf of a user, ensure your header includes Trustap-User with the ID of your user.
404Not Found. The requested resource does not exist.
409Conflict. Contact Trustap support for assistance.
500Server Errors. Something went wrong on Trustap’s end.