Ghost · Schema
PostInput
Input fields for creating or updating a post or page.
PublishingNewslettersMembershipsContentOpen Source
Properties
| Name | Type | Description |
|---|---|---|
| title | string | Title of the post |
| slug | string | Custom URL slug |
| lexical | string | Content in Lexical editor format (JSON string) |
| html | string | Content in HTML format, converted to Lexical on save |
| status | string | Publication status |
| visibility | string | Access visibility level |
| featured | boolean | Whether the post is featured |
| feature_image | string | Featured image URL |
| feature_image_alt | string | Alt text for the featured image |
| feature_image_caption | string | Caption for the featured image |
| custom_excerpt | string | Custom excerpt |
| codeinjection_head | string | Code injection in the head |
| codeinjection_foot | string | Code injection in the foot |
| custom_template | string | Custom template name |
| canonical_url | string | Canonical URL |
| published_at | string | Scheduled publication time |
| updated_at | string | Required for updates to prevent collisions |
| tags | array | Tags to associate, can be name strings or tag objects |
| authors | array | Authors to associate |
| email_subject | string | Custom email newsletter subject |
| og_image | string | Open Graph image URL |
| og_title | string | Open Graph title |
| og_description | string | Open Graph description |
| twitter_image | string | Twitter card image URL |
| twitter_title | string | Twitter card title |
| twitter_description | string | Twitter card description |
| meta_title | string | SEO meta title |
| meta_description | string | SEO meta description |
JSON Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "#/components/schemas/PostInput",
"title": "PostInput",
"type": "object",
"description": "Input fields for creating or updating a post or page.",
"properties": {
"title": {
"type": "string",
"description": "Title of the post"
},
"slug": {
"type": "string",
"description": "Custom URL slug"
},
"lexical": {
"type": "string",
"description": "Content in Lexical editor format (JSON string)"
},
"html": {
"type": "string",
"description": "Content in HTML format, converted to Lexical on save"
},
"status": {
"type": "string",
"description": "Publication status",
"enum": [
"published",
"draft",
"scheduled"
]
},
"visibility": {
"type": "string",
"description": "Access visibility level",
"enum": [
"public",
"members",
"paid",
"tiers"
]
},
"featured": {
"type": "boolean",
"description": "Whether the post is featured"
},
"feature_image": {
"type": "string",
"format": "uri",
"description": "Featured image URL",
"nullable": true
},
"feature_image_alt": {
"type": "string",
"description": "Alt text for the featured image",
"nullable": true
},
"feature_image_caption": {
"type": "string",
"description": "Caption for the featured image",
"nullable": true
},
"custom_excerpt": {
"type": "string",
"description": "Custom excerpt",
"nullable": true
},
"codeinjection_head": {
"type": "string",
"description": "Code injection in the head",
"nullable": true
},
"codeinjection_foot": {
"type": "string",
"description": "Code injection in the foot",
"nullable": true
},
"custom_template": {
"type": "string",
"description": "Custom template name",
"nullable": true
},
"canonical_url": {
"type": "string",
"format": "uri",
"description": "Canonical URL",
"nullable": true
},
"published_at": {
"type": "string",
"format": "date-time",
"description": "Scheduled publication time",
"nullable": true
},
"updated_at": {
"type": "string",
"format": "date-time",
"description": "Required for updates to prevent collisions"
},
"tags": {
"type": "array",
"description": "Tags to associate, can be name strings or tag objects",
"items": {
"oneOf": [
{
"type": "object",
"properties": {
"name": {
"type": "string"
},
"slug": {
"type": "string"
}
}
},
{
"$ref": "#/components/schemas/Tag"
}
]
}
},
"authors": {
"type": "array",
"description": "Authors to associate",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid"
},
"slug": {
"type": "string"
},
"email": {
"type": "string",
"format": "email"
}
}
}
},
"email_subject": {
"type": "string",
"description": "Custom email newsletter subject",
"nullable": true
},
"og_image": {
"type": "string",
"format": "uri",
"nullable": true,
"description": "Open Graph image URL"
},
"og_title": {
"type": "string",
"nullable": true,
"description": "Open Graph title"
},
"og_description": {
"type": "string",
"nullable": true,
"description": "Open Graph description"
},
"twitter_image": {
"type": "string",
"format": "uri",
"nullable": true,
"description": "Twitter card image URL"
},
"twitter_title": {
"type": "string",
"nullable": true,
"description": "Twitter card title"
},
"twitter_description": {
"type": "string",
"nullable": true,
"description": "Twitter card description"
},
"meta_title": {
"type": "string",
"nullable": true,
"description": "SEO meta title"
},
"meta_description": {
"type": "string",
"nullable": true,
"description": "SEO meta description"
}
}
}