Skip to content

Update Blog Post

PUT
/api/v1/posts/{id}

Updates a blog post. CPT: custom_fields updatable; post_type locked; APPROVAL_REQUIRED may apply on publish.

Authorizations

SessionAuth

Session ID for authenticated requests

Type
API Key (header: X-Session-ID)

Parameters

Path Parameters

id*
Type
string
Required

Request Body

application/json
JSON
{
  
"post_type": "string",
  
"custom_fields": {
  
  
"additionalProperties": "string"
  
},
  
"title": "string",
  
"slug": "string",
  
"body": "string",
  
"body_format": "string",
  
"excerpt": "string",
  
"status": "string",
  
"visibility": "string",
  
"password": "string",
  
"category_ids": [
  
  
"string"
  
],
  
"tag_ids": [
  
  
"string"
  
],
  
"comments_enabled": true,
  
"reactions_enabled": true,
  
"scheduled_at": "string",
  
"metadata": {
  
  
"additionalProperties": "string"
  
},
  
"additionalProperties": "string"
}

Responses

Post updated

Playground

Server
Authorization
Variables
Key
Value
Body

Samples

Powered by VitePress OpenAPI

Update an existing blog post.

Auth: session + owner/admin.

Parameters

NameInTypeRequiredDescription
idpathstringYesPost id

Request Body

json
{
	"title": "Updated title",
	"body": "Updated body",
	"custom_fields": { "client": "Acme Corp" }
}

Response 200

json
{
	"data": {
		"id": "post_2",
		"updated": true,
		"post_type": "case-study",
		"custom_fields": { "client": "Acme Corp" }
	},
	"user_context": { "authenticated": true },
	"meta": {}
}

Response Errors

  • 400 invalid update payload (CUSTOM_FIELDS_*, POST_TYPE_LOCKED, …)
  • 401 missing session
  • 403 not owner/admin or APPROVAL_REQUIRED on publish
  • 404 post not found

Notes

  • Use this for content edits and metadata changes.
  • Keep slug and visibility in sync with the publishing flow.
  • CPT: custom_fields are updatable; changing post_type returns POST_TYPE_LOCKED.
  • Type behaviors may still apply on publish (approval, scheduling, password visibility).