Publishing Platforms · Integration
Ghost blog automation with the Admin API: setup and pitfalls
Part of the guide How to auto publish blog posts on any CMS (2026 guide)
You automate a Ghost blog through the Ghost Admin API: create a custom integration in Ghost Admin to get an Admin API key, then post HTML to the posts endpoint as a draft, published or scheduled post. Automated posts do not go out as newsletter emails unless the request names a newsletter. Postbing uses this API to publish, update and unpublish posts, tracked with a private internal tag.
How does Ghost blog automation work?
Ghost exposes everything the editor does through its Admin API, so any automation, whether a script, an automation tool or a connector like Postbing, does the same three things: authenticate with an Admin API key, send the post, and remember which Ghost post belongs to which source article.
Ghost's documentation describes the pieces:
- Key. "Admin API keys can be obtained by creating a new Custom Integration under the Integrations screen in Ghost Admin." The key is an
idand asecretseparated by a colon. - Token. Your code signs a short-lived JWT with the secret (HS256), with an expiry of at most 5 minutes, and sends it in the
Authorization: Ghost <token>header. - Post.
POST /ghost/api/admin/posts/with at least atitle. Add?source=htmlto send HTML instead of Ghost's Lexical editor format.
For how Ghost compares with WordPress, Shopify and Webflow as an automation target, see the guide to automatic blog post publishing.
Should automated Ghost posts be draft, published or scheduled?
Send posts as drafts while you test, then let your scheduler decide. Ghost accepts three statuses through the API, and the right one depends on where the schedule lives.
| Status | What Ghost does | Use it when |
|---|---|---|
draft |
Saves the post, nothing public | You review inside Ghost Admin before publishing |
published |
Live immediately | Your tool or script already waited until the planned time |
scheduled with a future published_at |
Ghost publishes it at that time | You want Ghost to hold the schedule |
Postbing uses the second pattern. It keeps the schedule and the approval step on its side ("Approve first" is the default) and sends the post to Ghost as published at the planned time. The tradeoffs between reviewing first and publishing straight away are in draft first vs autopublish.
Will automated posts email my Ghost members?
Not unless you ask. Ghost's Admin API docs say "To send a post by email, the newsletter query parameter must be passed when publishing or scheduling the post, containing the newsletter's slug." A post created through the API without that parameter is published on the site only.
That is usually what you want for SEO articles. Many Ghost publications use the newsletter for their own writing, and a search-focused how-to arriving in subscribers' inboxes can feel off. Postbing never passes the newsletter parameter, so its posts are web-only. If you want a specific article emailed, open it in Ghost Admin and send it from there.
How do you avoid duplicate posts when automating Ghost?
Store a link between your source and the Ghost post, and update instead of creating on every later run. Ghost requires the current updated_at value on every edit: the docs say it "is required as it is used to handle collision detection and ensure you're not overwriting more recent updates." So an update is two calls: read the post, then send the edit with its updated_at.
Internal tags are a tidy way to keep that link. Ghost's help pages say internal tags "use a hashtag" and give the example of a post tagged #video where the theme keeps "a private record" of the tag. Postbing tags each post with #postbing-article-<id>, which Ghost stores with the slug hash-postbing-article-<id>, and looks posts up by that tag before writing. Because it is an internal tag, Ghost keeps it as a private record rather than a public topic tag.
What does Postbing send to Ghost?
Postbing fills the fields Ghost uses for search and sharing, not just the title and body.
| Ghost field | Set by Postbing | Limit applied |
|---|---|---|
title, html (via ?source=html), slug |
Yes | None |
custom_excerpt |
Yes | 300 characters |
meta_title, meta_description |
Yes | 300 and 500 characters |
canonical_url |
Yes | None |
tags |
Categories, then tags, then the internal tracking tag | None |
feature_image and feature_image_alt |
Yes, the image is uploaded to your Ghost site | None |
codeinjection_head |
Article JSON-LD | None |
| Pages (for example service pages) | Sent to the Ghost pages endpoint | None |
Edits and scheduled refreshes update the same post, so the URL stays the same. Unpublishing switches the post back to draft rather than deleting it.
How do you connect Ghost to Postbing?
- In Ghost Admin, open Settings, then Integrations, and add a custom integration named Postbing.
- Copy the Admin API key (it looks like
id:secret) and your Ghost admin address. - In Postbing, open the site's publishing settings, choose Ghost, and paste the "Ghost admin address" and "Admin API key".
- Choose when articles go live and set publishing days, time and time zone.
- Publish one test article. Check the post's settings in Ghost Admin: the excerpt, the meta data panel, the featured image alt text and the code injection header should all be filled.
To revoke access later, delete the custom integration in Ghost Admin.
Common Ghost automation mistakes
Most problems come from the token or the editor format.
- Clock drift. The JWT expires within 5 minutes, so a server with the wrong time gets rejected. Keep the server clock synced.
- Sending HTML without
?source=html. Ghost treats content as Lexical by default, so HTML sent without the parameter is not imported the way you expect. - Forgetting
updated_aton edits. The request is refused, and a naive script may then create a second post instead of updating. - Duplicate tags in the theme. If your theme lists every tag, make sure tracking tags are internal (starting with
#), not public. - Assuming automation sends email. It does not, unless the
newsletterparameter is set.
If you want behaviour the connector does not offer, such as emailing specific posts or writing to custom fields, you can use the webhook route and call the Admin API from your own code.
FAQ
Where do I find my Ghost Admin API key?
In Ghost Admin, open the Integrations screen and add a custom integration. Its Admin API key is an id and a secret joined by a colon.
Can I send HTML to Ghost through the API?
Yes. Add ?source=html to the create or update request and send the body in the html field. Without it, Ghost expects its Lexical format.
Do posts published through the Ghost API go out as newsletters?
Only if the request includes the newsletter query parameter with a newsletter's slug. Postbing never sets it, so its posts are published on the web only.
How do I schedule a Ghost post through the API?
Set status to scheduled and published_at to a future date and time. Postbing instead holds the schedule itself and publishes at the planned time.
What happens in Ghost when I unpublish a Postbing article?
Postbing switches the Ghost post back to draft rather than deleting it, so nothing is lost.
Sources
- Ghost developer docs, Admin API overview: custom integration keys, id and secret, HS256 JWT with a maximum 5 minute expiry, accessed 16 November 2026
- Ghost developer docs, creating a post: posts endpoint, required title,
?source=html, accessed 16 November 2026 - Ghost developer docs, updating a post:
updated_atrequired for collision detection, accessed 16 November 2026 - Ghost developer docs, scheduling a post:
scheduledstatus withpublished_at, accessed 16 November 2026 - Ghost developer docs, sending a post via email:
newsletterquery parameter required to email a post, accessed 16 November 2026 - Ghost help center, tags: internal tags use a hashtag, private record example, accessed 16 November 2026
- Postbing product code, checked 16 November 2026: connect form labels, internal tag format, fields and limits, update and unpublish behaviour, no newsletter parameter
Related reading
Last updated: November 16, 2026. Spotted an error? Email support@postbing.com and we will fix it. Editorial policy.
Try Postbing free
Postbing reads your site, plans a month of topics from what your customers search for, writes in your voice and publishes to WordPress, Shopify, Webflow or Ghost. Your first article is free.
Try Postbing freeNo card needed. No link exchanges, ever.