Skip to main content
GET
/
cms
/
posts
/
{slug}
Get a blog post
curl --request GET \
  --url https://api.marzipan.co/v1/cms/posts/{slug} \
  --header 'Authorization: Bearer <token>'
import requests

url = "https://api.marzipan.co/v1/cms/posts/{slug}"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.text)
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

fetch('https://api.marzipan.co/v1/cms/posts/{slug}', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => "https://api.marzipan.co/v1/cms/posts/{slug}",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => [
    "Authorization: Bearer <token>"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.marzipan.co/v1/cms/posts/{slug}"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://api.marzipan.co/v1/cms/posts/{slug}")
  .header("Authorization", "Bearer <token>")
  .asString();
require 'uri'
require 'net/http'

url = URI("https://api.marzipan.co/v1/cms/posts/{slug}")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
{
  "slug": "welcome-to-our-store",
  "title": "Welcome to our store",
  "excerpt": "A short introduction to what we do.",
  "content": "<p>Full HTML content of the post.</p>",
  "featuredImage": "https://cdn.marzipan.co/media/1200x800/welcome.jpg",
  "author": {
    "name": "Jane Doe"
  },
  "seo": {
    "title": "Welcome to our store",
    "description": "Everything you need to know to get started.",
    "ogImage": "https://cdn.marzipan.co/media/1200x630/welcome.jpg"
  },
  "collections": [
    {
      "slug": "news",
      "name": "News"
    }
  ],
  "createdAt": "2026-05-01T09:00:00Z",
  "updatedAt": "2026-05-02T11:30:00Z"
}
{
  "message": "Post not found"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your API token.

Path Parameters

slug
string
required

URL-friendly identifier of the blog post.

Response

The requested blog post.

Full detail of a published blog post.

slug
string

URL-friendly post identifier.

title
string

Post title.

excerpt
string

Short summary of the post.

content
string

Full post content/body (HTML).

Featured image URL (1200x800). Falls back to the tenant's social image if none is set.

author
object

The post's author.

seo
object

SEO metadata for the post.

collections
object[]

Collections this post belongs to.

createdAt
string<date-time>

Creation timestamp.

updatedAt
string<date-time>

Last update timestamp.