{"openapi":"3.1.0","info":{"title":"IMEILens IMEI API","version":"1.0.0","description":"Free, keyless API to validate IMEI numbers and generate test IMEIs and ICCIDs. Generated numbers are Luhn-valid test values for software testing. They are not assigned to real devices or SIM cards. Rate limit: 60 requests/minute per IP.","contact":{"email":"support@imeilens.com","url":"https://imeilens.com"},"termsOfService":"https://imeilens.com/en/legal/terms"},"servers":[{"url":"https://imeilens.com"}],"paths":{"/api/v1/imei/validate":{"get":{"operationId":"validateImei","summary":"Validate one IMEI","description":"Checks length and Luhn check digit, splits the IMEI into its parts and identifies the device model when the TAC is known. Does not check blacklist or carrier status.","parameters":[{"name":"imei","in":"query","required":true,"schema":{"type":"string"},"description":"15-digit IMEI or 16-digit IMEISV","example":"490154203237518"}],"responses":{"200":{"description":"Validation result","content":{"application/json":{"schema":{"type":"object","properties":{"imei":{"type":"string","description":"Digits only"},"valid":{"type":"boolean"},"reason":{"type":"string","enum":["length","checksum","chars"],"description":"Why it's invalid"},"type":{"type":"string","enum":["imei","imeisv"]},"tac":{"type":"string","description":"Type Allocation Code (first 8 digits)"},"reporting_body":{"type":"string"},"serial":{"type":"string"},"check_digit":{"type":"integer"},"expected_check_digit":{"type":"integer"},"svn":{"type":"string","description":"Software version number (IMEISV only)"},"device":{"type":["object","null"],"properties":{"brand":{"type":"string"},"model":{"type":"string"}},"description":"Device identified from the TAC database, or null if unknown"}},"required":["imei","valid"]}}}},"400":{"description":"Missing imei","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}}}},"post":{"operationId":"validateImeis","summary":"Validate up to 100 IMEIs","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"imeis":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100}},"required":["imeis"]}}}},"responses":{"200":{"description":"Validation results","content":{"application/json":{"schema":{"type":"object","properties":{"count":{"type":"integer"},"valid":{"type":"integer"},"results":{"type":"array","items":{"type":"object","properties":{"imei":{"type":"string","description":"Digits only"},"valid":{"type":"boolean"},"reason":{"type":"string","enum":["length","checksum","chars"],"description":"Why it's invalid"},"type":{"type":"string","enum":["imei","imeisv"]},"tac":{"type":"string","description":"Type Allocation Code (first 8 digits)"},"reporting_body":{"type":"string"},"serial":{"type":"string"},"check_digit":{"type":"integer"},"expected_check_digit":{"type":"integer"},"svn":{"type":"string","description":"Software version number (IMEISV only)"},"device":{"type":["object","null"],"properties":{"brand":{"type":"string"},"model":{"type":"string"}},"description":"Device identified from the TAC database, or null if unknown"}},"required":["imei","valid"]}}}}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}}}}},"/api/v1/iccid/generate":{"get":{"operationId":"generateIccids","summary":"Generate test ICCIDs","description":"Generates Luhn-valid ICCID (SIM card) numbers for testing: 89 + country calling code + random digits + check digit.","parameters":[{"name":"count","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":1}},{"name":"country","in":"query","schema":{"type":"string","enum":["01","44","49","33","34","39","55","52","90","62","91","234"],"default":"01"},"description":"Country calling code"},{"name":"length","in":"query","schema":{"type":"integer","enum":[19,20],"default":19}}],"responses":{"200":{"description":"Generated ICCIDs","content":{"application/json":{"schema":{"type":"object","properties":{"iccids":{"type":"array","items":{"type":"object","properties":{"iccid":{"type":"string"},"country":{"type":"string"},"country_name":{"type":"string"}}}},"notice":{"type":"string"}}}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}}}}},"/api/v1/imei/generate":{"get":{"operationId":"generateImeis","summary":"Generate test IMEIs","description":"Generates Luhn-valid IMEIs for testing. Default prefix 00 is the test reporting body. Use brand for real TAC ranges of recent models, or tac for an exact TAC.","parameters":[{"name":"count","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":1}},{"name":"brand","in":"query","schema":{"type":"string","enum":["apple","samsung","xiaomi","google","oppo","vivo","realme","oneplus","motorola","huawei","honor","nokia","tecno","infinix","sony","nothing"]}},{"name":"tac","in":"query","schema":{"type":"string","pattern":"^\\d{8}$"},"description":"Exact 8-digit TAC"},{"name":"prefix","in":"query","schema":{"type":"string","pattern":"^\\d{0,14}$","default":"00"}}],"responses":{"200":{"description":"Generated IMEIs","content":{"application/json":{"schema":{"type":"object","properties":{"imeis":{"type":"array","items":{"type":"object","properties":{"imei":{"type":"string"},"tac":{"type":"string"},"model":{"type":"string"}},"required":["imei","tac"]}},"notice":{"type":"string"}}}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}}}}}}}