开放 API
先在 用户中心 · API 密钥 创建密钥,然后在请求头里带上:
Authorization: Bearer ak_xxxxxxxx curl -H "Authorization: Bearer ak_xxxxxxxx" https://你的域名/api/v1/countries
所有响应格式为 { "status": "success", "data": ... } 或 { "status": "error", "message": "..." }。每个密钥每分钟最多 60 次请求。价格均为本站售价,号码只按年订购。
GET /api/v1/rates?number=4420查询外呼某号码或前缀的每分钟价格。
{ "prefix": "4420", "destination": "United Kingdom, London", "pricePerMinute": 0.0315, "currency": "USD" }GET /api/v1/countries号码池中可开通号码的国家列表。
[ { "code": "44", "iso": "GB", "name": "United Kingdom" } ]GET /api/v1/countries/{iso}/directions某国家可开通的城市 / 号码类型及价格(年费、开通费)。iso 为两位国家代码,如 GB。
[ { "id": "13755", "name": "London", "areaCode": "20", "yearlyFee": 84, "setupFee": 0, "currency": "USD", "receiveSms": false, "tollFree": false, "documents": [] } ]GET /api/v1/directions/{id}/numbers?mask=123某城市 / 类型下当前可选的号码,mask 可选,按号码中包含的数字筛选。
[ { "id": "1712p0D1643D0t42r198658", "number": "+442030000001" } ]GET /api/v1/search?q=London跨国家按城市名或区号搜索号码类型,q 可以是城市名,或带国家码的区号如 4420、+1 212。
[ { "countryIso": "GB", "countryName": "United Kingdom", "id": "13755", "name": "London", "areaCode": "20", "yearlyFee": 84, "currency": "USD" } ]GET /api/v1/my/numbers当前密钥所属账户已开通的号码。
[ { "number": "442030000000", "country": "United Kingdom", "city": "London", "status": "on", "yearlyFee": 84, "currency": "USD", "expiresAt": "2027-02-11T18:14:40.000Z", "autorenew": true } ]