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

# Send a message

> Send `text`, an `attachment`, or both — one of them is required. The contact must be assigned to a member first, or the request is rejected with `CONTACT_NOT_ASSIGNED`. Attachments are sent by public URL; there is no upload endpoint.



## OpenAPI

````yaml /api-reference/openapi.json post /v1/messages
openapi: 3.0.0
info:
  title: Flovoo API
  description: |-
    Authenticate with an API key created from **Connectors → API**:

    ```
    Authorization: Bearer flv_...
    ```

    The organization is derived from the key, so no request carries an
    organization id.
  version: '1.0'
  contact: {}
servers: []
security: []
tags: []
paths:
  /v1/messages:
    post:
      tags:
        - Messages
      summary: Send a message
      description: >-
        Send `text`, an `attachment`, or both — one of them is required. The
        contact must be assigned to a member first, or the request is rejected
        with `CONTACT_NOT_ASSIGNED`. Attachments are sent by public URL; there
        is no upload endpoint.
      operationId: PublicMessagesController_send
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PublicSendMessageDoc'
      responses:
        '201':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicSentMessageDoc'
        '400':
          description: >-
            The request failed validation. Every failing field is listed in
            `details`, not just the first.
          content:
            application/json:
              example:
                error:
                  type: invalid_request_error
                  code: validation_failed
                  message: The request failed validation.
                  details:
                    - param: phone
                      code: invalid_string
                      message: Invalid phone number format
                  requestId: req_01J8X4M2N9P3Q5R7
        '401':
          description: The key is missing, unknown, or revoked.
          content:
            application/json:
              examples:
                missing:
                  summary: No Authorization header
                  value:
                    error:
                      type: authentication_error
                      code: missing_api_key
                      message: No API key was provided.
                      requestId: req_01J8X4M2N9P3Q5R7
                invalid:
                  summary: Unknown key
                  value:
                    error:
                      type: authentication_error
                      code: invalid_api_key
                      message: The API key provided is not valid.
                      requestId: req_01J8X4M2N9P3Q5R7
                revoked:
                  summary: Revoked key
                  value:
                    error:
                      type: authentication_error
                      code: revoked_api_key
                      message: This API key has been revoked.
                      requestId: req_01J8X4M2N9P3Q5R7
        '403':
          description: The key is valid but lacks the route's scope.
          content:
            application/json:
              example:
                error:
                  type: permission_error
                  code: insufficient_scope
                  message: >-
                    This API key does not have the required scope:
                    contacts.create.
                  requestId: req_01J8X4M2N9P3Q5R7
        '404':
          description: No such Contact in this organization.
          content:
            application/json:
              example:
                error:
                  type: invalid_request_error
                  code: not_found
                  message: >-
                    Contact with ID 0198f2a1-8c3d-7a4e-b5f6-1a2b3c4d5e6f not
                    found in this organization.
                  requestId: req_01J8X4M2N9P3Q5R7
        '429':
          description: Rate limit exceeded. `Retry-After` gives the seconds to wait.
          content:
            application/json:
              example:
                error:
                  type: rate_limit_error
                  code: rate_limit_exceeded
                  message: >-
                    Rate limit of 300 requests per minute exceeded. Retry in
                    23s.
                  requestId: req_01J8X4M2N9P3Q5R7
        '500':
          description: >-
            An error on our side. The original exception is never returned;
            quote `requestId` to support.
          content:
            application/json:
              example:
                error:
                  type: api_error
                  code: internal_error
                  message: An unexpected error occurred.
                  requestId: req_01J8X4M2N9P3Q5R7
      security:
        - api-key: []
components:
  schemas:
    PublicSendMessageDoc:
      type: object
      properties:
        conversationId:
          type: string
          format: uuid
        contactId:
          type: string
          format: uuid
        text:
          description: Text, an attachment, or both
          type: string
          minLength: 1
        attachment:
          type: object
          properties:
            url:
              description: Publicly reachable URL
              type: string
              format: uri
            type:
              description: image | video | audio | document
              type: string
              minLength: 1
            name:
              type: string
          x-nestjs_zod-self-required: false
        replyToMessageId:
          type: string
          format: uuid
      required:
        - conversationId
        - contactId
        - attachment
    PublicSentMessageDoc:
      type: object
      properties:
        id:
          type: string
          format: uuid
        conversationId:
          type: string
          format: uuid
      required:
        - id
        - conversationId
  securitySchemes:
    api-key:
      scheme: bearer
      bearerFormat: JWT
      type: http
      description: Your API key, e.g. flv_9f2a8c1e…

````