v1
latestOpenAPI 3.1.02026-07-13305453.8 KBPosts
Create post
Create a new post. Requires a private API key. Category is required. If authors are not provided, the first workspace author is used.
post/v1/posts
Request body
Example request
{
"title": "Getting Started with Next.js",
"content": "<p>Hello world</p>",
"description": "A beginner's guide to Next.js",
"slug": "getting-started-with-nextjs",
"categoryId": "cryitfjp2345kl05weoybfk9",
"status": "draft",
"tags": [
"cryitfjp4567no07ygqadhm1"
],
"authors": [
"cryitfjp3456lm06xfpzcgl0"
],
"coverImage": "https://media.marblecms.com/cover.jpg",
"publishedAt": "2024-01-15T10:00:00Z",
"fields": {
"release_date": "2024-01-15",
"priority_score": 5,
"audience": [
"developers",
"founders"
],
"featured_customer": true,
"subtitle": null
}
}Response
Post created successfully
Example response
{
"post": {
"id": "cryitfjp5678mn09qrstuvwx",
"slug": "getting-started-with-nextjs",
"title": "Getting Started with Next.js",
"status": "draft",
"publishedAt": "2024-01-15T10:00:00.000Z",
"createdAt": "2024-01-15T10:00:00.000Z"
}
}