SIM Swap API HTTP responses

Here are the possible HTTP status codes you can get when using the SIM Swap API:


When you get a successful response containing information about the SIM swap event.

    "latestSimChange": "2023-07-03T12:27:08.312Z"


When there are issues, such as invalid arguments in the client request:

    "status": 400,
    "code": "INVALID_ARGUMENT",
    "message": "Client specified an invalid argument, request body or query param"


When there is an authentication issue with the client request:

    "status": 401,
    "code": "UNAUTHENTICATED",
    "message": "Request not authenticated due to missing, invalid, or expired credentials"


When a client does not have the right or enough permissions to access device data:

    "status": 403,
    "code": "PERMISSION_DENIED",
    "message": "Client does not have sufficient permissions to perform this action"


When the resource data cannot be found:

    "status": 404,
    "message": "SIM swap can't be checked because the phone number is unknown"


When there's a conflict with two requests for the same phone number (MSISDN):

    "status": 409,
    "code": "CONFLICT",
    "message": "Another request is created for the same MSISDN"


For internal server errors, you can contact Network as Code support team.

    "status": 500,
    "code": "INTERNAL",
    "message": "Server error"


Service is unavailable. Typically the server is down. Contact Network as Code support team and check when the service will return.

    "status": 503,
    "code": "UNAVAILABLE",
    "message": "Service unavailable"


The request time has been exceeded. If it happens repeatedly, consider reducing the request complexity. You can also contact Network as Code support team for possible solutions.

    "status": 504,
    "code": "TIMEOUT",
    "message": "Request timeout exceeded. Try later."

Last updated on June 28, 2024