跳转到内容

Microsoft批量号码检测API:快速电话号码验证

检查输入的电话号码是否注册了Microsoft服务(Outlook、Skype等)

上传检测文件代码示例:

curl --location 'https://api.checknumber.ai/v1/tasks' \
--header 'X-API-Key: API-KEY' \
--form 'file=@"./number.txt"' \
--form 'task_type="microsoft"'

检查任务状态代码示例:

curl --location 'https://api.checknumber.ai/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
}

提供任务完成响应并包含结果下载URL。

{
"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://wapic.s3.ap-southeast-1.amazonaws.com/externalcheck/d4g24nep2jvh04o9uoh0/d4g24nep2jvh04o9uoh0.zip?X-Amz-Algorithm=AWS4-HMAC-SHA256..."
}

上传文件请求URL

POST https://api.checknumber.ai/v1/tasks

上传文件请求参数

参数描述
file文件,上传文件,每行应包含一个E.164格式的电话号码
task_type字符串,任务类型,设置为 “microsoft”

检查任务状态请求URL

POST https://api.checknumber.ai/v1/gettasks

检查任务状态请求参数

参数描述
task_id字符串,任务创建时返回的任务ID

结果字段

字段描述示例
NumberE.164格式的电话号码+12025551234
microsoft号码是否注册了Microsoftyes, no

响应格式

字段描述
created_at任务创建时间戳
updated_at最后任务状态更新时间戳
task_id唯一任务标识符
user_id用户ID
status任务状态:
pending:排队等待
processing:正在处理
exported:结果可下载
total处理的电话号码总数
success成功验证的号码数
failure处理失败的号码数
result_url(可选)状态为exported时的结果下载URL

状态码

状态描述
200收费,请求成功,任务已创建或状态已检索
400免费,错误请求,参数或文件格式无效
500免费,内部服务器错误,请稍后重试