Starter KitAstraCMS

Introduction

AstraCMS Content Delivery API Reference

Welcome to the AstraCMS API documentation. This API provides read-only access to your content, enabling you to build powerful front-end applications with your CMS data.

Base URL

https://api.astracms.com

API Versions

We provide two API versions:

  • v1 - Workspace-scoped endpoints (/v1/{workspaceId}/...)
  • v2 - API key-scoped endpoints (/v2/...) - Recommended

Available Endpoints

Quick Example

Fetch all posts
curl -X GET "https://api.astracms.com/v2/posts" \
  -H "Authorization: Bearer YOUR_API_KEY"
Response
{
  "posts": [
    {
      "id": "cm1post123",
      "title": "Getting Started with AstraCMS",
      "slug": "getting-started",
      "content": "<p>Your content here...</p>",
      "publishedAt": "2024-01-01T12:00:00Z",
      "authors": [...],
      "category": {...},
      "tags": [...]
    }
  ],
  "pagination": {
    "currentPage": 1,
    "totalPages": 5,
    "totalItems": 48
  }
}

Features

  • Pagination - All list endpoints support limit and page parameters
  • Filtering - Filter posts by categories, tags, or search query
  • Content Format - Request content as HTML or Markdown
  • Includes - Optionally include related resources (e.g., posts with tags)

Last updated on

On this page