Skip to main content

How errors are returned

Errors can appear in two ways: Always check HTTP status first. If it is 200, check success in the body — only read swapped when success is true.

Error response body format


SIM Swap Check — Error details

Endpoint: POST /v1/telecom/sim-swap-check

Authentication errors (HTTP 401)

Returned when clientId or clientSecret headers are missing or invalid.

Request errors (HTTP 400)

Returned when the request is malformed or the phone number’s operator does not support the check.

Check failed — HTTP 200 with success: false

Returned as HTTP 200 with success: false when the request was valid but the check could not be completed.

Call Forwarding Check — Error details

Endpoint: POST /v1/telecom/call-forwarding-check

Authentication errors (HTTP 401)

Returned when clientId or clientSecret headers are missing or invalid.

Request errors (HTTP 400)

Returned when the request is malformed or the phone number’s operator does not support the check.

Check failed — HTTP 200 with success: false

Returned as HTTP 200 with success: false when the request was valid but the check could not be completed.

Number Portability Check — Error details

Endpoint: POST /v1/telecom/portability

Authentication errors (HTTP 401)

Returned when clientId or clientSecret headers are missing or invalid.

Request errors (HTTP 400)

Returned when the request is malformed (e.g. an invalid phone number).

Check failed — HTTP 200 with success: false

Returned as HTTP 200 with success: false when the request was valid but the check could not be completed.