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

# 发送模板消息

> WTO WA API 接口参考：发送模板消息。

# 发送模板消息

> Send WhatsApp Business template message

## OpenAPI

```yaml /api-reference/openapi/WTO-WA-API/message.yaml post /message/sendTemplate/{instanceName} theme={null}
openapi: 3.0.4
info:
  title: WTO - WTO WA API - Message
  description: Main WTO WA API for WhatsApp
  version: 2.3.7
servers:
  - url: http://localhost:8080
    description: Local development server
  - url: https://api.wtocrm.com
    description: Production server
  - url: '{customUrl}'
    description: Custom server
    variables:
      customUrl:
        default: https://your-instance.com
        description: Enter your server URL
security:
  - ApiKeyAuth: []
paths:
  /message/sendTemplate/{instanceName}:
    post:
      summary: Send Template Message
      description: Send WhatsApp Business template message
      parameters:
        - $ref: '#/components/parameters/InstanceName'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SendTemplate'
      responses:
        '201':
          description: Template sent
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MessageResponse'
components:
  parameters:
    InstanceName:
      name: instanceName
      in: path
      required: true
      description: WhatsApp instance name
      schema:
        type: string
        example: my-instance
  schemas:
    SendTemplate:
      type: object
      required:
        - number
        - textMessage
      properties:
        number:
          type: string
        textMessage:
          type: object
          required:
            - text
          properties:
            text:
              type: string
        delay:
          type: integer
    MessageResponse:
      type: object
      properties:
        key:
          type: object
        message:
          type: object
        status:
          type: string
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: apikey
      description: API Key for authentication (global or instance-specific)

```
