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

# Create a message

> Create a message



## OpenAPI

````yaml /api-reference/openapi/client.json post /public/api/v1/inboxes/{inbox_identifier}/contacts/{contact_identifier}/conversations/{conversation_id}/messages
openapi: 3.0.4
info:
  title: CriaChat
  description: This is the API documentation for CriaChat server.
  version: 1.1.0
  termsOfService: https://www.cria.chat/terms-of-service/
  contact:
    email: hello@cria.chat
  license:
    name: MIT License
    url: https://opensource.org/licenses/MIT
servers:
  - url: https://app.cria.chat/
security: []
tags:
  - name: Contacts API
    description: Public contact APIs
  - name: Conversations API
    description: Public conversation APIs
  - name: Messages API
    description: Public message APIs
paths:
  /public/api/v1/inboxes/{inbox_identifier}/contacts/{contact_identifier}/conversations/{conversation_id}/messages:
    parameters:
      - $ref: '#/components/parameters/public_inbox_identifier'
      - $ref: '#/components/parameters/public_contact_identifier'
      - $ref: '#/components/parameters/conversation_id'
    post:
      tags:
        - Messages API
      summary: Create a message
      description: Create a message
      operationId: create-a-message
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/public_message_create_payload'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/public_message'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/bad_request_error'
      security: []
components:
  parameters:
    public_inbox_identifier:
      in: path
      name: inbox_identifier
      schema:
        type: string
      required: true
      description: The identifier obtained from API inbox channel
    public_contact_identifier:
      in: path
      name: contact_identifier
      schema:
        type: string
      required: true
      description: The source id of contact obtained on contact create
    conversation_id:
      in: path
      name: conversation_id
      schema:
        type: integer
      required: true
      description: The numeric ID of the conversation
  schemas:
    public_message_create_payload:
      type: object
      properties:
        content:
          type: string
          description: Content for the message
          example: Hello, how can I help you?
        echo_id:
          type: string
          description: Temporary identifier which will be passed back via websockets
          example: '1234567890'
    public_message:
      type: object
      properties:
        id:
          type: string
          description: Id of the message
        content:
          type: string
          description: Text content of the message
        message_type:
          type: string
          description: Denotes the message type
        content_type:
          type: string
          description: Content type of the message
        content_attributes:
          type: string
          description: Additional content attributes of the message
        created_at:
          type: string
          description: Created at time stamp of the message
        conversation_id:
          type: string
          description: Conversation Id of the message
        attachments:
          type: array
          items:
            type: object
          description: Attachments if any
        sender:
          type: object
          description: Details of the sender
    bad_request_error:
      title: data
      type: object
      properties:
        description:
          type: string
        errors:
          type: array
          items:
            $ref: '#/components/schemas/request_error'
    request_error:
      type: object
      properties:
        field:
          type: string
        message:
          type: string
        code:
          type: string

````