Ghost Integration Guide

Last updated:

Overview

The Ghost integration enables you to publish articles from tryMarketr to your Ghost publication using the Ghost Admin API v3. This integration supports both Ghost(Pro) hosted sites and self-hosted Ghost instances.

Prerequisites

  • Ghost 2.0 or higher
  • Admin access to your Ghost site
  • Ability to create custom integrations

Setup Guide

Step 1: Create Custom Integration in Ghost

  1. Log into your Ghost admin panel
  2. Click the Settings icon (gear) in the left sidebar
  3. Navigate to Integrations
  4. Click Add custom integration
  5. Enter a name: tryMarketr
  6. Click Create

Step 2: Copy Admin API Key

After creating the custom integration, you'll see several credentials. You need the Admin API Key.

  1. In the integration details, find the Admin API Key field
  2. Copy the entire key (format: 1234567890abcdef:1234567890abcdef1234567890abcdef)
  3. The key consists of two parts separated by a colon: id:secret

Important

Keep your Admin API Key secure. It grants full access to your Ghost content. Never share it publicly or commit it to version control.

Step 3: Configure in tryMarketr

  1. In tryMarketr, go to Integrations
  2. Click Add Integration
  3. Enter a display name (e.g., "My Ghost Blog")
  4. Select Ghost as the platform
  5. Fill in the required fields:
    • Ghost Site URL: Your Ghost site URL (e.g., https://myblog.ghost.io)
    • Admin API Key: The complete key from Step 2
  6. Click Create Integration
  7. Click Test Connection to verify

API Reference

Authentication

Ghost uses JWT (JSON Web Tokens) for authentication. tryMarketr automatically generates JWT tokens from your Admin API Key using the HS256 algorithm.

Authorization: Ghost {jwt_token}

API Endpoints Used

Validate Credentials

GET /ghost/api/admin/site/

Verifies API key and retrieves site information.

Create Post

POST /ghost/api/admin/posts/

Publishes a new article to Ghost in Mobiledoc format.

Update Post

PUT /ghost/api/admin/posts/{id}/

Updates an existing post (requires version number).

Delete Post

DELETE /ghost/api/admin/posts/{id}/

Removes an article from Ghost.

Content Format

Ghost uses Mobiledoc as its native content format. tryMarketr automatically converts your articles to Mobiledoc. Markdown is also supported for simpler content.

API Version

tryMarketr uses Ghost Admin API v3, compatible with Ghost 2.0+.

Troubleshooting

Error: "Invalid Admin API Key"

The API key format is incorrect or the key is invalid.

Solution: Ensure you copied the complete Admin API Key including both the ID and secret parts. The format should be id:secret with no spaces.

Error: "Unknown resource"

The Ghost site URL is incorrect.

Solution: Verify your Ghost URL is correct. It should not include /ghost/ at the end. Use just the base URL like https://myblog.ghost.io

Error: "Version mismatch"

Updating a post requires the current version number.

Solution: This error typically occurs when updating posts. tryMarketr handles version tracking automatically, but if you see this error, try unpublishing and republishing the article.

Error: "Token expired"

The JWT token has expired.

Solution: tryMarketr automatically refreshes tokens. If this persists, test your integration connection again to verify the Admin API Key is still valid.

Custom Domain vs Ghost Subdomain

Use the URL readers see, not the admin panel URL.

Ghost(Pro): Use your Ghost subdomain (e.g., https://myblog.ghost.io)

Custom Domain: Use your custom domain (e.g., https://blog.mysite.com)

Advanced Features

Draft vs Published

Articles are published immediately by default. Future updates will support saving as drafts.

Tags and Authors

tryMarketr automatically assigns the primary author based on your Ghost user account. Tag support is coming in future updates.

Featured Images

Hero images from tryMarketr articles are set as feature images in Ghost.