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

# Send a message

> Queues WhatsApp text or an approved template, or an email reply with ticket_id. Requires whatsapp:send + Chat or email:send + Desk. Email uses the ticket's configured Gmail/SMTP sender and requester; omit to. SMS and attachments are not supported. Idempotent retries return the original acceptance with the same message ID. Check `GET /api/v1/messages/{id}` for current status.



## OpenAPI

````yaml /openapi.json post /api/v1/messages
openapi: 3.0.1
info:
  title: Cconnect Customer API
  description: >-
    Company-scoped REST API for Cconnect Desk and Chat. Bearer credentials are
    issued by your company administrator. Public documentation does not grant
    data access. Operations require CustomerApi:Enabled on the API deployment.
  contact:
    name: Cconnect
    url: https://cconnect.online
  version: 1.1.0
servers:
  - url: https://cconnect.online
    description: Cconnect API server (separate from developers.cconnect.online)
security:
  - CustomerBearer: []
externalDocs:
  description: Cconnect developer portal
  url: https://developers.cconnect.online
paths:
  /api/v1/messages:
    post:
      tags:
        - Messaging
      summary: Send a message
      description: >-
        Queues WhatsApp text or an approved template, or an email reply with
        ticket_id. Requires whatsapp:send + Chat or email:send + Desk. Email
        uses the ticket's configured Gmail/SMTP sender and requester; omit to.
        SMS and attachments are not supported. Idempotent retries return the
        original acceptance with the same message ID. Check `GET
        /api/v1/messages/{id}` for current status.
      operationId: SendMessage
      parameters:
        - name: Idempotency-Key
          in: header
          description: >-
            Unique per operation and company, 1–128 visible ASCII characters.
            Identical retries return the original 202 acceptance and message ID.
            Changed requests return 409. Retained for the company lifetime.
            Check the message resource for current status.
          required: true
          schema:
            maxLength: 128
            minLength: 1
            type: string
          example: crm-reply-1042
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ApiSendMessageRequest'
            example:
              channel: whatsapp
              channel_id: YOUR_WHATSAPP_CHANNEL_ID
              to: '+628123456789'
              text: Your support request is being reviewed.
        required: true
      responses:
        '202':
          description: Accepted
          headers:
            Location:
              description: Message status resource.
              schema:
                type: string
            Idempotency-Replayed:
              description: true for an identical retry.
              schema:
                type: boolean
            X-Request-Id:
              description: Support correlation ID.
              schema:
                type: string
            X-RateLimit-Limit:
              description: >-
                Company quota metadata (reset is Unix seconds). Present after
                bearer authentication and company subscription validation.
              schema:
                type: integer
                format: int64
            X-RateLimit-Remaining:
              description: >-
                Company quota metadata (reset is Unix seconds). Present after
                bearer authentication and company subscription validation.
              schema:
                type: integer
                format: int64
            X-RateLimit-Reset:
              description: >-
                Company quota metadata (reset is Unix seconds). Present after
                bearer authentication and company subscription validation.
              schema:
                type: integer
                format: int64
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiOutboundMessageApiData'
        '400':
          description: Bad Request
          headers:
            X-Request-Id:
              description: Support correlation ID.
              schema:
                type: string
            X-RateLimit-Limit:
              description: >-
                Company quota metadata (reset is Unix seconds). Present after
                bearer authentication and company subscription validation.
              schema:
                type: integer
                format: int64
            X-RateLimit-Remaining:
              description: >-
                Company quota metadata (reset is Unix seconds). Present after
                bearer authentication and company subscription validation.
              schema:
                type: integer
                format: int64
            X-RateLimit-Reset:
              description: >-
                Company quota metadata (reset is Unix seconds). Present after
                bearer authentication and company subscription validation.
              schema:
                type: integer
                format: int64
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
        '401':
          description: Unauthorized
          headers:
            X-Request-Id:
              description: Support correlation ID.
              schema:
                type: string
            X-RateLimit-Limit:
              description: >-
                Company quota metadata (reset is Unix seconds). Present after
                bearer authentication and company subscription validation.
              schema:
                type: integer
                format: int64
            X-RateLimit-Remaining:
              description: >-
                Company quota metadata (reset is Unix seconds). Present after
                bearer authentication and company subscription validation.
              schema:
                type: integer
                format: int64
            X-RateLimit-Reset:
              description: >-
                Company quota metadata (reset is Unix seconds). Present after
                bearer authentication and company subscription validation.
              schema:
                type: integer
                format: int64
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
        '403':
          description: Forbidden
          headers:
            X-Request-Id:
              description: Support correlation ID.
              schema:
                type: string
            X-RateLimit-Limit:
              description: >-
                Company quota metadata (reset is Unix seconds). Present after
                bearer authentication and company subscription validation.
              schema:
                type: integer
                format: int64
            X-RateLimit-Remaining:
              description: >-
                Company quota metadata (reset is Unix seconds). Present after
                bearer authentication and company subscription validation.
              schema:
                type: integer
                format: int64
            X-RateLimit-Reset:
              description: >-
                Company quota metadata (reset is Unix seconds). Present after
                bearer authentication and company subscription validation.
              schema:
                type: integer
                format: int64
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
        '404':
          description: Not Found
          headers:
            X-Request-Id:
              description: Support correlation ID.
              schema:
                type: string
            X-RateLimit-Limit:
              description: >-
                Company quota metadata (reset is Unix seconds). Present after
                bearer authentication and company subscription validation.
              schema:
                type: integer
                format: int64
            X-RateLimit-Remaining:
              description: >-
                Company quota metadata (reset is Unix seconds). Present after
                bearer authentication and company subscription validation.
              schema:
                type: integer
                format: int64
            X-RateLimit-Reset:
              description: >-
                Company quota metadata (reset is Unix seconds). Present after
                bearer authentication and company subscription validation.
              schema:
                type: integer
                format: int64
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
        '409':
          description: Conflict
          headers:
            X-Request-Id:
              description: Support correlation ID.
              schema:
                type: string
            X-RateLimit-Limit:
              description: >-
                Company quota metadata (reset is Unix seconds). Present after
                bearer authentication and company subscription validation.
              schema:
                type: integer
                format: int64
            X-RateLimit-Remaining:
              description: >-
                Company quota metadata (reset is Unix seconds). Present after
                bearer authentication and company subscription validation.
              schema:
                type: integer
                format: int64
            X-RateLimit-Reset:
              description: >-
                Company quota metadata (reset is Unix seconds). Present after
                bearer authentication and company subscription validation.
              schema:
                type: integer
                format: int64
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
        '413':
          description: Content Too Large
          headers:
            X-Request-Id:
              description: Support correlation ID.
              schema:
                type: string
            X-RateLimit-Limit:
              description: >-
                Company quota metadata (reset is Unix seconds). Present after
                bearer authentication and company subscription validation.
              schema:
                type: integer
                format: int64
            X-RateLimit-Remaining:
              description: >-
                Company quota metadata (reset is Unix seconds). Present after
                bearer authentication and company subscription validation.
              schema:
                type: integer
                format: int64
            X-RateLimit-Reset:
              description: >-
                Company quota metadata (reset is Unix seconds). Present after
                bearer authentication and company subscription validation.
              schema:
                type: integer
                format: int64
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
        '415':
          description: Unsupported Media Type
          headers:
            X-Request-Id:
              description: Support correlation ID.
              schema:
                type: string
            X-RateLimit-Limit:
              description: >-
                Company quota metadata (reset is Unix seconds). Present after
                bearer authentication and company subscription validation.
              schema:
                type: integer
                format: int64
            X-RateLimit-Remaining:
              description: >-
                Company quota metadata (reset is Unix seconds). Present after
                bearer authentication and company subscription validation.
              schema:
                type: integer
                format: int64
            X-RateLimit-Reset:
              description: >-
                Company quota metadata (reset is Unix seconds). Present after
                bearer authentication and company subscription validation.
              schema:
                type: integer
                format: int64
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
        '429':
          description: Too Many Requests
          headers:
            X-Request-Id:
              description: Support correlation ID.
              schema:
                type: string
            Retry-After:
              description: Seconds until a retry is allowed.
              schema:
                type: integer
            X-RateLimit-Limit:
              description: >-
                Company quota metadata (reset is Unix seconds). Present after
                bearer authentication and company subscription validation.
              schema:
                type: integer
                format: int64
            X-RateLimit-Remaining:
              description: >-
                Company quota metadata (reset is Unix seconds). Present after
                bearer authentication and company subscription validation.
              schema:
                type: integer
                format: int64
            X-RateLimit-Reset:
              description: >-
                Company quota metadata (reset is Unix seconds). Present after
                bearer authentication and company subscription validation.
              schema:
                type: integer
                format: int64
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
        '500':
          description: Internal Server Error
          headers:
            X-Request-Id:
              description: Support correlation ID.
              schema:
                type: string
            X-RateLimit-Limit:
              description: >-
                Company quota metadata (reset is Unix seconds). Present after
                bearer authentication and company subscription validation.
              schema:
                type: integer
                format: int64
            X-RateLimit-Remaining:
              description: >-
                Company quota metadata (reset is Unix seconds). Present after
                bearer authentication and company subscription validation.
              schema:
                type: integer
                format: int64
            X-RateLimit-Reset:
              description: >-
                Company quota metadata (reset is Unix seconds). Present after
                bearer authentication and company subscription validation.
              schema:
                type: integer
                format: int64
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
        '502':
          description: Bad Gateway
          headers:
            X-Request-Id:
              description: Support correlation ID.
              schema:
                type: string
            X-RateLimit-Limit:
              description: >-
                Company quota metadata (reset is Unix seconds). Present after
                bearer authentication and company subscription validation.
              schema:
                type: integer
                format: int64
            X-RateLimit-Remaining:
              description: >-
                Company quota metadata (reset is Unix seconds). Present after
                bearer authentication and company subscription validation.
              schema:
                type: integer
                format: int64
            X-RateLimit-Reset:
              description: >-
                Company quota metadata (reset is Unix seconds). Present after
                bearer authentication and company subscription validation.
              schema:
                type: integer
                format: int64
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
        '503':
          description: Service Unavailable
          headers:
            X-Request-Id:
              description: Support correlation ID.
              schema:
                type: string
            X-RateLimit-Limit:
              description: >-
                Company quota metadata (reset is Unix seconds). Present after
                bearer authentication and company subscription validation.
              schema:
                type: integer
                format: int64
            X-RateLimit-Remaining:
              description: >-
                Company quota metadata (reset is Unix seconds). Present after
                bearer authentication and company subscription validation.
              schema:
                type: integer
                format: int64
            X-RateLimit-Reset:
              description: >-
                Company quota metadata (reset is Unix seconds). Present after
                bearer authentication and company subscription validation.
              schema:
                type: integer
                format: int64
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
components:
  schemas:
    ApiSendMessageRequest:
      required:
        - channel
        - channel_id
      type: object
      properties:
        channel:
          minLength: 1
          pattern: ^(whatsapp|email)$
          enum:
            - whatsapp
            - email
          type: string
        channel_id:
          maxLength: 200
          minLength: 1
          type: string
        to:
          maxLength: 16
          minLength: 0
          type: string
          description: >-
            E.164 number with a leading +, required for WhatsApp. Omit for
            email.
          nullable: true
        text:
          maxLength: 10000
          minLength: 0
          type: string
          description: >-
            WhatsApp text: 1–4096 characters within the 24-hour reply window.
            Email reply: 1–10000 characters. Omit when using a template.
          nullable: true
        template:
          $ref: '#/components/schemas/ApiWhatsAppTemplateRequest'
        ticket_id:
          type: string
          description: >-
            Required for email replies; the ticket must use channel_id. Omit for
            WhatsApp.
          format: uuid
          nullable: true
      additionalProperties: false
    ApiOutboundMessageApiData:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/ApiOutboundMessage'
      additionalProperties: false
    ApiErrorResponse:
      type: object
      properties:
        error:
          $ref: '#/components/schemas/ApiError'
        request_id:
          type: string
      additionalProperties: false
    ApiWhatsAppTemplateRequest:
      required:
        - language
        - name
      type: object
      properties:
        name:
          minLength: 1
          pattern: ^[a-z0-9_]{1,512}$
          type: string
        language:
          minLength: 1
          pattern: ^[a-z]{2,3}(_[A-Za-z]{2,4})?$
          type: string
        body_parameters:
          maxItems: 50
          type: array
          items:
            maxLength: 1024
            minLength: 1
            type: string
          description: >-
            Positional body text parameters in template order; each must contain
            1–1024 characters.
          nullable: true
      additionalProperties: false
    ApiOutboundMessage:
      type: object
      properties:
        id:
          type: string
          format: uuid
        channel:
          enum:
            - whatsapp
            - email
          type: string
        channel_id:
          type: string
        status:
          enum:
            - queued
            - sending
            - sent
            - delivered
            - read
            - failed
            - delivery_unknown
          type: string
        error_code:
          type: string
          nullable: true
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
      additionalProperties: false
    ApiError:
      type: object
      properties:
        code:
          type: string
        message:
          type: string
        field:
          type: string
          nullable: true
      additionalProperties: false
  securitySchemes:
    CustomerBearer:
      type: http
      description: >-
        Company-owned API token. Supply Authorization: Bearer
        YOUR_CCONNECT_API_TOKEN. Never use provider tokens or member passwords.
        Tokens are shown only once when created.
      scheme: bearer
      bearerFormat: Cconnect API token

````

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