# 工作通知

# 发送工作通知

# host: https://yach-oapi.zhiyinlou.com 正式环境

# host: https://yach-oapi-test.zhiyinlou.com 测试环境

# 概述

名称
地址 /notice/message/send?access_token=ACCESS_TOKEN
请求方式 POST
参数 见【参数】
返回值 见【返回值】

# 参数

参数 参数类型 必须 说明
access_token String 调用接口凭证
agent_id String 应用app_id
userid_list String 接收助手消息的员工id "|" 隔开的yach唯一标识例如"yach076429|yach091805|yach131763" ,最大列表长度:100
dept_id_list String 接收者的部门id列表,最大列表长度:20, 接收者是部门id下(包括子部门下)的所有用户示例值23
to_all_user String 是否发送给企业全部用户
message String 消息格式参考:消息类型与数据格式
is_skip_error Int 遇到不存在的用户,是否跳过校验,默认0(0:否1:是)
everyone_sscard_msg Int 多人时是否按照单个人发消息。
userids是多人时且只有消息类型是sscard时有效
默认0(0:多个人返回同一个消息id 1:每个人都返回一条自己的消息id),且不能userids不能超过10人
注意返回结果不一样

返回值

{
    "code": 200,
    "msg": "",
    "obj": {
        "taskId": 39723147066478844
    }
}

当everyone_sscard_msg为1{
  "code": 200,
  "msg": "",
  "obj": {
    "yach111111": {
      "task_id": 593074552096076097
    },
    "yach222222": {
      "task_id": 593074552096076099
    },
    "yach333333": {
      "task_id": 593074552096076101
    }
  }
}

# 撤回工作通知

# host: https://yach-oapi.zhiyinlou.com 正式环境

# host: https://yach-oapi-test.zhiyinlou.com 测试环境

# 概述

名称
地址 /notice/message/recall?access_token=ACCESS_TOKEN
请求方式 POST
参数 见【参数】
返回值 见【返回值】

# 参数

参数 参数类型 必须 说明
access_token String 调用接口凭证
msg_task_id String 任务ID

返回值

{
    "code": 200,
    "msg": "",
    "obj": {
    }
}

# 查看工作通知发送结果

# host: https://yach-oapi.zhiyinlou.com 正式环境

# host: https://yach-oapi-test.zhiyinlou.com 测试环境

# 概述

名称
地址 /notice/message/result?access_token=ACCESS_TOKEN
请求方式 POST
参数 见【参数】
返回值 见【返回值】

# 参数

参数 参数类型 必须 说明
access_token String 调用接口凭证
msg_task_id String 任务ID

返回值

{
    "code": 200,
    "msg": "",
    "obj": {
        "status": 1 // 1:发送成功 2:发送失败 3:处理中
    }
}

# 获取工作通知消息体内容(仅支持sscard消息类型)

# host: https://yach-oapi.zhiyinlou.com 正式环境

# host: https://yach-oapi-test.zhiyinlou.com 测试环境

# 概述

名称
地址 /notice/message/sscard/info?access_token=ACCESS_TOKEN
请求方式 POST
参数 见【参数】
返回值 见【返回值】

# 参数

参数 参数类型 必须 说明
access_token String 调用接口凭证
msg_task_ids String 任务ID,多个通过

返回值

{
  "code": 200,
  "msg": "",
  "obj": {
    "593019860183855233": {
      "msgtype": "sscard",
      "sscard": [
        {
          "id": "component_id_xxx",
          "type": "text",
          "extra": "",
          "content": {
            "type": "plain_text",
            "i18n": {
              "zh_cn": "这是344一3个文案132。",
              "en_us": "This is a copy."
            }
          }
        }
      ],
      "last_msg": "这里是sscardtitle152354441"
    },
    "593019860183855236": {
      "msgtype": "sscard",
      "sscard": [
        {
          "id": "component_id_xxx",
          "type": "text",
          "extra": "",
          "content": {
            "type": "plain_text",
            "i18n": {
              "zh_cn": "这是344一3个文案132。",
              "en_us": "This is a copy."
            }
          }
        }
      ],
      "last_msg": "这里是sscardtitle152354441"
    }
  }
}

# 修改工作通知消息体内容(仅支持sscard消息类型)

# host: https://yach-oapi.zhiyinlou.com 正式环境

# host: https://yach-oapi-test.zhiyinlou.com 测试环境

# 概述

名称
地址 /notice/message/sscard/update?access_token=ACCESS_TOKEN
请求方式 POST
参数 见【参数】
返回值 见【返回值】

# 参数

参数 参数类型 必须 说明
access_token String 调用接口凭证
msg_task_ids String 任务ID,多个通过
message String 消息格式参考:消息类型与数据格式

返回值

{
  "code": 200,
  "msg": "",
  "obj": "593019860183855233" // 修改成功的任务ID
}
上次更新: 2024/4/24 下午2:09:32
foo