Skip to Content
Pins APIPin Types & Schemas

Pin Types & Schemas

Every pin uses pin_type + pin_config. The API validates pin_config against the schema for that type. Invalid payloads return 400 with code PIN_CONFIG_INVALID.

{ "pin_type": "<type-id>", "pin_config": { /* shape depends on type — see below */ }, "metadata": { "title": "Required title" } }

TypeScript types are exported from @pindownai/client-js (e.g. MarkdownPinConfig, StatCardsPinConfig, PinConfigByType).

Legend: required fields must be present. All other documented fields are optional unless marked required in a nested object.


Content & text

markdown

Rich text content. Server enables Yjs collaboration when content is provided.

FieldTypeRequiredDescription
contentstringNoMarkdown body
collaboration.enabledbooleanNoSet automatically by the server when seeding content
{ "pin_type": "markdown", "pin_config": { "content": "# Weekly report\n\n- Revenue up 18%\n- 3 new customers" }, "metadata": { "title": "Weekly report" } }

text-media

Text block alongside an image or embed. Set mediaType to "image" or "embed", then provide the matching config object.

FieldTypeRequiredDescription
titlestringNoMain headline
textstringNoBody copy
subtextstringNoSecondary paragraph
textPositionstringNo"left" or "right" — text side relative to media
mediaTypestringNo"image" or "embed"
imageConfig.urlstringNo*Image URL (when mediaType is "image")
imageConfig.altstringNoImage alt text
imageConfig.fileIdstringNoReference to an uploaded file
embedConfig.typestringNo*e.g. "youtube", "loom", "figma"
embedConfig.urlstringNo*Embed URL (when mediaType is "embed")
embedConfig.aspectRatiostringNoe.g. "16:9", "4:3"

* Provide imageConfig when using an image, or embedConfig when using an embed.

Image example:

{ "pin_type": "text-media", "pin_config": { "title": "Product launch", "text": "Summary of the Q1 launch initiative.", "subtext": "Shipped to all workspace customers.", "textPosition": "left", "mediaType": "image", "imageConfig": { "url": "https://example.com/hero-screenshot.png", "alt": "Dashboard screenshot" } }, "metadata": { "title": "Launch hero" } }

Embed example:

{ "pin_type": "text-media", "pin_config": { "title": "Product demo", "text": "Watch the 2-minute walkthrough.", "textPosition": "right", "mediaType": "embed", "embedConfig": { "type": "youtube", "url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ", "aspectRatio": "16:9" } }, "metadata": { "title": "Demo video" } }

intro

Section intro / heading block.

FieldTypeRequiredDescription
headingstringYesMain heading
subheadingstringNoSecondary line
{ "pin_type": "intro", "pin_config": { "heading": "Project overview", "subheading": "Q1 initiative" }, "metadata": { "title": "Intro" } }

image

Single image display.

FieldTypeRequiredDescription
urlstringNoImage URL
altTextstringNoAlt text
fitstringNo"cover", "contain", etc.
{ "pin_type": "image", "pin_config": { "url": "https://example.com/photo.png", "altText": "Dashboard screenshot", "fit": "cover" }, "metadata": { "title": "Screenshot" } }

Grid of images.

FieldTypeRequiredDescription
imagesarrayNoList of image objects
images[].urlstringNoImage URL
images[].altstringNoAlt text
images[].fileIdstringNoReference to an uploaded file
{ "pin_type": "gallery", "pin_config": { "images": [ { "url": "https://example.com/a.png", "alt": "Slide A" }, { "url": "https://example.com/b.png", "alt": "Slide B" } ] }, "metadata": { "title": "Photo gallery" } }

Data & metrics

stat-cards

KPI cards with optional trend indicators.

FieldTypeRequiredDescription
cardsarrayYes (min 1)Stat card list
cards[].titlestringYesMetric label
cards[].valuestring | numberYesMetric value
cards[].changestringNoChange label, e.g. "+18.2%"
cards[].trendstringNo"up", "down", "neutral"
cards[].iconstringNoIcon identifier
{ "pin_type": "stat-cards", "pin_config": { "cards": [ { "title": "Revenue", "value": "$125,430", "change": "+18.2%", "trend": "up" }, { "title": "Users", "value": 1234, "change": "+5%", "trend": "up" } ] }, "pin_layout": "2x1", "metadata": { "title": "KPI dashboard" } }

charts

Data visualizations (line, bar, pie, area, radar, etc.).

FieldTypeRequiredDescription
chartTypestringNoe.g. "line", "bar", "pie", "area", "radar"
titlestringNoChart title
dataarrayNoData points (objects with arbitrary keys)
xAxisstringNoKey used for X axis
yAxisstringNoKey used for Y axis
dataKeysstring[]NoSeries keys to plot
{ "pin_type": "charts", "pin_config": { "chartType": "line", "title": "API calls", "xAxis": "name", "yAxis": "value", "dataKeys": ["value"], "data": [ { "name": "Mon", "value": 1200 }, { "name": "Tue", "value": 1450 }, { "name": "Wed", "value": 1680 } ] }, "pin_layout": "2x2", "metadata": { "title": "API traffic" } }

