# 群发助手发送

## OpenAPI Specification

```yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /api/qw/doApi:
    post:
      summary: 群发助手发送
      deprecated: false
      description: >-
        <div style="background: linear-gradient(135deg, rgba(255, 213, 145,
        0.45) 0%, rgba(255, 255, 255, 0.06) 100%); border: 1px solid rgba(255,
        236, 202, 0.7); border-radius: 12px; padding: 20px 28px; margin-bottom:
        20px; box-shadow: 0 4px 12px rgba(250, 140, 22, 0.08)">
          <h3 style="margin: 0 0 8px 0; font-size: 18px; font-weight: 600; color: inherit; border: none; padding-bottom: 0;">群发助手发送</h3>
          <p style="margin: 0; font-size: 14px; color: inherit; line-height: 1.6">群发限制说明<br> 发送限制：每天只能对每个客户或者群执行一次群发。<br>权限说明：群主可直接创建消息并直接发送。</p>
        </div>
      tags:
        - 'API参考/会话与消息/消息模块 '
      parameters:
        - name: Content-Type
          in: header
          description: ''
          required: true
          example: application/json
          schema:
            type: string
        - name: X-QIWEI-TOKEN
          in: header
          description: >-
            <p style="margin: 0; font-size: 14px; color: inherit; line-height:
            1.6;">进入 <a href="https://new.qiweapi.com/tokens" style="color:
            inherit; text-decoration: underline; font-weight: 600;">应用凭证</a>，复制
            <code style="color: inherit; background: rgba(82, 196, 26, 0.08);
            border: 1px solid rgba(82, 196, 26, 0.1); padding: 2px 4px;
            border-radius: 3px;">TokenId</code>。</p>
          required: true
          example: '{{tokenId}}'
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                method:
                  type: string
                  title: 执行方法
                  description: >-
                    <code style="color: inherit; background: rgba(82, 196, 26,
                    0.08); border: 1px solid rgba(82, 196, 26, 0.1); padding:
                    2px 4px; border-radius: 3px;">/msg/sendGroupMsg</code>
                params:
                  type: object
                  properties:
                    guid:
                      type: string
                      title: 设备 ID
                      description: >-
                        <p style="margin: 0; font-size: 14px; color: inherit;
                        line-height: 1.6;">设备唯一标识 <code style="color: inherit;
                        background: rgba(82, 196, 26, 0.08); border: 1px solid
                        rgba(82, 196, 26, 0.1); padding: 2px 4px; border-radius:
                        3px;">guid</code>，由「创建设备」接口返回，业务接口必传。</p>
                    msgList:
                      type: array
                      items:
                        type: object
                        properties:
                          msgData:
                            type: object
                            properties:
                              content:
                                type: string
                            required:
                              - content
                            x-apifox-orders:
                              - content
                            description: >-
                              <p style="margin: 0; font-size: 14px; color:
                              inherit; line-height: 1.6;">【与发送消息里面的字段相同,
                              不需要&#x27;toId&#x27;这个字段】</p>
                          type:
                            type: integer
                            description: >-
                              <p style="margin: 0; font-size: 14px; color:
                              inherit; line-height: 1.6;">0: 文本 13: 链接 14: 图片
                              15: 文件 23: 视频 78: 小程序</p>
                        x-apifox-orders:
                          - msgData
                          - type
                      title: 消息列表
                      description: ''
                    sendType:
                      type: integer
                      description: >-
                        <p style="margin: 0; font-size: 14px; color: inherit;
                        line-height: 1.6;">0: 表示外部联系人 1: 表示外部群</p>
                      title: 发送类型
                    toIdList:
                      type: array
                      items:
                        type: string
                      title: 发送成员列表
                      description: ''
                  required:
                    - guid
                    - msgList
                    - sendType
                    - toIdList
                  x-apifox-orders:
                    - guid
                    - msgList
                    - sendType
                    - toIdList
                  title: 请求参数
              required:
                - method
                - params
              x-apifox-orders:
                - method
                - params
            example:
              method: /msg/sendGroupMsg
              params:
                guid: '{{guid}}'
                msgList:
                  - msgData:
                      content: 我是群发-文本类型
                    type: 0
                  - msgData:
                      title: 我是群发title
                      iconUrl: >-
                        https://wew**k.qpic.cn/wwpic3az/59411_H0x4p2RNQHmdDjh_1**9274772/0
                      linkUrl: https://www.baidu.com
                      desc: 我是群发desc
                    type: 13
                sendType: 1
                toIdList:
                  - 1****0042024
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                    title: 状态码
                    description: >-
                      <p style="margin: 0; font-size: 14px; color: inherit;
                      line-height: 1.6;">状态码，<code style="color: inherit;
                      background: rgba(82, 196, 26, 0.08); border: 1px solid
                      rgba(82, 196, 26, 0.1); padding: 2px 4px; border-radius:
                      3px;">0</code> 成功。</p>
                  data:
                    type: object
                    properties:
                      groupMsgId:
                        type: integer
                        title: 分组消息Id
                        description: ''
                    required:
                      - groupMsgId
                    x-apifox-orders:
                      - groupMsgId
                    title: 响应数据
                    description: >-
                      <p style="margin: 0; font-size: 14px; color: inherit;
                      line-height: 1.6;">业务数据。</p>
                  msg:
                    type: string
                    title: 说明
                    description: >-
                      <p style="margin: 0; font-size: 14px; color: inherit;
                      line-height: 1.6;">返回说明。</p>
                required:
                  - code
                  - data
                  - msg
                x-apifox-orders:
                  - code
                  - data
                  - msg
                x-apifox-refs: {}
              example:
                code: 0
                data:
                  groupMsgId: 1120366371070430
                msg: 成功
          headers: {}
          x-apifox-name: 成功
      security: []
      x-apifox-folder: 'API参考/会话与消息/消息模块 '
      x-apifox-status: released
      x-run-in-apifox: https://app.apifox.com/web/project/7051713/apis/api-344613933-run
components:
  schemas: {}
  securitySchemes:
    apiKey:
      type: apikey
      in: header
      name: X-WECOM-TOKEN
servers:
  - url: https://new.qiweapi.com/qiwe
    description: 正式环境
security: []

```
