Introducing ContioReach - The Headless CMS Built for Content Excellence. Learn More

Tags API

Get tags for a workspace

url

https://contioreach.com/api/public/tags

method

GET


Query Parameters

  • id

    Optional

    Filter tags by ID

  • slug

    Optional

    Filter tags by slug


Authentication

API requests require authentication using an API key in one of two ways:

  • x-api-key header

    Include your API key in the x-api-key header

  • authorization header

    Include your API key in the authorization header with format: Bearer YOUR_API_KEY


Response

200

Success

typescript

{
  tags: [
    { 
      id: string,
      name: string,
      slug: string
    }
  ]
}

401

Unauthorized

{
  error: string // Authentication error message
}

500

Server Error

{
  error: "Failed to fetch tags"
}

Usage Examples

// Fetch all tags
async function fetchTags() {
  const response = await fetch('https://contioreach.com/api/public/tags', {
    headers: {
      'x-api-key': 'YOUR_API_KEY'
    }
  });
  return await response.json();
}
// Fetch tag by slug
async function fetchTagBySlug(slug) {
  const response = await fetch('https://contioreach.com/api/public/tags?slug=' + slug, {
    headers: {
      'x-api-key': 'YOUR_API_KEY'
    }
  });
  return await response.json();
}