Publishing
publish_ghost
Publish content to Ghost CMS
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| title | string | Required | — | Post title |
| content | string | Required | — | Full post content (HTML or Markdown) |
| status | string | Optional | draft | Publication status: 'draft' or 'published' |
| tags | string[] | Optional | — | Tag names |
| featured_image_url | string | Optional | — | URL of featured image |
Example
Publish to Ghost:
Request
{
"title": "React Hooks Guide",
"content": "# React Hooks\n\nReact Hooks are functions...",
"status": "draft",
"tags": ["react", "tutorials"],
"featured_image_url": "https://example.com/hero.jpg"
}Response
{
"status": "success",
"post": {
"id": "6123abc456def",
"uuid": "a1b2c3d4-...",
"url": "https://your-ghost-site.com/p/react-hooks-guide",
"status": "draft"
},
"featured_image": {
"url": "https://your-ghost-site.com/content/images/hero.jpg"
},
"tags": [
{ "name": "react", "slug": "react" },
{ "name": "tutorials", "slug": "tutorials" }
]
}Tips
Best Practices
- Requires Ghost Admin API key (id:secret format)
- Markdown is converted to Ghost's mobiledoc format
- Tags are created automatically if they don't exist
- Use 'published' status to publish immediately