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

# Post Message

> Append a user message and tick the brain.

Semantics pinned from plan §4a: plain free text while a QUESTION is
pending answers it (R2); a message carrying resolved @-mentions is an
INTROSPECTION query — it never consumes the pending card and is answered
from state by the brain.



## OpenAPI

````yaml https://www.datalab.to/openapi.json post /api/v1/agent-studio/sessions/{session_id}/message
openapi: 3.1.0
info:
  title: Datalab API
  version: 0.0.1
servers:
  - url: https://www.datalab.to
    description: Datalab API
security: []
paths:
  /api/v1/agent-studio/sessions/{session_id}/message:
    post:
      tags:
        - agent-studio
      summary: Post Message
      description: |-
        Append a user message and tick the brain.

        Semantics pinned from plan §4a: plain free text while a QUESTION is
        pending answers it (R2); a message carrying resolved @-mentions is an
        INTROSPECTION query — it never consumes the pending card and is answered
        from state by the brain.
      operationId: post_message_api_v1_agent_studio_sessions__session_id__message_post
      parameters:
        - name: session_id
          in: path
          required: true
          schema:
            type: integer
            title: Session Id
        - name: wos-session
          in: cookie
          required: false
          schema:
            type: string
            title: Wos-Session
        - name: datalab_active_team
          in: cookie
          required: false
          schema:
            type: string
            title: Datalab Active Team
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SessionMessageRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SessionEventResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKeyHeader: []
components:
  schemas:
    SessionMessageRequest:
      properties:
        text:
          type: string
          maxLength: 20000
          minLength: 1
          title: Text
        mentions:
          items:
            type: string
          type: array
          title: Mentions
          description: >-
            Reference-doc names the user @-mentioned; resolved server-side to
            refs (latest run per doc).
      type: object
      required:
        - text
      title: SessionMessageRequest
    SessionEventResponse:
      properties:
        id:
          type: integer
          title: Id
        seq:
          type: integer
          title: Seq
        ts:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Ts
        kind:
          type: string
          title: Kind
        actor:
          type: string
          enum:
            - user
            - agent
            - system
          title: Actor
        text:
          anyOf:
            - type: string
            - type: 'null'
          title: Text
          description: Convenience copy of payload.text when present.
        payload:
          additionalProperties: true
          type: object
          title: Payload
        refs:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Refs
      type: object
      required:
        - id
        - seq
        - kind
        - actor
      title: SessionEventResponse
    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:
    APIKeyHeader:
      type: apiKey
      in: header
      name: X-API-Key

````