Takeover Protection (SIM Swap)

As part of CM.com's Takeover Protection measures, the Mobile Identity Services offer the option to detect a SIM swap. With this service you can check the last time the SIM of a provided phone number was swapped. SIM Swap has three different responses, depending on the serviceType in the request provided through the API.

  • timestamp: Returns a time in date-time format specifying the last time the SIM was swapped for the provided phone number.
  • 24h: Returns true or false depending on if the phone number has had their SIM swapped in the past 24 hours.
  • range: Returns a range indicating when the last SIM swap took place.

Please note that due to mobile operator limitations, please do not exceed one request per second to avoid unnecessary errors. This limit applies collectively to all Mobile Identity services for each set of credentials.

Request

URL

POST https://api.cm.com/mobile-identity/v1/sim-swap

Headers

Content-Type: application/json
Authorization: Bearer GENERATED_TOKEN_HERE

Body

{
    "phoneNumber": "+31612345678",
    "serviceType": "timestamp"
}

Parameters

PropertyTypeRequiredDescription
phoneNumberstringYesThe phone number to be checked. This must be a valid phone number in E.164 format.
serviceTypestringYesThe type of SIM Swap response to be retrieved. Available options are timestamp, 24h, and range.

Response

Depending on the serviceType provided in the request, the response is different.

{
    "state": "success",
    "timestamp": "2017-12-31T14:59:59Z"
}

Parameters

Only one of the following properties will be returned.

PropertyExampleDescription
timestamp'2024-01-01T00:00:00Z'Date and time of the last SIM Swap in ISO 8601 format.
24hfalsetrue or false regarding whether the last SIM swap took place in the last 24 hours.
range'gt': 1209600,
'lt': 604800
Range of values in seconds that contain the last SIM Swap. gt is the upper boundary and lt is the lower boundary. If the value for lt is -1, the last SIM swap is older than the gt value.