Skip to content

PNS API list

henryou edited this page Dec 12, 2022 · 6 revisions

接口说明,查询当前号码绑定关系列表

请求头

参数名 类型 必填 说明
accessKey string 用户的accessKey
action string 请求方法,示例:getAXBList
bizType string 业务类型,固定为5,代表隐私号服务
ts string 毫秒级时间戳,示例:1670479632933
sign string 签名,签名算法

请求体

参数名 类型 必填 说明
limit uint 取值范围[0,1k],0代表不限制(获取所有),最大只允许获取1k条数据,关于=0时候超过1k条的问题,只会返回1k条
offset uint 偏移值,取值范围为[0,MAX],0代表从第一条开始

返回参数

参数名 类型 必填 说明
code int 返回码,0代表成功,其他失败
msg string 返回码描述
requestId string 请求id
bindList []array 返回绑定列表
total int 返回绑定关系数

返回的bindList的对象属性如下:

参数名 类型 必填 说明
customerId string 客户id
businessId string 业务id(比如这个did集合是做打车的,做快递的等等)
bindId string 绑定时候,隐私号服务返回的绑定id
customerBindId string 客户自定义的绑定id(由客户决定,需要保证唯一,customerBindId和bindId二选一即可)
phoneA string A的号码
phoneB string B的号码,A、B号码的国码须保持一致
did string pns的绑定虚拟号码
flag string 其他标识,比特组合,0:none,1:录音
expireAt uint 过期秒数,若是为0,代表不过期

请求示例

Header

KEY VALUE
accessKey xxxxxxxxxxxx
ts 1670479632933
bizType 5
action getAXBList
sign faxxxxxxxxxxxxxxxxxxxxxxxxxxxxd4

Body

{
    "limit":10,
    "offset":0
}

返回示例

{
    "code": 0,
    "msg": "success",
    "requestId": "1602136379885752320",
    "bindList": [
        {
            "customerId": "cus_1",
            "businessId": "busi_1",
            "bindId": "b8c2aaf940d534d3c9ed8b780757f94e",
            "customerBindId": "1",
            "phoneA": "85211111114",
            "phoneB": "85222222222",
            "did": "85235753352",
            "flag": 0,
            "expireAt": 1670814918
        }
    ],
    "total": 1
}

简介

短信

语音

云呼叫中心(NXLink)

云呼叫中心(AI自动外呼)

Flash Call

短链

邮件验证码

DID号码

通用

号码检测

WhatsApp

Viber

Zalo ZNS

Super Message API

隐私号(旧)

PNS

坐席(旧版)

AI Agent

Clone this wiki locally