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

# Add a fact to the org's memory

> Adds one rule or workflow to the org's own memory, which every seat of the org reads at the start of a conversation with its source. Name the org document it comes from in source; without one the writing key is recorded as its teacher. 201 with the new memory; 200 with the existing one when the org's memory already holds the fact. 409 memory_forgotten means the fact was removed and is not added back; 409 memory_busy means the memory is being updated, retry after the Retry-After seconds. Requires conversations:memory:write.



## OpenAPI

````yaml /openapi.generated.json post /conversations/memory
openapi: 3.1.0
info:
  description: >-
    Public API reference. Generated from apps/engine/openapi.yaml by make
    docs-openapi-write. Do not edit.
  title: Nexio platform API
  version: '1'
servers:
  - url: https://api.usenexio.com
security: []
tags:
  - name: Access
  - name: Catalog
  - name: Conversations
  - name: Documents
  - name: Engines
  - name: Events
  - name: Feedback
  - name: Graph
  - name: Records
  - name: Roadmap
  - name: Runs
  - name: Webhooks
  - name: accounts
  - name: actions
  - name: activities
  - name: activity-feed
  - name: attachments
  - name: audit
  - name: benefit-plans
  - name: billing-transactions
  - name: carrier_documents
  - name: certificate-holders
  - name: certificate_drafts
  - name: certificates
  - name: change_feed
  - name: claims
  - name: classes
  - name: codes
  - name: commission_facts
  - name: connections
  - name: contacts
  - name: contingencies
  - name: conversations
  - name: customer
  - name: customer_contacts
  - name: deals
  - name: dependents
  - name: document_extractions
  - name: documents
  - name: drivers
  - name: eforms
  - name: employees
  - name: events
  - name: feature_requests
  - name: form-templates
  - name: invoices
  - name: leads
  - name: line_schedules_other
  - name: loss_history
  - name: machines
  - name: markets
  - name: motor-carriers
  - name: notes
  - name: opportunities
  - name: opportunity-signals
  - name: pages
  - name: personal_lines_detail
  - name: placement_choices
  - name: placement_feedback
  - name: placements
  - name: policies
  - name: policy_parties
  - name: policy_personnel
  - name: policy_transactions
  - name: premium_rows
  - name: procedures
  - name: proposals
  - name: quote_comparisons
  - name: quotes
  - name: records
  - name: register-views
  - name: renewal-entries
  - name: risk_review_choices
  - name: rollups
  - name: seats
  - name: sec-filings
  - name: service_agreements
  - name: submissions
  - name: suspenses
  - name: tasks
  - name: umbrella_underlying
  - name: underwriting_questions
  - name: uploaded_documents
  - name: vehicles
  - name: workflows
paths:
  /conversations/memory:
    post:
      tags:
        - Conversations
      summary: Add a fact to the org's memory
      description: >-
        Adds one rule or workflow to the org's own memory, which every seat of
        the org reads at the start of a conversation with its source. Name the
        org document it comes from in source; without one the writing key is
        recorded as its teacher. 201 with the new memory; 200 with the existing
        one when the org's memory already holds the fact. 409 memory_forgotten
        means the fact was removed and is not added back; 409 memory_busy means
        the memory is being updated, retry after the Retry-After seconds.
        Requires conversations:memory:write.
      operationId: createConversationMemory
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateConversationMemoryRequest'
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConversationMemory'
          description: Created
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
          description: Bad Request
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
          description: Conflict
        '413':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
          description: Request Entity Too Large
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
          description: Too Many Requests
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
          description: Internal Server Error
      security:
        - bearer: []
components:
  schemas:
    CreateConversationMemoryRequest:
      additionalProperties: false
      properties:
        fact:
          description: >-
            The fact, one plain sentence about how work is done at the org, at
            most 400 characters.
          type: string
        kind:
          description: >-
            rule: a carrier, state, system or house rule. workflow: how a piece
            of work is done.
          enum:
            - rule
            - workflow
          type: string
        source:
          $ref: '#/components/schemas/ConversationMemorySource'
          description: >-
            The org document the fact comes from. Without one, the key that
            writes it is recorded as its teacher.
        subject:
          description: 'org: the org''s own memory, which every seat of the org reads.'
          enum:
            - org
          type: string
      required:
        - subject
        - fact
        - kind
      type: object
    ConversationMemory:
      additionalProperties: false
      properties:
        basis:
          description: >-
            stated: a person said it, or an org document says it. inferred: the
            nightly pass concluded it across several conversations.
          enum:
            - stated
            - inferred
          type: string
        evidence:
          description: The messages the memory came from.
          items:
            $ref: '#/components/schemas/ConversationMemoryEvidence'
          type:
            - array
            - 'null'
        fact:
          description: The fact, in a sentence.
          type: string
        id:
          type: string
        kind:
          description: >-
            A person's memory has situation, style, signature, preference,
            criteria, correction or other; the org's has rule or workflow.
          enum:
            - situation
            - style
            - signature
            - preference
            - criteria
            - correction
            - other
            - rule
            - workflow
          type: string
        recorded_at:
          format: date-time
          type: string
        source:
          $ref: '#/components/schemas/ConversationMemorySource'
          description: 'Org memory: the org document the fact was added from.'
        taught_by:
          description: >-
            Org memory: the display name of the colleague (or key) who taught
            the fact, or a colleague when no name is recorded. Absent when an
            org document is the source.
          type: string
        valid_from:
          description: When the fact became true.
          format: date-time
          type: string
        written_by:
          description: The job that wrote it.
          enum:
            - learn
            - dream
            - backfill
            - route
          type: string
      required:
        - id
        - fact
        - kind
        - basis
        - valid_from
        - written_by
        - recorded_at
        - evidence
      type: object
    ErrorEnvelope:
      additionalProperties: false
      properties:
        code:
          description: The stable machine-readable error code. One meaning forever.
          type: string
        details:
          description: Structured detail for the code.
        message:
          description: A human-readable sentence about this occurrence.
          type: string
      required:
        - code
        - message
      type: object
    ConversationMemorySource:
      additionalProperties: false
      properties:
        document:
          description: The org document the fact comes from, as it is named at the org.
          type: string
        section:
          description: The section or page of the document.
          type: string
      required:
        - document
      type: object
    ConversationMemoryEvidence:
      additionalProperties: false
      properties:
        conversation_id:
          description: The conversation the memory came from.
          type: string
        message_id:
          description: The message in that conversation.
          type: string
        quote:
          description: A short quote of what the person wrote.
          type: string
        recorded_at:
          format: date-time
          type: string
        turn_id:
          description: The turn the message belongs to, when recorded.
          type:
            - string
            - 'null'
      required:
        - conversation_id
        - message_id
        - turn_id
        - quote
        - recorded_at
      type: object
  securitySchemes:
    bearer:
      description: The org's platform API key.
      scheme: bearer
      type: http

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.