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

# Inject Message

> Inject a user message into a running agent execution.

The message is queued for the agent to absorb at its next natural
breakpoint (between iterations).  It is also persisted immediately
to the conversation history.

Returns 409 if no active execution exists for the conversation.



## OpenAPI

````yaml /openapi.json post /api/chat/inject
openapi: 3.1.0
info:
  title: FIM One API
  description: >-
    All-in-one agent platform for Global × China enterprises — programmatic
    access to agents, conversations, knowledge bases, and more.
  version: 0.8.9
servers:
  - url: https://your-domain.com
    description: Your FIM One instance
security:
  - BearerAuth: []
paths:
  /api/chat/inject:
    post:
      summary: Inject Message
      description: |-
        Inject a user message into a running agent execution.

        The message is queued for the agent to absorb at its next natural
        breakpoint (between iterations).  It is also persisted immediately
        to the conversation history.

        Returns 409 if no active execution exists for the conversation.
      operationId: inject_message_api_chat_inject_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/InjectMessageRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                additionalProperties: true
                type: object
                title: Response Inject Message Api Chat Inject Post
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    InjectMessageRequest:
      properties:
        conversation_id:
          type: string
          title: Conversation Id
        content:
          type: string
          title: Content
      type: object
      required:
        - conversation_id
        - content
      title: InjectMessageRequest
      description: Request body for injecting a message into an active agent execution.
    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:
    BearerAuth:
      type: http
      scheme: bearer
      description: API Key (fim_xxx) or JWT token

````