Project Editing

Add Knowledge Base Entry

Changed on

Add a new knowledge base entry to a project. Requires project:write permission.

post/v1/projects/{projectId}/knowledge-base

Request

  • Base URL
    https://api.migma.ai
  • URL
    https://api.migma.ai/v1/projects/{projectId}/knowledge-base
  • Auth
    API key in header Authorization

Path parameters

projectIdstring required

Project ID (MongoDB ObjectId)

Request body

sourceFileNamestring

Original upload filename, including .html, .eml, or .mjml. An empty string clears a previous filename on update.

titlestring required

Title of the knowledge base entry

contentstring required

Entry content, up to 512000 UTF-8 bytes. Declared email references keep the full original and prepare editable source in the background. HTML, EML, and MJML must fit 250000 UTF-8 bytes after email-source cleanup. Ordinary notes are truncated at 15,000 characters; explicit instructions over 15,000 characters are rejected.

previewHtmlstring

Rendered HTML preview. For email references prepared in the background, the server creates this from the completed email source.

thumbnailUrlstring

URL of a thumbnail image for the entry.

screenshotUrlstring

URL of a full screenshot of the entry.

referenceKind'email' | 'instructions'

Use instructions for explicitly approved design guidance such as footer rules. Instructions are limited to 15,000 characters and rejected rather than truncated. Omit to keep existing email-example behavior.

referenceOrigin'favorite' | 'upload' | 'manual'

Marks the entry as a design reference the email writer should learn from, and records where it came from. Omit for an ordinary note — omit referenceKind too for an ordinary knowledge entry.

Response

Knowledge base entry added

successboolean required
errorstring nullable

Changes

    • info

      added the new optional request property

    • info

      added the new optional request property

    • info

      the request property's maxLength was increased from 50000 to 512000

    • info

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

    • info

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

    • info

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

    • info

      added the new optional request property

    • info

      added the new optional request property

    • info

      added the new optional request property

    • info

      added the new optional request property

    • info

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

    • info

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

    • info

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

    • info

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