Get a single published post by ID or slug
curl --request GET \
--url https://api.marblecms.com/v1/posts/{identifier} \
--header 'Authorization: Bearer <token>'{
"post": {
"id": "clx000post",
"slug": "getting-started-with-nextjs",
"title": "Getting Started with Next.js",
"content": "<p>Hello world</p>",
"featured": false,
"coverImage": "https://cdn.example.com/cover.jpg",
"description": "A beginner's guide to Next.js",
"publishedAt": "2024-01-15T10:00:00Z",
"updatedAt": "2024-01-16T12:00:00Z",
"attribution": "Photo by Unsplash",
"authors": [
{
"id": "clx123abc",
"name": "John Doe",
"image": "https://cdn.example.com/avatar.jpg",
"bio": "Technical writer and developer",
"role": "Editor",
"slug": "john-doe",
"socials": [
{
"url": "https://twitter.com/johndoe",
"platform": "twitter"
}
]
}
],
"category": {
"id": "clx456def",
"name": "Technology",
"slug": "technology",
"description": "Tech news and tutorials"
},
"tags": [
{
"id": "clx789ghi",
"name": "JavaScript",
"slug": "javascript",
"description": "JavaScript tutorials"
}
]
}
}Your Marble API key
Post ID or slug
"my-post-slug"
Content format (html or markdown)
html, markdown "html"
The requested post
Show child attributes
Was this page helpful?
curl --request GET \
--url https://api.marblecms.com/v1/posts/{identifier} \
--header 'Authorization: Bearer <token>'{
"post": {
"id": "clx000post",
"slug": "getting-started-with-nextjs",
"title": "Getting Started with Next.js",
"content": "<p>Hello world</p>",
"featured": false,
"coverImage": "https://cdn.example.com/cover.jpg",
"description": "A beginner's guide to Next.js",
"publishedAt": "2024-01-15T10:00:00Z",
"updatedAt": "2024-01-16T12:00:00Z",
"attribution": "Photo by Unsplash",
"authors": [
{
"id": "clx123abc",
"name": "John Doe",
"image": "https://cdn.example.com/avatar.jpg",
"bio": "Technical writer and developer",
"role": "Editor",
"slug": "john-doe",
"socials": [
{
"url": "https://twitter.com/johndoe",
"platform": "twitter"
}
]
}
],
"category": {
"id": "clx456def",
"name": "Technology",
"slug": "technology",
"description": "Tech news and tutorials"
},
"tags": [
{
"id": "clx789ghi",
"name": "JavaScript",
"slug": "javascript",
"description": "JavaScript tutorials"
}
]
}
}