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

# Send Messages To Contacts

> To send messages to a list of contacts in bulk
- **widget_id**: Widget ID to be used for sending the message. It must be connected to WhatsApp or SMS.
- **contact_ids**: list of contact IDs to whom the message is to be sent.
- **message**: text message to be sent.
- **start_new_conversation**: whether to start a new conversation or pick the latest.



## OpenAPI

````yaml https://api.insighto.ai/api/v1/openapi.json post /api/v1/messaging/{widget_id}/contacts
openapi: 3.1.0
info:
  title: Ragify
  version: v1
servers: []
security: []
paths:
  /api/v1/messaging/{widget_id}/contacts:
    post:
      tags:
        - Messaging
      summary: Send Messages To Contacts
      description: >-
        To send messages to a list of contacts in bulk

        - **widget_id**: Widget ID to be used for sending the message. It must
        be connected to WhatsApp or SMS.

        - **contact_ids**: list of contact IDs to whom the message is to be
        sent.

        - **message**: text message to be sent.

        - **start_new_conversation**: whether to start a new conversation or
        pick the latest.
      operationId: send_messages_to_contacts_api_v1_messaging__widget_id__contacts_post
      parameters:
        - name: widget_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Widget Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CampaignMetadata'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - Your API Key: []
        - HTTPBearer: []
components:
  schemas:
    CampaignMetadata:
      properties:
        contact_ids:
          items:
            type: string
            format: uuid
          type: array
          minItems: 1
          title: Recipient contact IDs
          description: List of UUIDs that identify the contacts to receive the campaign.
          example:
            - a3ae8c0f-2e9d-4c18-8c0e-d510e3cacb04
            - 8a849d72-93cf-4e6c-b1a3-6c10d4c65f1d
        message:
          anyOf:
            - type: string
            - type: 'null'
          title: Message body
          description: >-
            (Only for Chat based assistants, ignored for calling) Message to be
            sent
          example: Hi Adam, check out our new offer!
        start_new_conversation:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Force new conversation
          description: >-
            (Always True for calling campaigns) Start a brand‑new thread instead
            of replying in the existing one.
          default: false
          example: true
      type: object
      required:
        - contact_ids
      title: CampaignMetadata
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    Your API Key:
      type: apiKey
      description: >-
        Your API key for authentication. You can generate it from the
        **Settings** page. Format: starts with `in-`.
      in: query
      name: api_key
    HTTPBearer:
      type: http
      scheme: bearer

````