Skip to main content
POST
/
v1
/
posts
Create a post with markdown
import { ParagraphAPI } from "@paragraph-com/sdk"

const api = new ParagraphAPI({ apiKey: "your-api-key" })
const result = await api.posts.create({
  title: "My First Post",
  markdown: "# Hello World\n\nThis is my first post!",
  sendNewsletter: true
})
{
  "id": "<string>"
}

Authorizations

Authorization
string
header
required

API key for authenticating protected endpoints. Pass as Bearer token in Authorization header.

Body

application/json

Body

markdown
string
required

Post content in Markdown format

title
string
required

Title of the post

Maximum string length: 200
subtitle
string

Optional subtitle or brief summary

Maximum string length: 300
imageUrl
string<uri>

Optional URL to the post's cover image

sendNewsletter
boolean

Whether to send an email newsletter to subscribers. Default: false

slug
string

Optional URL-friendly identifier for the post. If not provided, will be generated from title

Required string length: 1 - 256
postPreview
string

Optional preview text for the post. If not provided, will be generated from content

Maximum string length: 500
categories
string[]

Optional array of category tags for the post

Response

Post created successfully

id
string
required

The ID of the created post