API reference
Retrieve the tags in your ContioReach workspace.
Tags work like categories but are intended for finer-grained topics, and a post can carry several.
curl "https://cms-api.contioreach.com/v1/tags" \
-H "X-API-Key: YOUR_API_KEY"| Parameter | Type | Description |
|---|---|---|
| page | number | Page of results to return. Starts at 1. |
| limit | number | Tags per page. |
| id | string | Return the single tag matching this id. |
| slug | string | Return the single tag matching this slug. |
The envelope matches every other endpoint.
{
"success": true,
"data": [
{
"id": "…",
"name": "AI Search",
"slug": "ai-search",
"postCount": 4
}
],
"meta": {
"page": 1,
"limit": 10,
"total": 1,
"totalPages": 1,
"hasNextPage": false,
"hasPrevPage": false
}
}A workspace with no tags returns 200 with an empty data array and total: 0. Build tag navigation defensively so an untagged blog renders nothing rather than an empty shell.
| Field | Type | Description |
|---|---|---|
| id | string | Unique identifier. |
| name | string | Display name. |
| slug | string | URL-safe identifier for your tag route. |
| postCount | number | Number of published posts carrying the tag. |
Tags also appear inline on every post, as objects with id, name, and slug. If you only need the tags for an article you are already fetching, read post.tags rather than calling this endpoint.
const res = await fetch(
"https://cms-api.contioreach.com/v1/tags",
{ headers: { "X-API-Key": process.env.CMS_API_KEY } }
);
const { data: tags } = await res.json();Filtering by tag happens on the Posts API:
const res = await fetch(
`https://cms-api.contioreach.com/v1/blogs?tags=${slug}&limit=12&minimal=true`,
{ headers: { "X-API-Key": process.env.CMS_API_KEY } }
);Pass a comma separated list:
const res = await fetch(
"https://cms-api.contioreach.com/v1/blogs?tags=seo,ai-search&minimal=true",
{ headers: { "X-API-Key": process.env.CMS_API_KEY } }
);| Status | Code | Meaning |
|---|---|---|
| 401 | INVALID_API_KEY | The API key is missing, incorrect, or inactive. |
| 429 | USAGE_LIMIT_EXCEEDED | Your plan's monthly API calls are used up. Requests resume when the allowance resets. |
Was this page helpful?