> ## Documentation Index
> Fetch the complete documentation index at: https://supermemory-temp-snowcone-command.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Update document

> Update a document with any content type (text, url, file, etc.) and metadata



## OpenAPI

````yaml https://api.supermemory.ai/v3/openapi patch /v3/documents/{id}
openapi: 3.1.0
info:
  title: supermemory API
  description: The Memory API for the AI era
  version: 3.0.0
servers:
  - description: Production Server
    url: https://api.supermemory.ai
security:
  - bearerAuth: []
tags:
  - name: Ingest
    description: Ingest documents, files, URLs, conversations, and other content
  - name: Recall (Search)
    description: >-
      Semantic recall across your content — supports memories, hybrid, and
      documents modes
  - name: Profiles
    description: >-
      Entity profiles for users, participants, or any entity — includes profile
      search
  - name: Content Management
    description: List, get, update, and delete content and memories
  - name: Spaces
    description: Organize content into spaces (container tags)
  - name: Knowledge Graph
    description: Knowledge graph and entity relationships
  - name: Connections
    description: External service integrations
  - name: Settings
    description: Organization settings
  - name: Analytics
    description: Usage analytics and insights
  - name: Documents
    description: List, get, and search documents
paths:
  /v3/documents/{id}:
    patch:
      tags:
        - Ingest
      summary: Update document
      description: >-
        Update a document with any content type (text, url, file, etc.) and
        metadata
      operationId: patchV3DocumentsById
      parameters:
        - in: path
          name: id
          schema:
            type: string
          required: true
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                containerTag:
                  description: >-
                    Optional tag this document should be containerized by. This
                    can be an ID for your user, a project ID, or any other
                    identifier you wish to use to group documents.
                  example: user_alex
                  type: string
                  maxLength: 100
                  pattern: ^[a-zA-Z0-9_:-]+$
                containerTags:
                  description: >-
                    (DEPRECATED: Use containerTag instead) Optional tags this
                    document should be containerized by. This can be an ID for
                    your user, a project ID, or any other identifier you wish to
                    use to group documents.
                  deprecated: true
                  hidden: true
                  type: array
                  items:
                    type: string
                    maxLength: 100
                    pattern: ^[a-zA-Z0-9_:-]+$
                content:
                  type: string
                  description: >-
                    The content to extract and process into a document. This can
                    be a URL to a website, a PDF, an image, or a video. 


                    Plaintext: Any plaintext format


                    URL: A URL to a website, PDF, image, or video


                    We automatically detect the content type from the url's
                    response format.
                  example: >-
                    Our API rate limits are 100 req/min on free and 1000 on pro.
                    Clients should use exponential backoff on 429s.
                customId:
                  description: >-
                    Optional custom ID of the document. This could be an ID from
                    your database that will uniquely identify this document.
                  example: doc-api-rate-limits
                  type: string
                metadata:
                  description: >-
                    Optional metadata for the document. This is used to store
                    additional information about the document. You can use this
                    to store any additional information you need about the
                    document. Metadata can be filtered through. Keys must be
                    strings and are case sensitive. Values can be strings,
                    numbers, or booleans. You cannot nest objects.
                  example:
                    source: upload
                    language: en
                  type: object
                  propertyNames:
                    type: string
                  additionalProperties:
                    anyOf:
                      - type: string
                      - type: number
                      - type: boolean
                      - type: array
                        items:
                          type: string
                taskType:
                  description: >-
                    Task type: "memory" (default) for full context layer with
                    SuperRAG built in, "superrag" for managed RAG as a service.
                  example: memory
                  type: string
                  enum:
                    - memory
                    - superrag
                filepath:
                  description: >-
                    Optional file path for the document (e.g.,
                    '/documents/reports/file.pdf'). Used by supermemoryfs to map
                    documents to filesystem paths.
                  example: /documents/reports/file.pdf
                  hidden: true
                  type: string
                filterByMetadata:
                  description: >-
                    Optional metadata filter scoping which existing memories are
                    pulled as context during ingestion. Scalar values match
                    exactly (AND across keys); array values match ANY (OR within
                    key). Only memories whose source documents match this filter
                    are used as context.
                  example:
                    department: engineering
                    region: us
                  type: object
                  propertyNames:
                    type: string
                  additionalProperties:
                    anyOf:
                      - type: string
                      - type: number
                      - type: boolean
                      - type: array
                        items:
                          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                required:
                  - id
                  - status
                properties:
                  id:
                    type: string
                    description: Unique identifier of the document
                  status:
                    type: string
                    description: Status of the document
                additionalProperties: false
          description: Document updated successfully
        '401':
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                    description: Error message
                  details:
                    type: string
                    description: Additional error details
                additionalProperties: false
          description: Unauthorized
        '404':
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                    description: Error message
                  details:
                    type: string
                    description: Additional error details
                additionalProperties: false
          description: Document not found
        '500':
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                    description: Error message
                  details:
                    type: string
                    description: Additional error details
                additionalProperties: false
          description: Internal server error
components:
  securitySchemes:
    bearerAuth:
      scheme: bearer
      type: http

````