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

# Store emotional state

> Store a conversation transcript as emotional state and trigger indexing.

The conversation text is stored as a Vault resource in the `_emotional_state`
collection and sent for indexing via the standard pipeline. Mood extraction
happens asynchronously via the Hyperdoc pipeline (MoodExtractor).



## OpenAPI

````yaml https://app.stainlessapi.com/api/spec/documented/hyperspell.yaml post /emotional-state
openapi: 3.1.0
info:
  title: Hyperspell API
  summary: >-
    Hyperspell is the memory layer for AI apps and agents. Through the API, you
    can add memories, connect data sources to index them in real-time, and
    search memories with our natural language query engine.
  termsOfService: https://hyperspell.com/blog/tos
  contact:
    name: Hyperspell
    url: https://hyperspell.com/
    email: hello@hyperspell.com
  version: 0.32.1
servers:
  - url: https://api.hyperspell.com
    description: Production
security:
  - APIKey: []
    AsUser: []
paths:
  /emotional-state:
    post:
      tags:
        - Emotional State
      summary: Store emotional state
      description: >-
        Store a conversation transcript as emotional state and trigger indexing.


        The conversation text is stored as a Vault resource in the
        `_emotional_state`

        collection and sent for indexing via the standard pipeline. Mood
        extraction

        happens asynchronously via the Hyperdoc pipeline (MoodExtractor).
      operationId: store_emotional_state_emotional_state_post
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EmotionalStateRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EmotionalStateResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKey: []
        - AsUser: []
components:
  schemas:
    EmotionalStateRequest:
      properties:
        conversation:
          type: string
          title: Conversation
          description: The conversation transcript to extract emotional state from.
        session_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Session Id
          description: Session identifier for the conversation.
        relationship_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Relationship Id
          description: Per-relationship scoping key (e.g. 'partner-anna', 'slack:C01234').
        metadata:
          anyOf:
            - additionalProperties:
                anyOf:
                  - type: string
                  - type: integer
                  - type: number
                  - type: boolean
              type: object
            - type: 'null'
          title: Metadata
          description: Custom metadata for filtering.
      type: object
      required:
        - conversation
      title: EmotionalStateRequest
      description: Request to store an emotional state extraction.
    EmotionalStateResponse:
      properties:
        resource_id:
          type: string
          title: Resource Id
        summary:
          type: string
          title: Summary
        extracted_at:
          type: string
          title: Extracted At
        session_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Session Id
        relationship_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Relationship Id
        status:
          type: string
          title: Status
      type: object
      required:
        - resource_id
        - summary
        - extracted_at
        - session_id
        - relationship_id
        - status
      title: EmotionalStateResponse
      description: Response after storing emotional state.
    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
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    APIKey:
      type: http
      description: >-
        API Key or JWT User Token. If using an API Key, set the X-As-User header
        to act as a specific user. A JWT User Token is always scoped to a
        specific user.
      scheme: bearer
      bearerFormat: Bearer <token>
    AsUser:
      type: apiKey
      description: >-
        Optionally set this header to act as a specific user when using an API
        Key, equivalent to first exchanging the API Key for a User Token
      in: header
      name: X-As-User

````