v1
Memory

Add Memory Batch V1

Add multiple memory items in a batch with size validation and background processing.

**Authentication Required**:
One of the following authentication methods must be used:
- Bearer token in `Authorization` header
- API Key in `X-API-Key` header
- Session token in `X-Session-Token` header

**Required Headers**:
- Content-Type: application/json
- X-Client-Type: (e.g., 'papr_plugin', 'browser_extension')

The API validates individual memory content size against MAX_CONTENT_LENGTH environment variable (defaults to 15000 bytes).
post/v1/memory/batch

Query parameters

skip_background_processingboolean

If True, skips adding background tasks for processing

If True, skips adding background tasks for processing

enable_holographicboolean

If True, applies holographic neural transforms and stores in holographic collection

If True, applies holographic neural transforms and stores in holographic collection

frequency_schema_idstring nullable

Frequency schema for holographic embedding (e.g. 'cosqa', 'scifact'). Required when enable_holographic=True. Call GET /v1/frequencies to see available schemas.

Frequency schema for holographic embedding (e.g. 'cosqa', 'scifact'). Required when enable_holographic=True. Call GET /v1/frequencies to see available schemas.

Request body

external_user_idstring nullable

Your application's user identifier for all memories in the batch. This is the primary way to identify users. Papr will automatically resolve or create internal users as needed.

user_idstring nullable

DEPRECATED: Use 'external_user_id' instead. Internal Papr Parse user ID.

organization_idstring nullable

DEPRECATED - Internal only. Auto-populated from API key scope. Do not set manually. The organization is resolved automatically from the API key's associated organization.

namespace_idstring nullable

Optional namespace ID for multi-tenant batch memory scoping. When provided, all memories in the batch are associated with this namespace.

batch_sizeinteger nullable

Number of items to process in parallel

webhook_urlstring nullable

Optional webhook URL to notify when batch processing is complete. The webhook will receive a POST request with batch completion details.

webhook_secretstring nullable

Optional secret key for webhook authentication. If provided, will be included in the webhook request headers as 'X-Webhook-Secret'.

Example request

{
  "batch_size": 10,
  "external_user_id": "external_user_abcde",
  "memories": [
    {
      "content": "Meeting notes from the product planning session",
      "metadata": {
        "createdAt": "2024-03-21T10:00:00Z",
        "emoji tags": "📊,💡,📝",
        "emotion tags": "focused, productive",
        "hierarchical structures": "Business/Planning/Product",
        "topics": "product, planning"
      },
      "type": "text"
    },
    {
      "content": "Follow-up tasks from the planning meeting",
      "metadata": {
        "createdAt": "2024-03-21T11:00:00Z",
        "emoji tags": "✅,📋",
        "emotion tags": "organized",
        "hierarchical structures": "Business/Tasks/Planning",
        "topics": "tasks, planning"
      },
      "type": "text"
    }
  ],
  "user_id": "internal_user_id_12345"
}

Response

Memories successfully added

codeinteger

HTTP status code for the batch operation

statusstring

'success', 'partial', or 'error'

messagestring nullable

Human-readable status message

errorstring nullable

Batch-level error message, if any

{"stackTrail":"components:schemas:BatchMemoryResponse:properties:details:anyOf","oasType":"schema","type":"unknown","title":"Details","description":"Additional error details or context","nullable":true}
batch_idstring nullable

Batch tracking ID for status polling via GET /v1/memory/batch/status/{batch_id} and WebSocket updates

total_processedinteger
total_successfulinteger
total_failedinteger
total_content_sizeinteger
total_storage_sizeinteger

Changes

