CMS External API Docs

Terminal-first workflow for integrating and testing CMS APIs safely.

Back Home
Terminal Guide
=== CMS External API Docs ===

Welcome to your CMS API guide. Follow these steps to fetch data for your website.

Step 1: Get your API Key
- Go to Account Settings -> API Keys
- Create/copy your API key (mocked here for demo: DEMO_API_KEY)

Step 2: Get your Integration Endpoint
- Go to Integrations -> API Endpoint for your tenant domain
- Copy the endpoint base (mocked here: https://demo-your-website.com/api/v1/external-request/my-tenant)

Step 3: Fetch Pages (Simulated)
> Terminal Command (curl):
curl -H "Authorization: Bearer DEMO_API_KEY" https://demo-your-website.com/api/v1/external-request/my-tenant/pages

> Mocked JSON Response:
{"pages":[{"id":"page_001","title":"Home","slug":"home"},{"id":"page_002","title":"About Us","slug":"about-us"}]}

Step 4: Fetch Single Blog (Simulated)
> Terminal Command (curl):
curl -H "Authorization: Bearer DEMO_API_KEY" https://demo-your-website.com/api/v1/external-request/my-tenant/blog/my-first-post

> Mocked JSON Response:
{
  "id": "blog_001",
  "title": "My First Blog",
  "content": "This is a mocked blog post."
}

Step 5: Frontend Example (JavaScript)
fetch("https://demo-your-website.com/api/v1/external-request/my-tenant/pages", {
  headers: {"Authorization": "Bearer DEMO_API_KEY"}
})
.then(res => res.json())
.then(data => console.log(data));

Notes:
- Replace DEMO_API_KEY and demo URL with your real key and endpoint.
- Use this guide to learn the workflow safely.