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

# Create message

> Note: API currently validates sender_type as customer|user.
The API does not accept `metadata` or `is_ai_assisted` in requests.




## OpenAPI

````yaml /api-reference/openapi.json post /messages
openapi: 3.1.0
info:
  title: Weav API
  version: 1.0.0
  description: |
    Public API for Weav workspace integrations.
    Base URL is versioned under /v1 and requires bearer token authentication.
    Token abilities are enforced:
    - `external-api:read` for read endpoints
    - `external-api:write` for write endpoints
    - `external-api:write` also grants read access
servers:
  - url: https://api.weav.com/v1
    description: Production
security:
  - bearerAuth: []
tags:
  - name: Agents
  - name: Companies
  - name: Conversations
  - name: Customers
  - name: Messages
  - name: Training Data
  - name: Webhooks
paths:
  /messages:
    post:
      tags:
        - Messages
      summary: Create message
      description: |
        Note: API currently validates sender_type as customer|user.
        The API does not accept `metadata` or `is_ai_assisted` in requests.
      operationId: createMessage
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MessageCreateRequest'
      responses:
        '201':
          description: Message created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Message'
        '400':
          description: Invalid sender
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '422':
          $ref: '#/components/responses/ValidationError'
components:
  schemas:
    MessageCreateRequest:
      type: object
      required:
        - conversation_id
        - sender_type
        - content
      properties:
        conversation_id:
          type: string
          format: uuid
        sender_type:
          type: string
          enum:
            - customer
            - user
        sender_id:
          type: string
          format: uuid
          nullable: true
        content:
          type: string
    Message:
      type: object
      properties:
        id:
          type: string
          format: uuid
        conversation_id:
          type: string
          format: uuid
        sender_type:
          type: string
          enum:
            - customer
            - user
            - agent
            - system
        sender_id:
          type: string
          format: uuid
          nullable: true
        customer_id:
          type: string
          format: uuid
          nullable: true
        content:
          type: string
        sent_at:
          type: string
          format: date-time
          nullable: true
        is_internal:
          type: boolean
          nullable: true
        from:
          type: array
          items:
            type: string
          nullable: true
        to:
          type: array
          items:
            type: string
          nullable: true
        cc:
          type: array
          items:
            type: string
          nullable: true
        bcc:
          type: array
          items:
            type: string
          nullable: true
        email_status:
          type: string
          nullable: true
        email_error_message:
          type: string
          nullable: true
        created_at:
          type: string
          format: date-time
          nullable: true
    Error:
      type: object
      properties:
        error:
          type: string
          example: Error message
        code:
          type: string
          nullable: true
          example: UNAUTHENTICATED
        errors:
          type: object
          additionalProperties: true
          nullable: true
    ValidationError:
      type: object
      properties:
        message:
          type: string
          example: The given data was invalid.
        errors:
          type: object
          additionalProperties:
            type: array
            items:
              type: string
  responses:
    Unauthorized:
      description: Unauthorized
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    ValidationError:
      description: Validation error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ValidationError'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Token
      description: |
        Workspace API token.
        Include abilities `external-api:read` and/or `external-api:write`.

````