Changed in 11 of the 37 revisions of this API.3868

  • f29d29d1ad1613See the full diff
    • ▲

      removed from the //// request property anyOf list

      request-property-any-of-removed

    • ○

      added the new optional query request parameter enable_holographic

      new-optional-request-parameter

    • ○

      added the new optional query request parameter frequency_schema_id

      new-optional-request-parameter

    • ○

      added subschema #1 to the //// request property anyOf list

      request-property-any-of-added

    This revision also has 1 change that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog

  • 22d84aa060d6121See the full diff
    • ▲

      removed subschema #1 from the //// request property anyOf list

      request-property-any-of-removed

    • ●

      deleted the query request parameter enable_holographic

      request-parameter-removed

    • ●

      deleted the query request parameter frequency_schema_id

      request-parameter-removed

    • ○

      added to the //// request property anyOf list

      request-property-any-of-added

    This revision also has 8 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog

    • ○

      added the new optional query request parameter enable_holographic

      new-optional-request-parameter

    • ○

      added the new optional query request parameter frequency_schema_id

      new-optional-request-parameter

    This revision also has 7 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog

    • ●

      deleted the query request parameter enable_holographic

      request-parameter-removed

    • ●

      deleted the query request parameter frequency_schema_id

      request-parameter-removed

  • 02daa1da4e8213See the full diff
    • ▲

      removed from the //// request property anyOf list

      request-property-any-of-removed

    • ○

      added the new optional query request parameter enable_holographic

      new-optional-request-parameter

    • ○

      added the new optional query request parameter frequency_schema_id

      new-optional-request-parameter

    • ○

      added subschema #1 to the //// request property anyOf list

      request-property-any-of-added

    • ●

      deleted the query request parameter enable_holographic

      request-parameter-removed

    • ●

      deleted the query request parameter frequency_schema_id

      request-parameter-removed

    This revision also has 3 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog

    • ○

      added the new optional request property //

      new-optional-request-property

    • ○

      added the new optional request property

      new-optional-request-property

    • ○

      request property deprecated

      request-property-deprecated

    • ○

      request property // deprecated

      request-property-deprecated

    • ○

      request property // deprecated

      request-property-deprecated

    • ○

      request property deprecated

      request-property-deprecated

    This revision also has 1 change that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog

    • ○

      added the new optional query request parameter enable_holographic

      new-optional-request-parameter

    • ○

      added the new optional query request parameter frequency_schema_id

      new-optional-request-parameter

    • ○

      added the new optional request property ///////////

      new-optional-request-property

    • ○

      added the new optional request property ///////////

      new-optional-request-property

    • ○

      added the new optional request property /////////

      new-optional-request-property

    • ○

      added the new optional request property /////////

      new-optional-request-property

    • ○

      request property // deprecated

      request-property-deprecated

    • ○

      request property deprecated

      request-property-deprecated

    • ○

      added the optional property to the response with the status

      response-optional-property-added

    • ○

      added the optional property to the response with the status

      response-optional-property-added

    • ○

      added the optional property to the response with the status

      response-optional-property-added

    • ○

      added the optional property to the response with the status

      response-optional-property-added

    • ○

      added the optional property to the response with the status

      response-optional-property-added

    • ○

      added the optional property to the response with the status

      response-optional-property-added

    • ○

      added the optional property to the response with the status

      response-optional-property-added

    • ○

      added the optional property to the response with the status

      response-optional-property-added

    • ○

      added the optional property // to the response with the status

      response-optional-property-added

    • ○

      added the optional property // to the response with the status

      response-optional-property-added

  • 5f5df128dbcd218See the full diff
    • ●

      removed the request property ////

      request-property-removed

    • ●

      removed the request property //////

      request-property-removed

    • ○

      added the new optional request property

      new-optional-request-property

    • ○

      added the new optional request property //

      new-optional-request-property

    • ○

      added the new optional request property //

      new-optional-request-property

    • ○

      added the new optional request property //

      new-optional-request-property

    • ○

      added the new optional request property ////

      new-optional-request-property

    • ○

      added the new optional request property ////

      new-optional-request-property

    • ○

      added the new optional request property ////

      new-optional-request-property

    • ○

      added the new optional request property //

      new-optional-request-property

    • ○

      added the new optional request property

      new-optional-request-property

    • ○

      request property deprecated

      request-property-deprecated

    • ○

      request property // deprecated

      request-property-deprecated

    • ○

      request property //// deprecated

      request-property-deprecated

    • ○

      request property //// deprecated

      request-property-deprecated

    • ○

      request property //// deprecated

      request-property-deprecated

    • ○

      request property //// deprecated

      request-property-deprecated

    • ○

      request property // deprecated

      request-property-deprecated

    • ○

      request property deprecated

      request-property-deprecated

    • ○

      request property //// list-of-types was widened by adding types array to media type application/json

      request-property-list-of-types-widened

    • ○

      added the new optional request property ////

      new-optional-request-property

    • ○

      added the new optional request property ////

      new-optional-request-property

    • ○

      added the new optional request property ////

      new-optional-request-property

    • ○

      added the new optional request property ////

      new-optional-request-property