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

# Queue template send job



## OpenAPI

````yaml /api-reference/openapi.json post /v1/templates/send
openapi: 3.0.0
info:
  title: Flowella REST API
  version: 2.1.0
  description: >-
    Public v1 HTTP API for Flowella. Authenticate with `Authorization: Bearer
    <api_key>` (`flo_` prefix). Canonical base: `https://api.flowella.io/v1`.
    Legacy `https://app.flowella.io/api/v1/...` requests are permanently
    redirected (308) to the canonical host, preserving method and body.
servers:
  - url: https://api.flowella.io
    description: Canonical API host
  - url: https://app.flowella.io
    description: Legacy app host — /api/v1 permanently redirects (308) to the API host /v1
security: []
tags:
  - name: System
    description: Health and auth checks
  - name: Messages
    description: Send WhatsApp messages
  - name: Conversations
    description: Inbox conversations
  - name: Contacts
    description: CRM contacts
  - name: Templates
    description: WhatsApp templates and bulk send
  - name: Analytics
    description: Usage and delivery metrics
paths:
  /v1/templates/send:
    post:
      tags:
        - Templates
      summary: Queue template send job
      operationId: v1SendTemplatesBulk
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                templateId:
                  type: string
                  minLength: 1
                  maxLength: 128
                templateWabaId:
                  type: string
                  minLength: 1
                whatsappChannelId:
                  type: string
                  format: cuid
                headerMedia:
                  type: object
                  properties:
                    url:
                      type: string
                      minLength: 1
                      maxLength: 4000
                      format: uri
                    fileName:
                      type: string
                      minLength: 1
                      maxLength: 240
                  required:
                    - url
                recipients:
                  type: array
                  items:
                    type: object
                    properties:
                      phone:
                        type: string
                        minLength: 3
                        maxLength: 32
                      contactId:
                        type: string
                        nullable: true
                        format: cuid
                      bodyParameters:
                        type: array
                        items:
                          type: string
                          minLength: 1
                        maxItems: 20
                      buttonParameters:
                        type: array
                        items:
                          oneOf:
                            - type: object
                              properties:
                                index:
                                  type: integer
                                  nullable: true
                                  minimum: 0
                                  maximum: 9
                                subType:
                                  type: string
                                  enum:
                                    - url
                                text:
                                  type: string
                                  minLength: 1
                                  maxLength: 2000
                              required:
                                - index
                                - subType
                                - text
                            - type: object
                              properties:
                                index:
                                  type: integer
                                  nullable: true
                                  minimum: 0
                                  maximum: 9
                                subType:
                                  type: string
                                  enum:
                                    - flow
                                flowToken:
                                  type: string
                                  minLength: 1
                                  maxLength: 256
                                flowActionData:
                                  type: object
                                  additionalProperties:
                                    nullable: true
                              required:
                                - index
                                - subType
                                - flowToken
                            - type: object
                              properties:
                                index:
                                  type: integer
                                  nullable: true
                                  minimum: 0
                                  maximum: 9
                                subType:
                                  type: string
                                  enum:
                                    - copy_code
                                couponCode:
                                  type: string
                                  minLength: 1
                                  maxLength: 20
                                  pattern: ^[a-zA-Z0-9]+$
                              required:
                                - index
                                - subType
                                - couponCode
                        maxItems: 20
                    required:
                      - phone
                  minItems: 1
                  maxItems: 50000
                scheduledAt:
                  type: string
                  nullable: true
                throttlePerHour:
                  type: integer
                  minimum: 1
                  maximum: 100000
              required:
                - templateId
                - whatsappChannelId
                - recipients
              example:
                templateId: clxxxxxxxxxxxxxxxxxxxxxxxx
                whatsappChannelId: clxxxxxxxxxxxxxxxxxxxxxxxx
                recipients:
                  - phone: '+15551234567'
                    bodyParameters:
                      - Ada
      responses:
        '200':
          description: Job created
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                  status:
                    type: string
                    enum:
                      - PENDING
                      - PROCESSING
                      - COMPLETED
                      - FAILED
                  templateId:
                    type: string
                    nullable: true
                  scheduledFor:
                    type: string
                    nullable: true
                required:
                  - id
                  - status
                  - templateId
                  - scheduledFor
                example:
                  id: clxxxxxxxxxxxxxxxxxxxxxxxx
                  status: PENDING
                  templateId: clxxxxxxxxxxxxxxxxxxxxxxxx
                  scheduledFor: null
        '400':
          description: Bad body
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                    required:
                      - code
                      - message
                required:
                  - error
                example:
                  error:
                    code: UNAUTHORIZED
                    message: Invalid API key
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                    required:
                      - code
                      - message
                required:
                  - error
                example:
                  error:
                    code: UNAUTHORIZED
                    message: Invalid API key
        '402':
          description: Payment required
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                    required:
                      - code
                      - message
                required:
                  - error
                example:
                  error:
                    code: UNAUTHORIZED
                    message: Invalid API key
        '429':
          description: Rate limited
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                    required:
                      - code
                      - message
                required:
                  - error
                example:
                  error:
                    code: UNAUTHORIZED
                    message: Invalid API key
      security:
        - bearerAuth: []
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API key
      description: >-
        Organization API key (`flo_…`). Paste the full key; Scalar sends
        `Authorization: Bearer <key>`.

````