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

# Create Note

> Create a note with an optional note ID, timestamps, and collection links.
If omitted, Mem generates the note ID.
The first line of `content` becomes the note title.



## OpenAPI

````yaml POST /v2/notes
openapi: 3.1.0
info:
  title: Mem API
  description: An API that allows you to interact with the Mem platform.
  version: 1.0.0
servers:
  - url: https://api.mem.ai
security:
  - bearerAuth: []
paths:
  /v2/notes:
    post:
      tags:
        - external
        - external-v2
      summary: Create Note
      description: >-
        Create a note with an optional note ID, timestamps, and collection
        links.

        If omitted, Mem generates the note ID.

        The first line of `content` becomes the note title.
      operationId: app_src_api_routes_external_v2_notes_views_create_note
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateNoteRequestSchema'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateNoteResponseSchema'
      x-codeSamples:
        - lang: bash
          label: cURL
          source: |2-
                                curl "https://api.mem.ai/v2/notes" \
                                     --header "Content-Type: application/json" \
                                     --header "Authorization: Bearer $MEM_API_KEY" \
                                     --data '{
                                         "content": "# Sales Call with Acme Corp

            Contact: John Smith (john@acme.com)

            Interested in enterprise plan. Follow up next week.",
                                     }'
                                
components:
  schemas:
    CreateNoteRequestSchema:
      properties:
        id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          description: |-
            Optional UUID for the note.
            If omitted, Mem generates a new UUID.
          title: Id
        content:
          description: >-
            Full markdown body for the note.

            Send the full desired note body (partial patch semantics are not
            supported here).

            IMPORTANT: The first line is interpreted as the note title.

            Maximum: 200,000 characters (and no more than 200,000 UTF-8 bytes on
            create).
          examples:
            - |-
              # Meeting with Product Team

              Discussion Topics:
              - Roadmap updates
              - Feature prioritization

              Action Items:
              - Schedule follow-up with design
              - Share Q2 priorities document
          maxLength: 200000
          title: Content
          type: string
        collection_ids:
          anyOf:
            - type: array
              items:
                type: string
                format: uuid
            - type: 'null'
          description: |-
            Optional collection IDs to associate with the note.
            IDs that do not map to accessible collections are ignored.
          title: Collection Ids
        collection_titles:
          anyOf:
            - items:
                description: >-
                  Collection title used for exact case-insensitive matching in
                  `collection_titles`.

                  Maximum: 1,000 characters.
                maxLength: 1000
                type: string
              type: array
            - type: 'null'
          description: >-
            Optional collection titles to associate with the note.

            Matching is case-insensitive exact match; titles with no match are
            ignored.

            Maximum per title: 1,000 characters (and no more than 1,000 UTF-8
            bytes).
          examples:
            - - Acme Corp
              - Project Phoenix
          title: Collection Titles
        created_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          description: >-
            Optional creation timestamp (ISO 8601).

            If provided, it must include a timezone offset and cannot be in the
            future.

            If omitted, Mem uses `updated_at` when provided; otherwise current
            server time.
          examples:
            - '2025-04-01T14:30:45Z'
            - '2023-12-15T09:45:30+01:00'
          title: Created At
        updated_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          description: >-
            Optional "last updated" timestamp for this write (ISO 8601).

            If provided, it must include a timezone offset and cannot be in the
            future.

            If omitted, Mem uses the current server time for the initial content
            write.
          examples:
            - '2025-04-02T09:15:22Z'
            - '2023-12-15T09:45:30+01:00'
          title: Updated At
      required:
        - content
      title: CreateNoteRequestSchema
      type: object
    CreateNoteResponseSchema:
      example:
        collection_ids:
          - 59508b41-8770-4855-aa37-302b1e09aee7
          - 026b426c-14fb-4f22-8d98-7a9121bfaec8
        content: |-
          # Sales Call with Acme Corp

          Contact: John Smith (john@acme.com)

          Interested in enterprise plan. Follow up next week.

          ## Action Items
          - Schedule follow-up call next week
          - Send enterprise pricing information

          ## Key Points
          - Interested in enterprise plan
          - Contact: John Smith (john@acme.com)
        created_at: '2025-04-11T04:47:14.457Z'
        id: 5e29c8a2-c73b-476b-9311-e2579712d4b1
        request_id: api-request-036ed6c7-de00-459f-a89b-43d26aafe522
        title: Sales Call with Acme Corp
        updated_at: '2025-04-11T04:47:19.702Z'
        version: 2
      properties:
        request_id:
          description: Identifier for this API request. Useful for tracing and support.
          title: Request Id
          type: string
        id:
          description: UUID of the created note.
          format: uuid
          title: Id
          type: string
        title:
          description: Current note title, derived from the first line of markdown content.
          title: Title
          type: string
        content:
          description: Full markdown content stored for the note.
          title: Content
          type: string
        version:
          description: Current note content document version after this write.
          title: Version
          type: integer
        collection_ids:
          description: Collection UUIDs currently associated with this note.
          items:
            type: string
            format: uuid
          title: Collection Ids
          type: array
        created_at:
          description: Creation timestamp for the note in ISO 8601 format.
          format: date-time
          title: Created At
          type: string
        updated_at:
          description: Last modification timestamp for the note in ISO 8601 format.
          format: date-time
          title: Updated At
          type: string
      required:
        - request_id
        - id
        - title
        - content
        - version
        - collection_ids
        - created_at
        - updated_at
      title: CreateNoteResponseSchema
      type: object
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````