信使接口文档

创建信使项目

请求参数

参数名称 是否必选 数据类型 描述
action string create_messenger_project
actionid string
name string 名称
alias string 别名
description string 描述
config object 项目配置
service_provider string 服务商类型

响应参数

{
    "resp": "create_messenger_project",
    "code": 200,
    "msg": "成功",
    "result": {
        "id": 7,
        "uid": "MSP3983774700010"
    },
    "actionid": ""
}

编辑信使项目

请求参数

参数名称 是否必选 数据类型 描述
action string update_messenger_project
actionid string
Id int ID
uid string 编号
name string 名称
alias string 别名
description string 描述
config object 项目配置
service_provider string 服务商类型

响应参数

{
    "resp": "update_messenger_project",
    "code": 200,
    "msg": "成功",
    "result": {
        "id": 7,
        "uid": "MSP3983774700010"
    },
    "actionid": ""
}

删除信使项目

请求参数

参数名称 是否必选 数据类型 描述
action string delete_messenger_project
actionid string
Id int ID

响应参数

{
    "resp": "delete_messenger_project",
    "code": 200,
    "msg": "成功",
    "result": {
        "id": 7,
        "uid": "MSP3983774700010"
    },
    "actionid": ""
}

启动信使项目

请求参数

参数名称 是否必选 数据类型 描述
action string start_messenger_project
actionid string
Id int ID

响应参数

{
    "resp": "start_messenger_project",
    "code": 200,
    "msg": "成功",
    "result": {
        "id": 7,
        "uid": "MSP3983774700010"
    },
    "actionid": ""
}

停止信使项目

请求参数

参数名称 是否必选 数据类型 描述
action string stop_messenger_project
actionid string
Id int ID

响应参数

{
    "resp": "stop_messenger_project",
    "code": 200,
    "msg": "成功",
    "result": {
        "id": 7,
        "uid": "MSP3983774700010"
    },
    "actionid": ""
}

获取信使项目详情

请求参数

参数名称 是否必选 数据类型 描述
action string get_messenger_project_item
actionid string
Id int ID

响应参数

{
    "resp": "get_messenger_project_item",
    "code": 200,
    "msg": "成功",
    "result": {
        "id": 7,
        "uid": "MSP3983774700010",
        "name": "tttt",
        "organization_id": "ORGANIZATION1658222117234135",
        "description": "",
        "send_mode": 1,
        "route": 4,
        "service_provider": "smtp",
        "class_id": "email",
        "is_active": 0,
        "create_at": "2023-09-08 16:15:37",
        "update_at": "2023-09-08 16:15:37",
        "save_history_to_db": 0
    },
    "actionid": ""
}

获取信使项目列表

请求参数

参数名称 是否必选 数据类型 描述
action string 指令:get_messenger_project_list
actionid string 指令编号
page_index int 当前页
page_size int 每页数
where_and string and 条件
where_in string in 条件
where_or string or 条件

响应参数

{
    "resp": "get_messenger_project_list",
    "code": 200,
    "msg": "成功",
    "result": {
        "page_index": 1,
        "page_size": 20,
        "total_pages": 1,
        "total_records": 7,
        "data": [
            {
                "id": 1,
                "uid": "MSP3664769700003",
                "name": "邮箱推送",
                "organization_id": "ORGANIZATION1658222117234136",
                "description": "",
                "send_mode": 1,
                "route": 1,
                "service_provider": "smtp",
                "class_id": "email",
                "is_active": 1,
                "create_at": "2023-06-06 11:26:47",
                "update_at": "2023-07-10 18:06:03",
                "save_history_to_db": 0
            }
        ]
    },
    "actionid": ""
}

Email(发送邮件)

请求参数

参数名称 是否必选 数据类型 描述
action string send-email
actionid string
project_id int 信使项目主键ID
email_group object 消息体
+ EmailSubject string 主题
+ EmailContent string 内容
+ EmailFile string 主题
send_user_group array 接受消息的邮箱

响应参数

{
    "code": 200,
    "msg": "success",
    "info": "",
    "result": "发送成功"
}

SMS(发送短信)

请求参数

参数名称 是否必选 数据类型 描述
action string send-sms
actionid string
project_id int 信使项目主键ID
tpl_params array 华为短信模板中定义的变量组
sms_group object 消息体 ,使用 tpl_params还是sms_group取决于华为云短信模板
+ msgdata string 消息内容
send_user_group array 接受消息的手机号

响应参数

{
    "code": 200,
    "msg": "success",
    "info": "",
    "result": "发送成功"
}

APP(app推送)

请求参数

参数名称 是否必选 数据类型 描述
action string send-app-push
actionid string
project_id int 信使项目主键ID
title string 消息标题
content string 消息内容
payload string 消息附加信息
send_user_group array 接受消息的设备标识

响应参数

{
    "code": 200,
    "msg": "success",
    "info": "",
    "result": "发送成功"
}

钉钉应用消息/钉钉机器人

请求参数

参数名称 是否必选 数据类型 描述
action string send-ding-talk/send-ding-robot
actionid string
project_id int 信使项目主键ID
title string 消息标题
content string 消息内容
payload string 消息附加信息
send_user_group array 接受消息的手机号

响应参数

{
    "code": 200,
    "msg": "success",
    "info": "",
    "result": "发送成功"
}

企业微信应用消息/企业微信机器人

请求参数

参数名称 是否必选 数据类型 描述
action string send-corp-wechat/send-corp-wechat-robot
actionid string
project_id int 信使项目主键ID
title string 消息标题
content string 消息内容
payload string 消息附加信息
send_user_group array 接受消息的手机号

响应参数

{
    "code": 200,
    "msg": "success",
    "info": "",
    "result": "发送成功"
}
文档更新时间: 2024-08-09 12:26   作者:技术支持