Introduction
Quick Start
Tour
chevron_right
In Depth
chevron_right
API Reference
Help

API Reference

Content API

The endpoint for the Content API looks like this:

get
https://content.headless.rest/api/v1/{websiteName}/content/{blueprintName}

which will return JSON with your content. Replace websiteName and blueprintName accordingly.

For example:

get
https://content.headless.rest/api/v1/my-website.com/content/blog?token=BfQVnMpbZRBOswEVzEXvCzwvZLSYBZBT

See bottom of this page for a response example.


Note that the Content API is extremely rate limited. It is not suitable for direct consumption by your website visitors and does not have CORS enabled. The Content API is meant to be consumed in your build process.


Translation API

Translations can be retrieved from:

get
https://content.headless.rest/api/v1/{websiteName}/translations?token=BfQVnMpbZRBOswEVzEXvCzwvZLSYBZBT

Replace websiteName with your website name.


The Translation API is also extremely rate limited. Only use it in your build process.


Authentication

You must authenticate in order to access your data. To do this, find your access token on your website settings page.

Add this token to your request as querystring with the 'token' as key.
For example:

get
https://content.headless.rest/api/v1/my-website.com/content/blog?token=BfQVnMpbZRBOswEVzEXvCzwvZLSYBZBT


Content API Response example

{
  "name": "blog",
  "websiteName": "mywebsite.com",
  "items": [
    {
      "created": "2017-07-07T08:06:55.811Z",
      "updated": "2017-07-09T12:15:23.109Z",
      "content": {
        "es": {
          "tags": [],
          "author": "",
          "publish_date": "",
          "read_time": "2",
          "body": "",
          "title": "test",
          "draft": true
        },
        "en": {
          "tags": [
            "first-post",
            "exciting"
          ],
          "author": "John Doe",
          "publish date": "2017-07-02T22:00:00.000Z",
          "read_time": "",
          "body": "<p>This is my blog post<p>",
          "title": "A blog post",
          "draft": false
        }
      }
    }
  ]
}