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

# Send a message

> Send any supported WhatsApp message type. Set `send_at` to schedule instead of sending now, which returns `202` with a scheduled message id.

`type` defaults to `text`. Address the recipient with `to`, or with `recipient.type`/`recipient.value` to send to a BSUID.

**Required scope:** `messages:send`



## OpenAPI

````yaml /api-reference/openapi.json post /v1/messages
openapi: 3.1.0
info:
  title: LazyApp API
  version: v1
  description: >-
    One WhatsApp API for developers, SaaS platforms and businesses.


    Every endpoint is Bearer-authenticated with a LazyApp API key, returns JSON,
    and is scoped to the workspace and mode (`live` or `test`) the key belongs
    to.


    Live keys need the Pro plan. A live key on a workspace below Pro gets `402`
    with `code: plan_limit_reached` on every request. Test keys work on every
    plan, so you can build against the test number before you upgrade.


    LazyApp adds 0% to Meta's message rates. Meta bills each message to the
    business's own Meta payment method; your LazyApp plan is billed separately.
  contact:
    name: LazyApp support
    url: https://lazyapp.in
servers:
  - url: https://lazyapp.in
    description: Production
security:
  - bearerAuth: []
tags:
  - name: Messages
    description: Send and schedule WhatsApp messages.
  - name: Contacts
    description: The people you message, and their identifiers.
  - name: Conversations
    description: Threads and their message history.
  - name: Calls
    description: WhatsApp call history for the workspace.
  - name: Templates
    description: Create, submit and sync message templates.
  - name: Media
    description: Upload, retrieve and delete media.
  - name: Broadcasts
    description: Template sends to many contacts at once.
  - name: Events
    description: Say what happened; LazyApp picks the template.
  - name: Flows
    description: WhatsApp Flows and their responses.
  - name: Webhooks
    description: Register endpoints and inspect deliveries.
  - name: Workflows
    description: Automations and their executions.
  - name: Verify
    description: One-time passcodes over WhatsApp.
  - name: Capabilities
    description: What each connected number supports.
  - name: Catalog
    description: Proxy Meta Commerce catalog products for a connection.
  - name: Platform
    description: Manage customers if you run a platform on LazyApp.
  - name: Meta-compatible proxy
    description: Drop-in endpoints for existing Cloud API integrations.
  - name: Connections
    description: >-
      Your WhatsApp numbers and the account behind them: health, limits,
      registration, display name, blue tick, QR codes, conversation starters,
      opt-in links, business profile and blocked users.
  - name: Billing
    description: >-
      Meta's message rates, which LazyApp passes on with 0% added, and the
      billing facts behind them.
  - name: Analytics
    description: Workspace messaging aggregates.
  - name: Groups
    description: WhatsApp group chats on a connection Meta has enabled.
  - name: Funding
    description: Local funding status and recorded WhatsApp charges.
  - name: Connections
    description: 'WhatsApp connections: block users, business profile, insights.'
  - name: Payments
    description: >-
      WhatsApp payments in India: ask for payment, follow it, update the order
      and refund.
