Skip to main content
POST
Add Knowledge Base Entry

Authorizations

Authorization
string
header
required

API key authentication. Use 'Authorization: Bearer YOUR_API_KEY' where YOUR_API_KEY is obtained from the Migma dashboard under Settings → Developers → API Keys.

Path Parameters

projectId
string
required

Project ID (MongoDB ObjectId)

Pattern: ^[0-9a-fA-F]{24}$

Body

application/json
title
string
required

Title of the knowledge base entry

Required string length: 1 - 100
content
string
required

Content of the knowledge base entry. Stored content is capped at 15,000 characters; anything longer is truncated with a note.

Required string length: 1 - 50000
previewHtml
string

Rendered HTML of the entry, kept as its preview. Send this for an uploaded email so it can be shown and used as a design reference.

thumbnailUrl
string

URL of a thumbnail image for the entry.

screenshotUrl
string

URL of a full screenshot of the entry.

referenceOrigin
enum<string>

Marks the entry as a design reference the email writer should learn from, and records where it came from. Omit for an ordinary note — an entry without it is never treated as a reference.

Available options:
favorite,
upload,
manual

Response

Knowledge base entry added

success
boolean
required
data
object
error
string | null
Last modified on September 1, 2026