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

# Send Super Agent Message

> Sends a message to the super agent. If session_id is not provided, creates a new session. Returns synchronously if completed within 15 seconds, otherwise returns 202 Accepted with session ID for polling. Optionally accepts a callback_url for webhook notification when the assistant response is ready.



## OpenAPI

````yaml post /super-agent/messages
openapi: 3.0.1
info:
  title: Attention Service V2
  description: Attention Service API V2
  termsOfService: https://www.attention.com/terms-of-use
  contact:
    name: Attention Team
    url: https://docs.attention.com/welcome
    email: support@attention.com
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0.html
  version: 1.8.0
servers:
  - url: https://api.attention.tech/v2
security:
  - APIKeyHeader: []
paths:
  /super-agent/messages:
    post:
      tags:
        - Super Agent
      summary: Send Super Agent Message
      description: >-
        Sends a message to the super agent. If session_id is not provided,
        creates a new session. Returns synchronously if completed within 15
        seconds, otherwise returns 202 Accepted with session ID for polling.
        Optionally accepts a callback_url for webhook notification when the
        assistant response is ready.
      operationId: sendSuperAgentMessage
      parameters:
        - name: callback_url
          in: query
          description: >-
            Optional webhook URL to receive the assistant's response when
            processing completes
          schema:
            type: string
            format: uri
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SendSuperAgentMessageRequest'
          application/vnd.api+json:
            schema:
              $ref: '#/components/schemas/SendSuperAgentMessageRequest'
        required: true
      responses:
        '200':
          description: Message processed successfully with assistant response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SuperAgentMessageResponse'
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/SuperAgentMessageResponse'
        '202':
          description: Message accepted, processing in background
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SuperAgentMessageAcceptedResponse'
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/SuperAgentMessageAcceptedResponse'
        '400':
          description: Invalid request parameters
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Valid user-level API key required
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Session does not belong to user's organization
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/Error'
        default:
          description: Unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    SendSuperAgentMessageRequest:
      required:
        - content
      type: object
      properties:
        session_id:
          type: string
          description: Optional session ID. If not provided, a new session will be created.
        content:
          type: string
          description: The message content to send to the super agent
        timezone:
          type: string
          description: >-
            Optional user timezone for timestamp formatting (e.g.,
            'America/New_York')
      example:
        session_id: session-uuid-456
        content: What were our Q1 revenue results?
        timezone: America/New_York
    SuperAgentMessageResponse:
      type: object
      properties:
        session_id:
          type: string
          description: The session ID
        user_message:
          $ref: '#/components/schemas/SuperAgentMessage'
        assistant_message:
          $ref: '#/components/schemas/SuperAgentMessage'
      example:
        session_id: session-uuid-456
        user_message:
          id: msg-uuid-1
          session_id: session-uuid-456
          content: What were our Q1 revenue results?
          role: user
          timestamp: '2024-03-18T14:30:00Z'
          metadata: {}
        assistant_message:
          id: msg-uuid-2
          session_id: session-uuid-456
          content: Based on the Q1 data, revenue targets were met at 105%.
          role: assistant
          timestamp: '2024-03-18T14:30:05Z'
          metadata: {}
    SuperAgentMessageAcceptedResponse:
      type: object
      properties:
        session_id:
          type: string
          description: The session ID to use for polling
        user_message:
          $ref: '#/components/schemas/SuperAgentMessage'
        status:
          type: string
          description: Current processing status
        message:
          type: string
          description: Human-readable status message
      example:
        session_id: session-uuid-456
        user_message:
          id: msg-uuid-1
          session_id: session-uuid-456
          content: Analyze our pipeline for Q2
          role: user
          timestamp: '2024-03-18T14:30:00Z'
          metadata: {}
        status: processing
        message: Your message is being processed. Poll the session for results.
    Error:
      type: object
      properties:
        id:
          type: string
          description: A unique identifier for the error.
        status:
          type: string
          description: >-
            The HTTP status code applicable to this problem, expressed as a
            string value.
        code:
          type: string
          description: An application-specific error code, expressed as a string value.
        title:
          type: string
          description: A short, human-readable summary of the problem.
        detail:
          type: string
          description: >-
            A human-readable explanation specific to this occurrence of the
            problem.
        source:
          type: object
          properties:
            pointer:
              type: string
            parameter:
              type: string
        meta:
          type: object
          properties: {}
      example:
        id: not_found_error
        status: '404'
        code: '404'
        title: Not Found Error
        detail: The requested resource was not found
        source:
          pointer: /data/attributes/id
    SuperAgentMessage:
      type: object
      properties:
        id:
          type: string
          description: Unique identifier of the message
        session_id:
          type: string
          description: ID of the session this message belongs to
        content:
          type: string
          description: The message content
        role:
          type: string
          description: The role of the message sender
          enum:
            - user
            - assistant
        timestamp:
          type: string
          description: When the message was created
          format: date-time
        metadata:
          type: object
          properties: {}
          description: Additional metadata associated with the message
      example:
        id: msg-uuid-123
        session_id: session-uuid-456
        content: Based on the Q1 data, revenue targets were met at 105%.
        role: assistant
        timestamp: '2024-03-18T14:30:00Z'
        metadata: {}
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      name: Authorization
      in: header

````