> ## Documentation Index
> Fetch the complete documentation index at: https://gowa-docs.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# 发送实验性交互消息

> 仅立即发送本地流按钮、选择列表、
位置请求和carousel。 不支持预定的发送或 MCP。
使用非官方协议；API成功不能保证收件人
渲染或交付。 只接受个人用户或群组收件人。
提供按钮或卡片。 HTTP的整体身体限制也适用。




## OpenAPI

````yaml /zh/openapi.yml post /send/interactive
openapi: 3.0.0
info:
  title: WhatsApp API 多设备
  version: 9.7.0
  description: |
    此 API 用于通过 API 发送什么应用。

    Web 仪表板是一个单独的项目(gowa-ui)； 服务器下载它的
    最新版本资产并在 `/` 处服务(或在
    APP_UI_ENABLED=false时返回一个 JSON 横幅)。

    设备范围：
    - 在所有设备范围的REST 调用上发送 `X-Device-Id` 。
    - WebSocket: 连接到"/w?device_id=<id>`.
    - WebSocket 身份验证（启用基本身份验证时）：浏览器无法为
      WebSocket 连接设置 Authorization 请求头，因此还需在
      查询字符串中传入 `&authorization=<base64(user:pass)>`。 在
      生产中使用TLS ，因为凭据在 URL 中可见。
servers:
  - url: http://localhost:3000
security:
  - basicAuth: []
tags:
  - name: app
    description: 初始连接到 Whatsapp 服务器
  - name: device
    description: 多设备支持的设备管理
  - name: user
    description: 获取信息
  - name: send
    description: 发送消息 (Text/Image/File/Video)。
  - name: message
    description: 消息操作 (撤销/react/update)。
  - name: call
    description: 通话管理 (拒绝来电)
  - name: chat
    description: 聊天对话和消息
  - name: group
    description: 组设置
  - name: newsletter
    description: 通讯设置
  - name: chatwoot
    description: 客户支持的聊天窗口集成
paths:
  /send/interactive:
    post:
      tags:
        - send
      summary: 发送实验性交互消息
      description: |
        仅立即发送本地流按钮、选择列表、
        位置请求和carousel。 不支持预定的发送或 MCP。
        使用非官方协议；API成功不能保证收件人
        渲染或交付。 只接受个人用户或群组收件人。
        提供按钮或卡片。 HTTP的整体身体限制也适用。
      operationId: sendInteractive
      parameters:
        - $ref: '#/components/parameters/DeviceIdHeader'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/InteractiveSendRequest'
            example:
              phone: '628123456789'
              body: Confirm your order?
              buttons:
                - name: quick_reply
                  params:
                    display_text: Confirm
                    id: confirm
      responses:
        '200':
          description: 接受发送；收件人渲染未验证
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SendResponse'
        '400':
          description: 无效的收件人、文本、按钮参数或图像限制
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorBadRequest'
        '500':
          description: 设备、媒体上传或 WhatsApp 发送失败
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorInternalServer'
components:
  parameters:
    DeviceIdHeader:
      name: X-Device-Id
      in: header
      required: false
      description: |
        多设备支持的设备标识符。 当多个设备被注册时需要.
        如果只有一个设备被注册，它将被用作默认。
        也可以以 `device_id` 查询参数提供。
      schema:
        type: string
        example: my-device-id
  schemas:
    InteractiveSendRequest:
      type: object
      required:
        - phone
        - body
      properties:
        phone:
          type: string
          description: 电话号码或完整的个人用户或组 JID。
        body:
          type: string
          description: 所需的非空白文本，最多4096字节。
        footer:
          type: string
          description: 最大 256 字节。
        buttons:
          type: array
          minItems: 1
          maxItems: 10
          items:
            $ref: '#/components/schemas/InteractiveNativeFlowButton'
        cards:
          type: array
          minItems: 2
          maxItems: 10
          items:
            $ref: '#/components/schemas/InteractiveCarouselCard'
      oneOf:
        - required:
            - buttons
          not:
            required:
              - cards
        - required:
            - cards
          not:
            required:
              - buttons
    SendResponse:
      type: object
      properties:
        code:
          type: string
          example: SUCCESS
        message:
          type: string
          example: Success
        results:
          type: object
          properties:
            message_id:
              type: string
              example: 3EB0B430B6F8F1D0E053AC120E0A9E5C
              description: 预定的发送
            status:
              type: string
              example: <feature> success ....
            schedule_id:
              type: string
              example: 0b5c3a8e-7f5d-4d6f-9d1e-2f8c1a7b9e10
              description: 仅计划发送。 使用 /send/schedules 路由。
            scheduled_at:
              type: string
              format: date-time
              example: '2026-10-01T02:00:00Z'
              description: 仅计划发送。 第一次发送时间。
            next_run_at:
              type: string
              format: date-time
              example: '2026-10-01T02:00:00Z'
              description: 仅计划发送。 当工人接下来发送时。
    ErrorBadRequest:
      type: object
      properties:
        code:
          type: string
          example: 400
          description: HTTP 状态代码
        message:
          type: string
          example: field cannot be blank
          description: 详细错误消息
        results:
          type: object
          example: null
          description: 附加数据
    ErrorInternalServer:
      type: object
      properties:
        code:
          type: string
          example: INTERNAL_SERVER_ERROR
          description: SYSTEM_CODE_ERROR
        message:
          type: string
          example: you are not loggin
          description: 详细错误消息
        results:
          type: object
          example: null
          description: 附加数据
    InteractiveNativeFlowButton:
      type: object
      required:
        - name
        - params
      properties:
        name:
          type: string
          enum:
            - quick_reply
            - cta_url
            - cta_copy
            - cta_call
            - single_select
            - send_location
        params:
          type: object
          additionalProperties: true
          description: |
            最大 16384 JSON 字节。 quick_replay_replay_text 和 id;
            cta_url 需要显示文字和一个绝对的 HTTP(S) url;
            cta_copy 需要 display_text and copy_code ;
            cta_calling 需要 display_text 和 phone_number 。
            single_selected requires title and non-smount clusion, one with
            non-live rows which ides and title are non-both 字符串。
            send_location 接受了像{} 这样的对象，必须是非旋转消息中的唯一的
            按钮。 所有命名的文本参数必须为
            非空字符串。
    InteractiveCarouselCard:
      type: object
      required:
        - body
        - buttons
      properties:
        title:
          type: string
          description: 最大 256 字节。
        body:
          type: string
          description: 所需的非空白文本，最多4096字节。
        footer:
          type: string
          description: 最大 256 字节。
        image_base64:
          type: string
          description: |
            可选的原始标准基准64 JPEG 或 PNG, 没有数据 URL 前缀。
            编码后最多 2800000 个字符，解码后最多 2000000 字节，同时
            还受已配置的图片大小限制约束。 每侧最多4096像素。
            重排，JPEG编码，缩略图，并在发送前上传。
        buttons:
          type: array
          minItems: 1
          maxItems: 10
          items:
            $ref: '#/components/schemas/InteractiveNativeFlowButton'
  securitySchemes:
    basicAuth:
      type: http
      scheme: basic

````

## Related topics

- [实验性交互消息](https://gowa-docs.mintlify.site/zh/examples/interactive-messages.md)
- [正在发送消息](https://gowa-docs.mintlify.site/zh/examples/sending-messages.md)
- [GOWA: WhatsApp REST API](https://gowa-docs.mintlify.site/zh/index.md)
- [预定发送](https://gowa-docs.mintlify.site/zh/examples/scheduled-sends.md)
- [发送消息](https://gowa-docs.mintlify.site/zh/api-reference/send/发送消息.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.