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

# Create a new message

> Create a new message within a specified conversation.



## OpenAPI

````yaml /api-reference/openapi.yaml post /bridge/api/v1/workspaces/{workspaceId}/messages
openapi: 3.1.0
info:
  title: Bridge API
  summary: Bridge API specification for chat system management.
  description: >-
    Bridge API specification including webhook receiver endpoints, Contact CRUD
    operations, and comprehensive chat system.

                        This API includes:
                        1. Webhook Receiver API - for CRM clients to receive event notifications from Bridge
                        2. Contact CRUD API - for clients to manage contacts in Bridge
                        3. Conversations API - for managing conversations with flexible user identification and participant management
                        4. Messages API - for sending messages and files to a conversation
                        5. Files API - for managing files in a message
                        6. Custom attributes API - for consult custom attributes of an specific workspace
                    
                        **Multi-Tenant Architecture**: All operations are scoped to a specific workspace using workspaceId.
  termsOfService: https://www.sainapsis.com/legal/terms-of-service
  contact:
    name: Bridge Support
    url: https://app.bridge.new/
    email: support@sainapsis.com
  license:
    name: MIT License
    url: https://spdx.org/licenses/MIT.html
  version: 1.0.0
servers:
  - url: https://api-connect-us.bridge.new
    description: Production server
security: []
paths:
  /bridge/api/v1/workspaces/{workspaceId}/messages:
    post:
      tags:
        - Messages API
      summary: Create a new message
      description: Create a new message within a specified conversation.
      operationId: create_message_bridge_api_v1_workspaces__workspaceId__messages_post
      parameters:
        - name: workspaceId
          in: path
          required: true
          schema:
            type: string
            format: uuid
            description: Unique identifier of the workspace (UUID v4).
            examples:
              - b6cf1c4a-2b1e-4e63-8f3e-0f9d1a2a1234
            title: Workspaceid
          description: Unique identifier of the workspace (UUID v4).
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MessageRequest'
              description: >-
                Request body for creating a new message within a specified
                conversation.
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MessageResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              examples:
                FORBIDDEN:
                  value:
                    title: Forbidden
                    status: 403
                    code: BRIDGE_CORE_0301
              schema:
                $ref: '#/components/schemas/Problem'
        '404':
          description: Not Found
          content:
            application/json:
              examples:
                CONVERSATION_NOT_FOUND:
                  value:
                    title: Conversation Not Found
                    status: 404
                    code: BRIDGE_CONVERSATION_0001
                CONVERSATION_NOT_IN_WORKSPACE:
                  value:
                    title: Conversation Not In Workspace
                    status: 404
                    code: BRIDGE_CONVERSATION_0002
                WORKSPACE_NOT_FOUND:
                  value:
                    title: Workspace Not Found
                    status: 404
                    code: BRIDGE_WORKSPACE_0001
              schema:
                $ref: '#/components/schemas/Problem'
        '409':
          description: Conflict
          content:
            application/json:
              examples:
                CONVERSATION_IS_RELEASED:
                  value:
                    title: Conversation Is Released
                    status: 409
                    code: BRIDGE_CONVERSATION_0007
              schema:
                $ref: '#/components/schemas/Problem'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - x-api-key: []
components:
  schemas:
    MessageRequest:
      properties:
        conversationId:
          type: string
          title: Conversation Identifier
          description: Identifier of the conversation.
          examples:
            - d290f1ee-6c54-4b01-90e6-d701748f0851
        messageBody:
          type: string
          title: Message Body
          description: Body of the message.
          examples:
            - Hello, welcome to Bridge!
        replyToMessageId:
          anyOf:
            - type: string
            - type: 'null'
          title: Reply To Message Identifier
          description: Identifier of the message being replied to.
          examples:
            - b6cf1c4a-2b1e-4e63-8f3e-0f9d1a2a1234
            - null
        enableExternalBroadcast:
          type: boolean
          title: Enable External Broadcast
          description: Flag to enable external broadcast.
          examples:
            - true
            - false
        mediaIds:
          items:
            type: string
          type: array
          title: Media Identifiers
          description: List of media IDs associated with the message.
          examples:
            - - a1b2c3d4-e5f6-7g8h-9i0j-k1l2m3n4o5p6
      type: object
      required:
        - conversationId
        - messageBody
        - enableExternalBroadcast
      title: MessageRequest
      description: Request body for creating a new message within a specified conversation.
    MessageResponse:
      properties:
        messagingProduct:
          type: string
          title: Messaging Product
          description: Product name.
          default: bridge
          examples:
            - bridge
        messageId:
          type: string
          title: Message Identifier
          description: Unique message identifier as a UUID string.
          examples:
            - b6cf1c4a-2b1e-4e63-8f3e-0f9d1a2a1234
      type: object
      required:
        - messageId
      title: MessageResponse
      description: Response body for message-related operations.
    Problem:
      properties:
        title:
          type: string
          title: Title
          description: Short, summary of the problem type.
        status:
          type: integer
          title: Status
          description: >-
            HTTP status code generated by the origin server for this occurrence
            of the problem.
        detail:
          anyOf:
            - type: string
            - type: 'null'
          title: Detail
          description: Explanation specific to this occurrence of the problem.
        instance:
          anyOf:
            - type: string
            - type: 'null'
          title: Instance
          description: >-
            A URI reference that identifies the specific occurrence of the
            problem.
        traceId:
          anyOf:
            - type: string
            - type: 'null'
          title: Traceid
          description: Trace ID for debugging purposes.
        code:
          anyOf:
            - type: string
            - type: 'null'
          title: Code
          description: >-
            Error code for identification, view the error codes page for more
            details.
        errors:
          anyOf:
            - items:
                additionalProperties: true
                type: object
              type: array
            - type: 'null'
          title: Errors
          description: List of error details.
        extra:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Extra
          description: Extra information about the problem.
      type: object
      required:
        - title
        - status
      title: Problem
      description: Object representing a Problem response body.
    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
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    x-api-key:
      type: apiKey
      description: Copy the API key as provided by the Bridge Console.
      in: header
      name: x-api-key

````