table

Tabular data with typed columns.

FieldTypeRequiredDescription
columnsarrayYes (min 1)Column definitions
columns[].idstringYesColumn key (used in row cells)
columns[].namestringYesColumn header label
columns[].typestringNoe.g. "text", "number", "date"
rowsarrayNoRow objects
rows[].idstringNoRow identifier
rows[].cellsobjectNo{ [columnId]: value }
{ "pin_type": "table", "pin_config": { "columns": [ { "id": "product", "name": "Product", "type": "text" }, { "id": "sales", "name": "Sales", "type": "number" } ], "rows": [ { "id": "r1", "cells": { "product": "Widget A", "sales": 1250 } }, { "id": "r2", "cells": { "product": "Widget B", "sales": 890 } } ] }, "pin_layout": "2x2", "metadata": { "title": "Sales table" } }

json-viewer

Pretty-printed JSON object.

FieldTypeRequiredDescription
jsonanyNoParsed JSON value
jsonStringstringNoJSON as string (alternative to json)
titlestringNoViewer title
{ "pin_type": "json-viewer", "pin_config": { "json": { "status": "ok", "count": 42 }, "jsonString": "{\"status\":\"ok\",\"count\":42}", "title": "API response" }, "metadata": { "title": "Payload viewer" } }

json-list

JSON array viewer.

FieldTypeRequiredDescription
jsonarrayNoParsed JSON array
jsonStringstringNoJSON array as string
{ "pin_type": "json-list", "pin_config": { "json": [{ "id": 1, "name": "Alpha" }, { "id": 2, "name": "Beta" }], "jsonString": "[{\"id\":1,\"name\":\"Alpha\"}]" }, "metadata": { "title": "Records list" } }

csv-viewer

CSV data rendered as a table.

FieldTypeRequiredDescription
csvTextstringNoRaw CSV text
csvDataarrayNoParsed rows as objects
fileNamestringNoDisplay name
{ "pin_type": "csv-viewer", "pin_config": { "csvText": "name,value\nalpha,1\nbeta,2", "csvData": [ { "name": "alpha", "value": 1 }, { "name": "beta", "value": 2 } ], "fileName": "export.csv" }, "metadata": { "title": "CSV export" } }

Files & embeds

embed

Embedded video or external content.

FieldTypeRequiredDescription
urlstringNoEmbed URL
typestringNoe.g. "youtube", "vimeo", "loom"
{ "pin_type": "embed", "pin_config": { "url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ", "type": "youtube" }, "metadata": { "title": "Demo video" } }

pdf-viewer

Inline PDF viewer.

FieldTypeRequiredDescription
pdf.urlstringYesPDF file URL
pdf.fileNamestringNoDisplay filename
pdf.titlestringNoDocument title
{ "pin_type": "pdf-viewer", "pin_config": { "pdf": { "url": "https://example.com/report.pdf", "fileName": "report.pdf", "title": "Q4 Report" } }, "metadata": { "title": "PDF report" } }

excel-viewer

Inline Excel spreadsheet viewer.

FieldTypeRequiredDescription
excel.urlstringYesSpreadsheet URL
excel.fileNamestringNoDisplay filename
excel.titlestringNoDocument title
{ "pin_type": "excel-viewer", "pin_config": { "excel": { "url": "https://example.com/data.xlsx", "fileName": "data.xlsx", "title": "Sales data" } }, "metadata": { "title": "Spreadsheet" } }

file-upload

List of uploaded files.

FieldTypeRequiredDescription
filesarrayNoFile metadata objects
displayModestringNoe.g. "list", "grid"
{ "pin_type": "file-upload", "pin_config": { "files": [], "displayMode": "list" }, "metadata": { "title": "Attachments" } }

Diagrams & planning

mermaid

Mermaid diagram (flowchart, sequence, gantt, etc.). Requires code or diagram.

FieldTypeRequiredDescription
codestringYes¹Mermaid source
diagramstringYes¹Alternative to code
titlestringNoDiagram title

¹ At least one of code or diagram must be non-empty.

{ "pin_type": "mermaid", "pin_config": { "code": "graph TD\n A[Start] --> B{Decision}\n B -->|Yes| C[Done]\n B -->|No| D[Retry]", "title": "Flow" }, "metadata": { "title": "Architecture diagram" } }

timeline

Chronological timeline.

FieldTypeRequiredDescription
modestringNoe.g. "alternating", "left", "right"
itemsarrayNoTimeline entries
items[].titlestringNoDate or label
items[].cardTitlestringNoEvent title
items[].cardDetailedTextstringNoEvent description
{ "pin_type": "timeline", "pin_config": { "mode": "alternating", "items": [ { "title": "2024-01-01", "cardTitle": "Launch", "cardDetailedText": "Shipped v1 to production" }, { "title": "2024-06-01", "cardTitle": "Series A", "cardDetailedText": "Closed funding round" } ] }, "metadata": { "title": "Company timeline" } }

steps

Numbered step-by-step process.

