Categories

Content taxonomy — list categories used to group blog posts.

Categories group related pieces of content (blog posts). Every content item belongs to at most one category, identified by slug.

List categories

GET /api/organizations/{orgId}/categories

Response

{
  "items": [
    { "id": "cat_1", "slug": "marketing", "value": "Marketing" },
    { "id": "cat_2", "slug": "engineering", "value": "Engineering" }
  ]
}

Example (curl)

curl "https://www.inventra.sh/api/organizations/$ORG_ID/categories" \
  -H "x-api-key: $API_KEY"

SDK equivalent

const categories = await inventra.categories.list();

Use cases

The most common integration pattern is rendering a category nav on your blog index:

const categories = await inventra.categories.list();

<nav>
  {categories.map((cat) => (
    <Link key={cat.slug} href={`/blog/category/${cat.slug}`}>
      {cat.value}
    </Link>
  ))}
</nav>

Filter posts by category on your side by matching post.categorySlug to the selected category.