> ## 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.

# Preview a template send

> Dry run a bulk template send. Returns recipient counts, approval status, tier and usage limits without sending anything.



## OpenAPI

````yaml /api-reference/openapi.json post /v1/templates/send/preview
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) or an OAuth access token (`fla_` 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: Account
    description: Credential and organisation details
  - 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/preview:
    post:
      tags:
        - Templates
      summary: Preview a template send
      description: >-
        Dry run for POST /v1/templates/send. Takes the same body, sends nothing,
        and reports recipient counts, the template's approval status, messaging
        tier headroom, US marketing restrictions, and plan usage limits. Run it
        before every bulk send and stop if ok is false.
      operationId: v1PreviewTemplateSend
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                templateId:
                  type: string
                  minLength: 1
                  maxLength: 128
                  description: >-
                    Template to send: a Flowella template id, or a numeric Meta
                    template id together with templateWabaId.
                templateWabaId:
                  type: string
                  minLength: 1
                  description: >-
                    WhatsApp Business Account id of the template. Required when
                    templateId is a Meta id.
                whatsappChannelId:
                  type: string
                  format: cuid
                  description: >-
                    WhatsApp channel id from GET /v1/channels. Omit to use the
                    default number where optional.
                headerMedia:
                  type: object
                  properties:
                    url:
                      type: string
                      minLength: 1
                      maxLength: 4000
                      format: uri
                    fileName:
                      type: string
                      minLength: 1
                      maxLength: 240
                  required:
                    - url
                  description: >-
                    Public URL of the image, video, or document for a media
                    header. Overrides the template's sample.
                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
                        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
                                  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
                  description: >-
                    Recipients, 1 to 50,000. Each has phone, optional contactId,
                    bodyParameters for {{1}}, {{2}}, ... and optional
                    buttonParameters.
                carouselCards:
                  type: array
                  items:
                    type: object
                    properties:
                      mediaUrl:
                        type: string
                        maxLength: 4000
                        format: uri
                      mediaId:
                        type: string
                        minLength: 1
                        maxLength: 256
                      bodyParameters:
                        type: array
                        items:
                          type: string
                          minLength: 1
                        maxItems: 20
                      buttonParameters:
                        type: array
                        items:
                          type: object
                          properties:
                            index:
                              type: integer
                              minimum: 0
                              maximum: 1
                            text:
                              type: string
                              minLength: 1
                              maxLength: 2000
                            payload:
                              type: string
                              minLength: 1
                              maxLength: 256
                          required:
                            - index
                        maxItems: 2
                  minItems: 2
                  maxItems: 10
                  description: >-
                    Carousel card media and parameters, one entry per card.
                    Shared by all recipients.
                scheduledAt:
                  type: string
                  nullable: true
                  description: ISO 8601 time to start sending. Omit to send now.
                throttlePerHour:
                  type: integer
                  minimum: 1
                  maximum: 100000
                  description: Maximum messages per hour. Omit for no throttle.
              required:
                - templateId
                - whatsappChannelId
                - recipients
              example:
                templateId: clxxxxxxxxxxxxxxxxxxxxxxxx
                whatsappChannelId: clxxxxxxxxxxxxxxxxxxxxxxxx
                recipients:
                  - phone: '+15551234567'
                    bodyParameters:
                      - Ada
                carouselCards:
                  - mediaUrl: https://cdn.example/card-1.jpg
                    buttonParameters:
                      - index: 1
                        text: summer
                  - mediaUrl: https://cdn.example/card-2.jpg
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  ok:
                    type: boolean
                    description: >-
                      False when a blocking problem means the send should not
                      run.
                  totalRecipients:
                    type: integer
                  uniqueRecipients:
                    type: integer
                  template:
                    type: object
                    properties:
                      name:
                        type: string
                      language:
                        type: string
                      category:
                        type: string
                        nullable: true
                      status:
                        type: string
                    required:
                      - name
                      - language
                      - category
                      - status
                  channel:
                    type: object
                    properties:
                      id:
                        type: string
                      messagingLimitTier:
                        type: string
                        nullable: true
                    required:
                      - id
                      - messagingLimitTier
                  blocking:
                    type: array
                    items:
                      type: object
                      properties:
                        code:
                          type: string
                        message:
                          type: string
                        count:
                          type: integer
                      required:
                        - code
                        - message
                  warnings:
                    type: array
                    items:
                      type: object
                      properties:
                        code:
                          type: string
                        message:
                          type: string
                        count:
                          type: integer
                      required:
                        - code
                        - message
                required:
                  - ok
                  - totalRecipients
                  - uniqueRecipients
                  - template
                  - channel
                  - blocking
                  - warnings
                example:
                  ok: true
                  totalRecipients: 120
                  uniqueRecipients: 118
                  template:
                    name: order_update
                    language: en_US
                    category: UTILITY
                    status: APPROVED
                  channel:
                    id: clxxxxxxxxxxxxxxxxxxxxxxxx
                    messagingLimitTier: TIER_1K
                  blocking: []
                  warnings: []
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                      requestId:
                        type: string
                      details:
                        nullable: true
                    required:
                      - code
                      - message
                required:
                  - error
                description: >-
                  Machine codes include INVALID_TEMPLATE_NAME and
                  INVALID_TEMPLATE_COMPONENTS. requestId is copied from
                  X-Request-Id when present.
                example:
                  error:
                    code: INVALID_TEMPLATE_COMPONENTS
                    message: INVALID_TEMPLATE_COMPONENTS
                    requestId: req_019abc
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                      requestId:
                        type: string
                      details:
                        nullable: true
                    required:
                      - code
                      - message
                required:
                  - error
                description: >-
                  Machine codes include INVALID_TEMPLATE_NAME and
                  INVALID_TEMPLATE_COMPONENTS. requestId is copied from
                  X-Request-Id when present.
                example:
                  error:
                    code: INVALID_TEMPLATE_COMPONENTS
                    message: INVALID_TEMPLATE_COMPONENTS
                    requestId: req_019abc
        '404':
          description: Template or channel not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                      requestId:
                        type: string
                      details:
                        nullable: true
                    required:
                      - code
                      - message
                required:
                  - error
                description: >-
                  Machine codes include INVALID_TEMPLATE_NAME and
                  INVALID_TEMPLATE_COMPONENTS. requestId is copied from
                  X-Request-Id when present.
                example:
                  error:
                    code: INVALID_TEMPLATE_COMPONENTS
                    message: INVALID_TEMPLATE_COMPONENTS
                    requestId: req_019abc
      security:
        - bearerAuth: []
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API key
      description: >-
        Organization API key (`flo_…`) or OAuth access token (`fla_…`). Paste
        the full token; Scalar sends `Authorization: Bearer <token>`.

````

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