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

# Send Instant Message

> Send an instant message to one or multiple recipients.

Headers:
    X-API-Key: Required - Your API key for authentication
    X-App-ID: Optional - Your developer app ID for webhook notifications



## OpenAPI

````yaml /openapi.json post /v1/message/send-instant
openapi: 3.1.0
info:
  title: Briq API
  description: Karibu Briq API Documentation
  version: '0.8'
servers:
  - url: https://karibu.briq.tz
    description: Production
  - url: https://pre-release.karibu.briq.tz
    description: Pre-release
  - url: http://karibu.briq.tz
    description: LocalPass
security: []
paths:
  /v1/message/send-instant:
    post:
      tags:
        - Karibu-Messages
      summary: Send Instant Message
      description: |-
        Send an instant message to one or multiple recipients.

        Headers:
            X-API-Key: Required - Your API key for authentication
            X-App-ID: Optional - Your developer app ID for webhook notifications
      operationId: send_instant_message_v1_message_send_instant_post
      parameters:
        - name: X-API-Key
          in: header
          required: true
          schema:
            type: string
            title: X-Api-Key
        - name: X-App-ID
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: X-App-Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SendInstantMessageRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SendInstantMessageResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    SendInstantMessageRequest:
      properties:
        content:
          type: string
          title: Content
          examples:
            - Ping from Briq
        recipients:
          items:
            type: string
          type: array
          title: Recipients
          examples:
            - - '255788344348'
        sender_id:
          type: string
          title: Sender Id
        campaign_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Campaign Id
        groups:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Groups
          examples:
            - - group_id
              - group_id
        flash:
          type: boolean
          title: Flash
          default: false
        send_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Send At
          description: >-
            ISO 8601 format datetime with UTC timezone (e.g.,
            2025-12-11T15:30:00+00:00 or 2025-12-11T15:30:00Z)
      type: object
      required:
        - content
        - recipients
        - sender_id
      title: SendInstantMessageRequest
    SendInstantMessageResponse:
      properties:
        success:
          type: boolean
          title: Success
        job_id:
          type: string
          title: Job Id
          description: >-
            Identifier for this send job. Webhook payloads include the same
            value in data.job_id for submit-time SMS events when the message is
            tied to your developer app.
        status:
          type: string
          title: Status
          description: High-level pipeline status (e.g. sent when queued for delivery).
        message:
          type: string
          title: Message
          description: Human-readable summary of the result.
        stats:
          $ref: '#/components/schemas/SendInstantMessageStats'
        meta:
          $ref: '#/components/schemas/SendInstantMessageMeta'
      type: object
      required:
        - success
        - job_id
        - status
        - message
        - stats
        - meta
      title: SendInstantMessageResponse
      description: Response body for a successful instant message send.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    SendInstantMessageStats:
      properties:
        recipients:
          type: integer
          title: Recipients
        sms_parts:
          type: integer
          title: Sms Parts
        total_sms:
          type: integer
          title: Total Sms
        cost:
          type: integer
          title: Cost
      type: object
      title: SendInstantMessageStats
      description: Aggregated counts for the send request.
    SendInstantMessageMeta:
      properties:
        http_code:
          type: integer
          title: Http Code
        internal_code:
          type: string
          title: Internal Code
        description:
          type: string
          title: Description
      type: object
      title: SendInstantMessageMeta
      description: Response metadata (codes and description).
    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

````