Skip to main content
GET
/
v1
/
categories
/
:identifier
curl -H "Authorization: Bearer YOUR_API_KEY" \
  "https://api.marblecms.com/v1/categories/tutorials"
{
  "id": "clt92hrnp000308l4ajp74b32",
  "name": "Tutorials",
  "slug": "tutorials",
  "description": null,
  "count": {
    "posts": 12
  },
  "posts": {
    "data": [
      {
        "id": "clt92n38p000108l48zkj41an",
        "title": "Getting Started with Marble",
        "slug": "getting-started-with-marble",
        "description": "A beginner's guide to Marble CMS.",
        "coverImage": "https://cdn.marblecms.com/images/cover.jpg",
        "publishedAt": "2024-03-05T00:00:00.000Z"
      }
    ],
    "pagination": {
      "limit": 20,
      "currentPage": 1,
      "nextPage": null,
      "previousPage": null,
      "totalPages": 1,
      "totalItems": 12
    }
  }
}
curl -H "Authorization: Bearer YOUR_API_KEY" \
  "https://api.marblecms.com/v1/categories/tutorials"
{
  "id": "clt92hrnp000308l4ajp74b32",
  "name": "Tutorials",
  "slug": "tutorials",
  "description": null,
  "count": {
    "posts": 12
  },
  "posts": {
    "data": [
      {
        "id": "clt92n38p000108l48zkj41an",
        "title": "Getting Started with Marble",
        "slug": "getting-started-with-marble",
        "description": "A beginner's guide to Marble CMS.",
        "coverImage": "https://cdn.marblecms.com/images/cover.jpg",
        "publishedAt": "2024-03-05T00:00:00.000Z"
      }
    ],
    "pagination": {
      "limit": 20,
      "currentPage": 1,
      "nextPage": null,
      "previousPage": null,
      "totalPages": 1,
      "totalItems": 12
    }
  }
}

Authorizations

Authorization
string
required
Your Marble API key. Include it in the header as: Bearer YOUR_API_KEY

Path Parameters

identifier
string
required
The category ID or slug.

Query Parameters

include
string
Include related data. Use posts to include posts in this category.
limit
integer
default:"20"
When include=posts, the maximum number of posts to return.
page
integer
default:"1"
When include=posts, the page of posts to return.