{"openapi":"3.0.3","info":{"title":"SIM Swap","description":"The SIM swap API provides a programmable interface for developers and other users (capabilities consumers) to request the last date of a SIM swap performed on the mobile line, or, to check whether a SIM swap has been performed during a past period.\n\n# Introduction\n\nThe SIM Swap API performs real-time checks on the activation date of a SIM card on the mobile network. It reveals if an individual mobile phone number (MSISDN) has been ported to another SIM card.\n\nThe SIM Swap API is useful to prevent fraud by reducing the risk of account takeover fraud by strengthening SIM based authentication processes such as SMS One-time passwords. Fraudsters are using SIM swap techniques to intercept SMS messages and reset passwords or receive verification codes that allow them to access protected accounts.\n\nThis API is used by an application to get information about a mobile line latest SIM swap date. It can be easily integrated and used through this secured API and allows SPs (Service Provider) to get this information an easy & secured way. The API provides management of 2 resources answering 2 distinct questions:\n\n* When did the last SIM swap occur?\n* Has a SIM swap occurred during last n hours?\n\nDepending on the network provider implementation, legal enforcement, etc... either one or both resources could be implemented.\n\n# Relevant terms and definitions\n\n* **SIM swap**:\nA SIM swap is a process in which a mobile phone user's current SIM card is deactivated or replaced with a new one. This is typically done by contacting the user's mobile service provider and requesting a new SIM card for various reasons, such as a lost or damaged SIM card, upgrading to a new phone, or changing phone numbers while keeping the same device.\n\n# API functionality\n\nThe API provides operation:\n\n- POST check: Checks if SIM swap has been performed during a past period (defined in the request with 'maxAge' attribute) for a given phone number.\n\n# Further info and support\n\n[GSMA Mobile Connect Account Takeover Protection specification](https:\/\/www.gsma.com\/identity\/wp-content\/uploads\/2022\/12\/IDY.24-Mobile-Connect-Account-Takeover-Protection-Definition-and-Technical-Requirements-v2.0.pdf) was used as source of input for this API. For more about Mobile Connect, please see [Mobile Connect website](https:\/\/mobileconnect.io\/).\n\n(FAQs will be added in a later version of the documentation)\n"},"servers":[{"url":"https:\/\/digihub.telkomsel.com\/sim-swap\/v0"}],"paths":{"\/check":{"post":{"tags":["Check SIM swap"],"description":"Check if SIM swap has been performed during a past period","operationId":"checkSimSwap","parameters":[{"in":"header","name":"X-Authorization","example":"[X-token]","description":"Bearer X-token","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"Create a check SIM swap request for a MSISDN identifier.\n","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/CreateCheckSimSwap"}}},"required":true},"responses":{"200":{"description":"Returns whether a SIM swap has been performed during a past period","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/CheckSimSwapInfo"}}}},"400":{"$ref":"#\/components\/responses\/Generic400"},"401":{"$ref":"#\/components\/responses\/Generic401"},"403":{"$ref":"#\/components\/responses\/Generic403"},"404":{"$ref":"#\/components\/responses\/Generic404"},"409":{"$ref":"#\/components\/responses\/Generic409"},"500":{"$ref":"#\/components\/responses\/Generic500"},"503":{"$ref":"#\/components\/responses\/Generic503"},"504":{"$ref":"#\/components\/responses\/Generic504"}}}}},"components":{"schemas":{"SimSwapInfo":{"type":"object","properties":{"latestSimChange":{"type":"string","format":"date-time","description":"Timestamp of latest SIM swap performed"}}},"CheckSimSwapInfo":{"type":"object","properties":{"swapped":{"type":"boolean","description":"Indicates whether the SIM card has been swapped during the period within the provided age."}}},"PhoneNumber":{"type":"string","pattern":"^\\+?[0-9]{5,15}$","example":"+346661113334","description":"Subscriber number in E.164 format (starting with country code). Optionally prefixed with '+'."},"ErrorInfo":{"type":"object","required":["status","code","message"],"properties":{"status":{"type":"integer","description":"HTTP response status code"},"code":{"type":"string","description":"Code given to this error"},"message":{"type":"string","description":"Detailed error description"}}},"CreateCheckSimSwap":{"type":"object","required":["phoneNumber"],"properties":{"phoneNumber":{"$ref":"#\/components\/schemas\/PhoneNumber"},"maxAge":{"type":"integer","example":240,"description":"Period in hours to be checked for SIM swap.\n","format":"int32","minimum":1,"maximum":2400,"default":240}}}},"responses":{"Generic400":{"description":"Problem with the client request","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorInfo"},"example":{"status":400,"code":"INVALID_ARGUMENT","message":"Client specified an invalid argument, request body or query param"}}}},"Generic401":{"description":"Authentication problem with the client request","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorInfo"},"example":{"status":401,"code":"UNAUTHENTICATED","message":"Request not authenticated due to missing, invalid, or expired credentials"}}}},"Generic403":{"description":"Client does not have sufficient permission","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorInfo"},"example":{"status":403,"code":"PERMISSION_DENIED","message":"Client does not have sufficient permissions to perform this action"}}}},"Generic404":{"description":"Resource Not Found","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorInfo"},"example":{"status":404,"code":"SIM_SWAP.UNKNOWN_PHONE_NUMBER","message":"SIM Swap can't be checked because the phone number is unknown."}}}},"Generic409":{"description":"Conflict","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorInfo"},"example":{"status":409,"code":"CONFLICT","message":"Another request is created for the same MSISDN"}}}},"Generic500":{"description":"Server error","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorInfo"},"example":{"status":500,"code":"INTERNAL","message":"Server error"}}}},"Generic503":{"description":"Service unavailable. Typically the server is down","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorInfo"},"example":{"status":503,"code":"UNAVAILABLE","message":"Service unavailable"}}}},"Generic504":{"description":"Request time exceeded. If it happens repeatedly, consider reducing the request complexity","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorInfo"},"example":{"status":504,"code":"TIMEOUT","message":"Request timeout exceeded. Try later"}}}}}}}