跳转到内容

电话号码校验 API:批量格式与有效性检测

对上传列表中的国际电话号码进行批量校验(格式、有效性及相关编号信息)。与网站其他 v1 检测产品使用相同的提交流程。

上传检测文件示例:

curl --location 'https://api.ekycpro.com/v1/tasks' \
--header 'X-API-Key: API-KEY' \
--form 'file=@"./numbers.txt"' \
--form 'task_type="phoneCheck"'

查询任务状态示例:

curl --location 'https://api.ekycpro.com/v1/gettasks' \
--header 'X-API-Key: API-KEY' \
--form 'task_id="task_id"'

上传成功后的响应

{
"task_id": "d4g8o46p2jvh04o9uolg",
"status": "pending",
"total": 2049,
"message": "Task created successfully",
"created_at": "2025-11-21T15:58:08.916446594Z"
}

处理中

{
"created_at": "2025-11-21T08:27:09.933Z",
"updated_at": "2025-11-21T08:27:10.241Z",
"task_id": "d4g24nep2jvh04o9uoh0",
"user_id": "wfi7wGPS4B4PdtTMox5Y",
"status": "processing",
"total": 2049,
"success": 1024,
"failure": 0
}

完成(exported

{
"created_at": "2025-11-21T08:27:09.933Z",
"updated_at": "2025-11-21T08:27:10.241Z",
"task_id": "d4g24nep2jvh04o9uoh0",
"user_id": "wfi7wGPS4B4PdtTMox5Y",
"status": "exported",
"total": 2049,
"success": 2049,
"failure": 0,
"result_url": "https://example-link-to-results.zip"
}

上传文件地址

POST https://api.ekycpro.com/v1/tasks

上传参数

参数名说明
filefile,每行一个号码(建议 E.164,例如 +8613800138000
task_typestring,固定为 phoneCheck

查询任务状态地址

POST https://api.ekycpro.com/v1/gettasks

查询参数

参数名说明
task_id创建任务后返回的任务 ID

结果字段

字段名说明
NumberE.164 等格式的号码
phoneCheck校验结果(具体以导出文件表头为准)

响应字段说明

字段说明
created_at创建时间
updated_at最后更新时间
task_id任务 ID
user_id用户 ID
statuspending · processing · exported
total总行数
success成功处理行数
failure失败行数
result_urlexported 时的结果下载地址

状态码

状态说明
200charge,请求成功
400free,参数或格式错误
500free,服务异常