Skip to main content

Overview

Use this endpoint to retrieve a single blog post from your Marble CMS workspace by its slug or ID. You can request content in HTML or Markdown format.
curl "https://api.marblecms.com/v1/cm6ytuq9x0000i803v0isidst/posts/introducing-marblecms"
{
  "post": {
    "id": "clt92n38p000108l48zkj41an",
    "slug": "introducing-marblecms",
    "title": "Introducing Marble",
    "content": "<h1>Hello World!</h1><p>This is the content of the post.</p>",
    "featured": true,
    "description": "The modern headless CMS for modern web applications.",
    "coverImage": "...",
    "publishedAt": "2024-03-05T00:00:00.000Z",
    "authors": [
      {
        "id": "clt92f96m000008l4gken6v2t",
        "name": "John Doe",
        "slug": "john-doe",
        "image": "...",
        "bio": "John is a software developer and writer.",
        "role": "Software Developer",
        "socials": [
          {
            "url": "https://twitter.com/johndoe",
            "platform": "x"
          }
        ]
      }
    ],
    "category": {
      "id": "clt92hrnp000208l43kbo28d0",
      "name": "Announcements",
      "slug": "announcements",
      "description": "Latest news and updates.",
      "count": {
        "posts": 5
      }
    },
    "tags": [
      {
        "id": "clt92hrnp000308l4ajp74b32",
        "name": "Tutorials",
        "slug": "tutorials",
        "description": null,
        "count": {
          "posts": 12
        }
      }
    ],
    "attribution": null
  }
}

Path Parameters

identifier
string
required
The slug or id of the post to retrieve.

Query Parameters

format
string
The format of the content field in the response. Set to markdown to return the content as markdown instead of HTML.