Toast
API Reference

Public Content

Public content API for headless usage. No authentication required.

List published content

GET
/api/public/content

Retrieves a paginated list of published content items. No authentication required.

Query Parameters

page?integer
Range1 <= value
Default1
limit?integer
Range1 <= value <= 100
Default10
type?string
Value in"post""page"
include?"computed_excerpt"
Value in"computed_excerpt"

Response Body

Published content list

application/json
  1. response
data*array<>
meta*
Example Request
curl -X GET 'https://example.com/api/public/content'
Example Response
{  "data": [    {      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",      "slug": "string",      "title": "string",      "excerpt": "string",      "computedExcerpt": "string",      "body": {},      "contentType": "post",      "publishedAt": "2019-08-24T14:15:22Z",      "featureImage": "http://example.com",      "metaTitle": "string",      "metaDescription": "string",      "ogImage": "http://example.com"    }  ],  "meta": {    "total": 0,    "page": 0,    "limit": 0,    "pages": 0  }}
GET
/api/public/content/{slug}

Retrieves a single published content item by its URL-friendly slug. No authentication required.

Path Parameters

slug*string
Match^[a-z0-9]+(-[a-z0-9]+)*$

Query Parameters

include?"computed_excerpt"
Value in"computed_excerpt"

Response Body

Published content item

application/json
  1. response
id*string
Formatuuid
slug?string
title*string
excerpt?string
computedExcerpt?string

Auto-generated excerpt (only if include=computed_excerpt)

body?|null
contentType*string
Value in"post""page"
publishedAt?string
Formatdate-time
featureImage?string
Formaturi
metaTitle?string
metaDescription?string
ogImage?string
Formaturi
Example Request
curl -X GET 'https://example.com/api/public/content/string'
Example Response
{  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "slug": "string",  "title": "string",  "excerpt": "string",  "computedExcerpt": "string",  "body": {},  "contentType": "post",  "publishedAt": "2019-08-24T14:15:22Z",  "featureImage": "http://example.com",  "metaTitle": "string",  "metaDescription": "string",  "ogImage": "http://example.com"}