Update a post
Updates an editable post. Every body field is optional; omitted fields keep their current values, and omitting all timing fields keeps the current scheduling and draft status. At most one of publishNow, scheduledFor, isDraft, or queuedFromProfile may select a new timing mode.
Authorization
bearerAuth PostZen API key.
In: header
Path Parameters
PostZen post id.
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Provide exactly one creation mode: publishNow, scheduledFor, isDraft, or queuedFromProfile. platforms is required unless isDraft is true.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X PUT "https://example.com/v1/posts/string" \ -H "Content-Type: application/json" \ -d '{}'{ "post": { "_id": "string", "title": "string", "content": "string", "status": "string", "scheduledFor": "2019-08-24T14:15:22Z", "queueId": "string", "timezone": "string", "platforms": [ { "platform": "twitter", "accountId": { "_id": "string", "platform": "twitter", "username": "string", "displayName": "string", "isActive": true }, "status": "draft", "platformPostUrl": "http://example.com", "error": "string" } ] }, "message": "string"}{ "error": "JSON body is required"}{ "error": "Unauthorized"}{ "error": "The Free plan includes 2 connected accounts. Upgrade your plan to connect more.", "code": "paymentRequired", "reason": "freeTierExceeded", "documentationUrl": "https://docs.postzen.dev/api-reference/connect/create-connect-url", "dashboardUrl": "https://app.postzen.dev/settings?tab=billing", "details": { "planId": "free", "includedAccounts": 2, "freeTierAccountLimit": 2, "currentAccountCount": 2, "hasPaymentMethod": false }}{ "error": "API key requires read_write permission"}{ "error": "Not found"}{ "error": "Post publishing is in progress. Retry after it completes.", "type": "invalid_request_error", "code": "post_publish_in_progress", "param": null}{ "error": "rate_limited", "retryAfter": 30}