Ghost Integration Guide
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
- Log into your Ghost admin panel
- Click the Settings icon (gear) in the left sidebar
- Navigate to Integrations
- Click Add custom integration
- Enter a name:
tryMarketr - Click Create
Step 2: Copy Admin API Key
After creating the custom integration, you'll see several credentials. You need the Admin API Key.
- In the integration details, find the Admin API Key field
- Copy the entire key (format:
1234567890abcdef:1234567890abcdef1234567890abcdef) - 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
- In tryMarketr, go to Integrations
- Click Add Integration
- Enter a display name (e.g., "My Ghost Blog")
- Select Ghost as the platform
- 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
- Ghost Site URL: Your Ghost site URL (e.g.,
- Click Create Integration
- 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.