FieldTypeRequiredDescription
stepsarrayYes (min 1)Step list
steps[].titlestringYesStep title
steps[].descriptionstringNoStep details
{ "pin_type": "steps", "pin_config": { "steps": [ { "title": "Install SDK", "description": "npm install @pindownai/client-js" }, { "title": "Create API key", "description": "Workspace plan → Settings → API" }, { "title": "Push first pin", "description": "POST /v1/pins" } ] }, "metadata": { "title": "Getting started" } }

roadmap

Monthly roadmap grid.

FieldTypeRequiredDescription
titlestringNoRoadmap title
monthsarrayNoMonth columns
months[].monthstringNoMonth label
months[].itemsarrayNoItems in that month
months[].items[].idstringNoItem id
months[].items[].textstringNoItem label
{ "pin_type": "roadmap", "pin_config": { "title": "Product roadmap", "months": [ { "month": "May", "items": [{ "id": "m1", "text": "API v1" }] }, { "month": "Jun", "items": [{ "id": "m2", "text": "Mobile app" }] } ] }, "metadata": { "title": "Roadmap" } }

calendar

Calendar with events.

FieldTypeRequiredDescription
weekStartsOnnumberNo0 = Sunday, 1 = Monday
eventsarrayNoCalendar events
events[].idstringNoEvent id
events[].titlestringNoEvent title
events[].startstringNoStart date (YYYY-MM-DD)
events[].endstringNoEnd date
{ "pin_type": "calendar", "pin_config": { "weekStartsOn": 0, "events": [ { "id": "e1", "title": "Sprint review", "start": "2026-05-01", "end": "2026-05-01" }, { "id": "e2", "title": "Release", "start": "2026-05-15", "end": "2026-05-15" } ] }, "metadata": { "title": "Team calendar" } }

kanban-board

Kanban board with columns and cards.

FieldTypeRequiredDescription
columnsarrayYes (min 1)Board columns
columns[].idstringYesColumn id
columns[].titlestringYesColumn title
columns[].cardsarrayNoCards in column
{ "pin_type": "kanban-board", "pin_config": { "columns": [ { "id": "todo", "title": "To do", "cards": [{ "id": "c1", "title": "Design API" }] }, { "id": "done", "title": "Done", "cards": [] } ] }, "metadata": { "title": "Sprint board" } }

checklist

Checklist with toggleable items.

FieldTypeRequiredDescription
titlestringNoChecklist title
itemsarrayYes (min 1)Checklist rows
items[].idstringYesItem id
items[].namestringYesItem label
items[].checkedbooleanNoChecked state
{ "pin_type": "checklist", "pin_config": { "title": "Launch checklist", "items": [ { "id": "c1", "name": "QA pass", "checked": false }, { "id": "c2", "name": "Deploy prod", "checked": false } ] }, "metadata": { "title": "Launch checklist" } }

Collection of link cards.

FieldTypeRequiredDescription
linksarrayNoLink entries
links[].titlestringNoLink title
links[].urlstringNoLink URL
links[].descriptionstringNoShort description
{ "pin_type": "links", "pin_config": { "links": [ { "title": "Documentation", "url": "https://pindown.ai" }, { "title": "GitHub", "url": "https://github.com/pindownai" } ] }, "metadata": { "title": "Useful links" } }

Stories, chat & agents

user-story

User story with acceptance criteria.

FieldTypeRequiredDescription
userStorystringYesUser story text
titlestringNoStory title
acceptanceCriteriastringNoGiven/When/Then criteria
{ "pin_type": "user-story", "pin_config": { "title": "Login", "userStory": "As a user,\nI want to log in\nso that I can access my workspace.", "acceptanceCriteria": "Given valid credentials\nWhen I sign in\nThen I reach the home page" }, "metadata": { "title": "US-101 Login" } }

chat

Chat / discussion placeholder.

FieldTypeRequiredDescription
titlestringNoChat title
placeholderstringNoInput placeholder text
{ "pin_type": "chat", "pin_config": { "title": "Team chat", "placeholder": "Write a message…" }, "metadata": { "title": "Discussion" } }

mastra

Mastra workflow or agent pin. Schema is open — pass workflow/agent identifiers as needed.

FieldTypeRequiredDescription
modestringNo"workflow" or "agent"
workflowIdstringNoMastra workflow id
agentIdstringNoMastra agent id
{ "pin_type": "mastra", "pin_config": { "mode": "workflow", "workflowId": "my-workflow-id" }, "metadata": { "title": "Automation runner" } }

realtime-canvas

Collaborative whiteboard / canvas room.

FieldTypeRequiredDescription
titlestringNoCanvas title
descriptionstringNoShort description
roomIdstringNoRealtime room identifier
{ "pin_type": "realtime-canvas", "pin_config": { "title": "Brainstorm", "description": "Sprint planning whiteboard", "roomId": "room-sprint-42" }, "metadata": { "title": "Whiteboard" } }

Validation errors

CodeWhen
INVALID_PIN_TYPEUnknown pin_type value
PIN_CONFIG_INVALIDpin_config fails schema for the given type
metadata.title is requiredMissing title on create

Next steps