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

# Send message

> Sends a user message to the conversation and returns the AI agent's response. Supports both streaming (Server-Sent Events) and non-streaming (JSON) response modes. This endpoint is rate-limited.



## OpenAPI

````yaml /openapi/apps-api.json post /apps/{app_id}/conversations/{conversation_id}
openapi: 3.1.0
info:
  title: Dimedove API
  version: 1.0.0
  description: >-
    Programmatically manage conversations and interact with your AI agents
    through the Dimedove API.
servers:
  - url: https://api.dimedove.com/v1
    description: Production
security: []
paths:
  /apps/{app_id}/conversations/{conversation_id}:
    post:
      tags:
        - Conversations
      summary: Send message
      description: >-
        Sends a user message to the conversation and returns the AI agent's
        response. Supports both streaming (Server-Sent Events) and non-streaming
        (JSON) response modes. This endpoint is rate-limited.
      operationId: apps_api_send_message
      parameters:
        - in: path
          name: app_id
          schema:
            description: The unique identifier of the app.
            title: App Id
            type: string
          required: true
          description: The unique identifier of the app.
        - in: path
          name: conversation_id
          schema:
            description: The unique identifier of the conversation.
            title: Conversation Id
            type: string
          required: true
          description: The unique identifier of the conversation.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SendMessageRequest'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseSchema'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OpenAIErrorSchema'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OpenAIErrorSchema'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OpenAIErrorSchema'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OpenAIErrorSchema'
      security:
        - AppsApiKeyAuth: []
components:
  schemas:
    SendMessageRequest:
      example:
        message:
          content: Hello, I need help with my order.
          role: user
        metadata:
          age: 34
          first_name: John
          plan_type: term_life
        stream: true
      properties:
        message:
          $ref: '#/components/schemas/MessageInput'
          description: The message object to send.
        stream:
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            Override the app's default streaming setting for this request. When
            true, the response is delivered as Server-Sent Events (SSE). When
            false, a single JSON response is returned. If omitted, the app's
            configured default is used.
          title: Stream
        metadata:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          description: >-
            Arbitrary key-value context to enrich the AI agent's response. Pass
            the latest snapshot on any message — the agent will use this fresh
            context for the current response and it will be persisted as the
            conversation's latest metadata. Maximum 16KB.
          title: Metadata
      required:
        - message
      title: SendMessageRequest
      type: object
    ResponseSchema:
      properties:
        id:
          description: Unique identifier for the response.
          title: Id
          type: string
        object:
          default: response
          description: The object type. Always 'response'.
          title: Object
          type: string
        created_at:
          description: Unix timestamp (in seconds) of when the response was generated.
          title: Created At
          type: integer
        conversation_id:
          description: The ID of the conversation this response belongs to.
          title: Conversation Id
          type: string
        output:
          default: []
          description: >-
            The list of output items produced by the AI agent, including
            messages and function calls.
          items:
            $ref: '#/components/schemas/ResponseOutputItem'
          title: Output
          type: array
        status:
          default: completed
          description: The status of the response. Either 'completed' or 'failed'.
          title: Status
          type: string
      required:
        - id
        - created_at
        - conversation_id
      title: ResponseSchema
      type: object
    OpenAIErrorSchema:
      properties:
        error:
          $ref: '#/components/schemas/OpenAIErrorDetail'
          description: The error detail object.
      required:
        - error
      title: OpenAIErrorSchema
      type: object
    MessageInput:
      properties:
        role:
          default: user
          description: The role of the message sender. Currently only 'user' is supported.
          title: Role
          type: string
        content:
          description: The text content of the message to send to the AI agent.
          title: Content
          type: string
      required:
        - content
      title: MessageInput
      type: object
    ResponseOutputItem:
      properties:
        type:
          description: >-
            The type of the output item. Either 'message' for text responses or
            'function_call' for tool invocations.
          title: Type
          type: string
        role:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            The role of the output item author. Typically 'assistant'. Only
            present for 'message' type items.
          title: Role
        content:
          anyOf:
            - items:
                additionalProperties: true
                type: object
              type: array
            - type: 'null'
          description: >-
            The content parts of the message. Each part is an object with a
            'type' field and type-specific data. Only present for 'message' type
            items.
          title: Content
        name:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            The name of the function that was called. Only present for
            'function_call' type items.
          title: Name
        arguments:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            The JSON-encoded arguments passed to the function. Only present for
            'function_call' type items.
          title: Arguments
        call_id:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            The unique identifier for this function call. Only present for
            'function_call' type items.
          title: Call Id
      required:
        - type
      title: ResponseOutputItem
      type: object
    OpenAIErrorDetail:
      properties:
        message:
          description: A human-readable description of the error.
          title: Message
          type: string
        type:
          description: >-
            The error type identifier (e.g. 'invalid_api_key', 'not_found',
            'rate_limit_exceeded').
          title: Type
          type: string
        param:
          anyOf:
            - type: string
            - type: 'null'
          description: The parameter that caused the error, if applicable.
          title: Param
        code:
          anyOf:
            - type: string
            - type: 'null'
          description: An error code providing additional detail, if applicable.
          title: Code
      required:
        - message
        - type
      title: OpenAIErrorDetail
      type: object
  securitySchemes:
    AppsApiKeyAuth:
      type: http
      scheme: bearer

````