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

# Send Message

> Send a text or image message to a WhatsApp user within the 24-hour customer service window.



## OpenAPI

````yaml POST /messages/send
openapi: 3.1.0
info:
  title: bitbybit Messaging API
  description: Send and manage WhatsApp messages through the bitbybit Open API.
  version: 1.0.0
  contact:
    name: bitbybit Support
    url: https://bitbybit.studio
servers:
  - url: https://api.bitbybit.studio/whatsapp/open/v1
    description: Production
security:
  - ApiKeyAuth: []
paths:
  /messages/send:
    post:
      tags:
        - Messages
      summary: Send a message
      description: >-
        Send a text or image message to a WhatsApp user within the 24-hour
        customer service window.
      operationId: sendMessage
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - to
                - message
                - sources
              properties:
                to:
                  type: string
                  description: >-
                    Destination phone number in WhatsApp format (e.g.,
                    628xxxxxxxxxx)
                  example: '6281234567890'
                message:
                  type: string
                  description: Message content to be sent
                  example: Hello! This is a sample message from WhatsApp API.
                imageUrl:
                  type: string
                  description: >-
                    Image URL — if provided, sends an image message instead of
                    text
                  example: https://example.com/image.jpg
                sources:
                  type: string
                  enum:
                    - whatsapp cloud api
                    - whatsapp coex
                  description: Messaging channel to use
                ignoreActiveTicket:
                  type: boolean
                  default: false
                  description: >-
                    If true, skip sending when the chat is actively handled by
                    an agent
                countryCode:
                  type: string
                  nullable: true
                  description: Country code for number formatting (e.g., ID, EN, IN)
                  example: ID
      responses:
        '200':
          description: Message sent successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      messageId2:
                        type: string
                        description: WhatsApp message ID
                      timestamp:
                        type: string
                        description: Message timestamp
        '400':
          $ref: '#/components/responses/ValidationError'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '429':
          $ref: '#/components/responses/RateLimited'
components:
  responses:
    ValidationError:
      description: Validation error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: VALIDATION_ERROR
              message: Invalid request body
    Unauthorized:
      description: Authentication failed
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: INVALID_API_KEY
              message: Invalid or expired API key
    Forbidden:
      description: Insufficient permissions
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: INSUFFICIENT_SCOPE
              message: API key does not have the required scope
    RateLimited:
      description: Rate limit exceeded
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: RATE_LIMIT_EXCEEDED
              message: Too many requests. Please retry after the reset period.
  schemas:
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
            message:
              type: string
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: API key for authentication. Create one in Settings > Developer.

````