Skip to main content
POST
Create post

Authorizations

Authorization
string
header
required

Your Marble API key

Body

application/json
title
string
required
Minimum string length: 1
Example:

"Getting Started with Next.js"

content
string
required
Minimum string length: 1
Example:

"<p>Hello world</p>"

description
string
required
Minimum string length: 1
Example:

"A beginner's guide to Next.js"

slug
string
required
Minimum string length: 1
Example:

"getting-started-with-nextjs"

categoryId
string
required
Minimum string length: 1
Example:

"cryitfjp2345kl05weoybfk9"

status
enum<string>
required
Available options:
published,
draft
Example:

"draft"

tags
string[]

Array of tag IDs to attach to the post

Example:
authors
string[]

Array of author IDs. If omitted, the first workspace author is used.

Example:
Example:

false

coverImage
string<uri> | null
Example:

"https://media.marblecms.com/cover.jpg"

publishedAt
string<date-time>

ISO 8601 datetime. Defaults to current time if omitted.

Example:

"2024-01-15T10:00:00Z"

fields
object

Custom field values keyed by field key. Select values must use option values; multiselect values must be arrays of option values. Use null to clear optional fields.

Example:

Response

Post created successfully

post
object
required