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
Default1
Range1 <= value
limit?integer
Default10
Range1 <= value <= 100
type?string
Value in"post" | "page"
include?string
Value in"computed_excerpt"

Response Body

application/json

application/json

application/json

curl -X GET "https://loading/api/public/content"
{
  "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
  }
}
{
  "error": "string",
  "details": [
    {
      "code": "string",
      "message": "string",
      "path": [
        "string"
      ]
    }
  ]
}
{
  "error": "string"
}

Get published content by slug

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?string
Value in"computed_excerpt"

Response Body

application/json

application/json

application/json

curl -X GET "https://loading/api/public/content/string"
{
  "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"
}
{
  "error": "string",
  "details": [
    {
      "code": "string",
      "message": "string",
      "path": [
        "string"
      ]
    }
  ]
}
{
  "error": "string"
}