paths:
  /v1/messages:
    post:
      tags:
        - Messages
      summary: Send a message
      description: >-
        Send any supported WhatsApp message type. Set `send_at` to schedule
        instead of sending now, which returns `202` with a scheduled message id.


        `type` defaults to `text`. Address the recipient with `to`, or with
        `recipient.type`/`recipient.value` to send to a BSUID.


        **Required scope:** `messages:send`
      parameters:
        - name: Idempotency-Key
          in: header
          description: >-
            Optional. Makes this write safe to retry: the same key replays the
            first response instead of acting twice.
          schema:
            type: string
            maxLength: 255
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                type:
                  type: string
                  enum:
                    - text
                    - template
                    - image
                    - document
                    - audio
                    - video
                    - sticker
                    - location
                    - contacts
                    - interactive
                    - reaction
                  description: Defaults to `text`.
                to:
                  type: string
                  maxLength: 32
                  description: E.164 phone number, e.g. `+919812345670`.
                recipient:
                  $ref: '#/components/schemas/Recipient'
                send_at:
                  type: string
                  format: date-time
                  nullable: true
                  description: Schedule for later. Must be in the future.
                ttl_seconds:
                  type: integer
                  minimum: 60
                  maximum: 2592000
                  description: Drop the message if it cannot be sent within this window.
                body:
                  type: string
                  maxLength: 4096
                  description: Text body, or media caption fallback.
                context:
                  type: object
                  properties:
                    message_id:
                      type: string
                      maxLength: 128
                template:
                  type: object
                  properties:
                    name:
                      type: string
                      maxLength: 128
                    language:
                      type: string
                      maxLength: 16
                    components:
                      type: array
                      items:
                        type: object
                        properties: {}
                    category:
                      type: string
                      maxLength: 32
                    features:
                      type: object
                      description: >-
                        Extra inputs a template needs at send time; the
                        template's `send_features` lists which. LazyApp builds
                        the matching components. See Template formats.
                      properties:
                        cards:
                          type: array
                          maxItems: 10
                          description: >-
                            Carousel templates: one entry per card, in card
                            order. A media carousel takes exactly as many cards
                            as it was approved with; a product carousel 1 to 10.
                          items:
                            type: object
                            properties:
                              header_media:
                                type: string
                                description: >-
                                  Media cards: public link or uploaded media id
                                  for the card image or video.
                              product_retailer_id:
                                type: string
                                description: >-
                                  Product cards: the product's Content ID in
                                  Commerce Manager.
                              catalog_id:
                                type: string
                                description: >-
                                  Product cards: catalog id. Defaults to the
                                  number's catalog.
                              body:
                                oneOf:
                                  - type: array
                                    items:
                                      type: string
                                  - type: object
                                    additionalProperties:
                                      type: string
                                description: >-
                                  Values for the variables in this card's text:
                                  in order, or keyed by name on named templates.
                              buttons:
                                type: object
                                additionalProperties:
                                  type: string
                                description: >-
                                  Keyed by button index: the ending of a URL
                                  button's link.
                              quick_replies:
                                type: object
                                additionalProperties:
                                  type: string
                                description: >-
                                  Keyed by button index: an optional payload for
                                  a quick-reply button, returned on the reply
                                  webhook.
                        voice_call:
                          type: object
                          description: Call on WhatsApp buttons.
                          properties:
                            ttl_minutes:
                              type: integer
                              minimum: 1
                              maximum: 43200
                            payload:
                              type: string
                        tap_target:
                          type: object
                          description: Tappable title override.
                          properties:
                            url:
                              type: string
                            title:
                              type: string
                        location:
                          type: object
                          description: Location-header templates.
                          properties:
                            latitude:
                              type: string
                            longitude:
                              type: string
                            name:
                              type: string
                            address:
                              type: string
                        coupon_code:
                          type: string
                        offer_expires_at:
                          type: string
                          description: Limited-time offer expiry.
                        product_retailer_id:
                          type: string
                          description: Single-product templates.
                        thumbnail_product_retailer_id:
                          type: string
                          description: >-
                            Catalog templates: the product shown as the
                            thumbnail.
                        catalog_id:
                          type: string
                        sections:
                          type: array
                          description: >-
                            Multi-product templates: up to 10 sections and 30
                            products.
                          items:
                            type: object
                            properties:
                              title:
                                type: string
                              product_retailer_ids:
                                type: array
                                items:
                                  type: string
                    carousel:
                      type: array
                      maxItems: 10
                      description: >-
                        Older alias for `features.cards`, still accepted: one
                        entry per card, in order, with `media`, `body` and
                        `buttons` (link endings and quick-reply payloads alike).
                        Ignored when `features.cards` is sent.
                      items:
                        type: object
                        required:
                          - media
                        properties:
                          media:
                            type: string
                            description: >-
                              Public link or uploaded media id for the card
                              image or video.
                          body:
                            type: array
                            items:
                              type: string
                            description: Values for the card text's variables, in order.
                          buttons:
                            type: object
                            additionalProperties:
                              type: string
                            description: >-
                              Keyed by button index: URL ending, or quick-reply
                              payload.
                      deprecated: true
                    message_activity_sharing:
                      type: boolean
                      description: >-
                        Marketing: let Meta use this message's activity (read,
                        click) to improve delivery. Omit to use your account
                        default.
                    max_price_multiplier:
                      type: number
                      exclusiveMinimum: 0
                      maximum: 100
                      description: >-
                        Marketing: multiply the template's max price for this
                        one message.
                media_id:
                  type: string
                  maxLength: 128
                  description: A previously uploaded media id.
                media_url:
                  type: string
                  maxLength: 2048
                  description: Public URL LazyApp fetches and uploads.
                caption:
                  type: string
                  maxLength: 1024
                filename:
                  type: string
                  maxLength: 255
                latitude:
                  type: number
                  minimum: -90
                  maximum: 90
                longitude:
                  type: number
                  minimum: -180
                  maximum: 180
                name:
                  type: string
                  maxLength: 255
                  description: Location name.
                address:
                  type: string
                  maxLength: 1024
                contacts:
                  type: array
                  minItems: 1
                  maxItems: 5
                  items:
                    type: object
                    properties: {}
                interactive:
                  type: object
                  properties: {}
                  description: >-
                    WhatsApp's interactive object: `button`, `list`, `cta_url`,
                    `location_request_message`, `carousel`, `address_message`
                    (India only), `flow`, catalog and payment types. Button,
                    list, link, location, carousel and address messages are
                    checked against Meta's limits before sending. See the
                    Interactive messages guide.
                reaction:
                  type: object
                  properties:
                    message_id:
                      type: string
                      maxLength: 256
                    emoji:
                      type: string
                      maxLength: 32
                idempotency_key:
                  type: string
                  maxLength: 128
                  description: Legacy body-level dedupe. Prefer the Idempotency-Key header.
                phone_number_id:
                  type: string
                  maxLength: 64
                  description: Send from a specific number.
                connection_uuid:
                  type: string
                  format: uuid
                metadata:
                  type: object
                  maxProperties: 20
                  additionalProperties:
                    type: string
                    maxLength: 512
                preview_url:
                  type: boolean
                  description: >-
                    Text only. Ask WhatsApp to show a preview of the first link
                    in `body`.
                recipient_identity_key_hash:
                  type: string
                  maxLength: 128
                  description: >-
                    Identity change check: deliver only if the contact's
                    identity hash still matches. Defaults to the hash LazyApp
                    stored.
      responses:
        '201':
          description: Message accepted and sent.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Message'
        '202':
          description: Scheduled for later delivery.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ScheduledAccepted'
        '401':
          description: Missing or invalid API key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '402':
          description: >-
            Payment required. Branch on `code`:


            - `plan_limit_reached`: a live key on a workspace below Pro. Test
            keys never get this.

            - `insufficient_credits`: the workspace's monthly spending limit is
            reached, or the number is one LazyApp pays Meta for and its credit
            cannot cover a send Meta charges for.

            - `service_credits_exhausted`: the number is one LazyApp pays Meta
            for, and service replies are paused until credit is added.


            On a number you fund yourself, Meta bills your own Meta payment
            method and LazyApp adds nothing, so only `plan_limit_reached` and
            the spending limit apply.


            Without a `code`, sending is refused because the workspace or
            platform customer is suspended or paused, a platform customer
            reached its spending limit, or a prepaid platform customer's balance
            is used up.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: >-
            The key lacks the required scope, or is restricted from this phone
            number.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '422':
          description: >-
            Validation failed, or the send was refused. Refusals include a
            stable `code` — `customer_service_window_closed`,
            `contact_suppressed`, `marketing_opt_out`, or `no_connection`.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationError'
        '429':
          description: Rate limit exceeded.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    Recipient:
      type: object
      properties:
        type:
          type: string
          enum:
            - phone_number
            - bsuid
          description: Defaults to `phone_number`.
        value:
          type: string
          maxLength: 128
    Message:
      type: object
      properties:
        uuid:
          type: string
          description: LazyApp's stable id for the message.
        request_id:
          type: string
          nullable: true
          description: Correlation id, echoed as X-Request-Id.
        status:
          type: string
          enum:
            - queued
            - sent
            - delivered
            - read
            - played
            - failed
        acceptance_status:
          type: string
          nullable: true
        type:
          type: string
          enum:
            - text
            - template
            - image
            - document
            - audio
            - video
            - sticker
            - location
            - contacts
            - interactive
            - reaction
        provider_message_id:
          type: string
          nullable: true
          description: Meta's `wamid`.
        error_message:
          type: string
          nullable: true
          description: Set only when `status` is `failed`.
    ScheduledAccepted:
      type: object
      properties:
        id:
          type: string
        status:
          type: string
        send_at:
          type: string
          format: date-time
          nullable: true
        expires_at:
          type: string
          format: date-time
          nullable: true
    Error:
      type: object
      properties:
        message:
          type: string
          description: Human-readable description of what went wrong.
        code:
          type: string
          description: >-
            Stable machine-readable reason, when the failure is one a client can
            branch on.
      required:
        - message
    ValidationError:
      type: object
      properties:
        message:
          type: string
        errors:
          type: object
          additionalProperties:
            type: array
            items:
              type: string
          description: Field name to list of failures.
      required:
        - message
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Your API key, e.g. `sk_live_...` or `sk_test_...`.

````

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