TribeTale API Docs
Admin APIPages

Create a page.

POST
/pages/

Creates a page. If source=html is supplied, pages[0].html is converted into Ghost editor source formats by the input serializer. Pages use the post model and serializer family, but the page output mapper removes email/newsletter-only post fields.

Authorization

GhostAdminJWT
Authorization<token>

Send Authorization: Ghost <JWT>. This is a custom Ghost scheme, not standard Bearer.

The JWT is signed with HS256 using the Admin API key secret after hex decoding it to bytes. The JWT header must include kid set to the Admin API key id. Ghost verifies the aud claim against the requested Admin or Content API path and enforces a maximum token age of 5 minutes.

In: header

Query Parameters

include?string

Comma-separated includes. Allowed values are tags, authors, authors.roles, tiers, count.signups, count.paid_conversions, post_revisions, and post_revisions.author.

formats?string

Comma-separated post formats. Allowed values are mobiledoc, lexical, html, and plaintext.

source?string

Convert the supplied html field into Ghost editor source formats.

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://example.com/pages/?include=tags%2Cauthors%2Ctiers&formats=html%2Clexical" \  -H "Content-Type: application/json" \  -d '{    "pages": [      {        "title": "About TribeTale",        "status": "draft",        "html": "<p>About this site.</p>"      }    ]  }'
{
  "pages": [
    {
      "id": "string",
      "uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",
      "title": "string",
      "slug": "string",
      "mobiledoc": "string",
      "lexical": "string",
      "html": "string",
      "plaintext": "string",
      "feature_image": "http://example.com",
      "featured": true,
      "type": "page",
      "status": "draft",
      "visibility": "string",
      "created_at": "2019-08-24T14:15:22Z",
      "updated_at": "2019-08-24T14:15:22Z",
      "published_at": "2019-08-24T14:15:22Z",
      "custom_excerpt": "string",
      "codeinjection_head": "string",
      "codeinjection_foot": "string",
      "custom_template": "string",
      "canonical_url": "http://example.com",
      "tags": [
        {
          "id": "string",
          "name": "string",
          "slug": "string",
          "description": "string",
          "feature_image": "http://example.com",
          "visibility": "public",
          "url": "http://example.com",
          "og_image": "string",
          "og_title": "string",
          "og_description": "string",
          "twitter_image": "string",
          "twitter_title": "string",
          "twitter_description": "string",
          "meta_title": "string",
          "meta_description": "string",
          "codeinjection_head": "string",
          "codeinjection_foot": "string",
          "canonical_url": "string",
          "accent_color": "string",
          "created_at": "2019-08-24T14:15:22Z",
          "updated_at": "2019-08-24T14:15:22Z",
          "count": {}
        }
      ],
      "authors": [
        {
          "id": "string",
          "name": "string",
          "slug": "string",
          "profile_image": "http://example.com",
          "cover_image": "http://example.com",
          "bio": "string",
          "website": "http://example.com",
          "location": "string",
          "facebook": "string",
          "twitter": "string",
          "url": "http://example.com"
        }
      ],
      "primary_tag": {
        "id": "string",
        "name": "string",
        "slug": "string",
        "description": "string",
        "feature_image": "http://example.com",
        "visibility": "public",
        "url": "http://example.com",
        "og_image": "string",
        "og_title": "string",
        "og_description": "string",
        "twitter_image": "string",
        "twitter_title": "string",
        "twitter_description": "string",
        "meta_title": "string",
        "meta_description": "string",
        "codeinjection_head": "string",
        "codeinjection_foot": "string",
        "canonical_url": "string",
        "accent_color": "string",
        "created_at": "2019-08-24T14:15:22Z",
        "updated_at": "2019-08-24T14:15:22Z",
        "count": {}
      },
      "primary_author": {
        "id": "string",
        "name": "string",
        "slug": "string",
        "profile_image": "http://example.com",
        "cover_image": "http://example.com",
        "bio": "string",
        "website": "http://example.com",
        "location": "string",
        "facebook": "string",
        "twitter": "string",
        "url": "http://example.com"
      },
      "tiers": [
        {
          "id": "string",
          "name": "string",
          "description": "string",
          "slug": "string",
          "active": true,
          "type": "free",
          "welcome_page_url": "http://example.com",
          "visibility": "public",
          "benefits": [
            "string"
          ],
          "currency": "string",
          "monthly_price": 0,
          "yearly_price": 0,
          "trial_days": 0,
          "created_at": "2019-08-24T14:15:22Z",
          "updated_at": "2019-08-24T14:15:22Z"
        }
      ],
      "og_image": "http://example.com",
      "og_title": "string",
      "og_description": "string",
      "twitter_image": "http://example.com",
      "twitter_title": "string",
      "twitter_description": "string",
      "meta_title": "string",
      "meta_description": "string",
      "frontmatter": "string",
      "feature_image_alt": "string",
      "feature_image_caption": "string"
    }
  ]
}