Skip to main content
GET
/
v1
/
posts
/
{identifier}
Get a post
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"
      }
    ]
  }
}

Authorizations

Authorization
string
header
required

Your Marble API key

Path Parameters

identifier
string
required

Post ID or slug

Example:

"my-post-slug"

Query Parameters

format
enum<string>

Content format (html or markdown)

Available options:
html,
markdown
Example:

"html"

Response

The requested post

post
object
required