Save post text and channel drafts in one transaction
Requires editor access and publication:manage. Saves each listed draft against the resulting source revision without promoting content. Omitted targetContent preserves the current draft content. Revision conflicts return error.conflictingPublicationIds (all listed IDs for a source conflict). Delivery mode is stored on the publication and selected immutable target, not the draft; a different mode requires the destination move workflow. scheduledAt is applied publication state: a changed non-null time only reschedules an already scheduled publication, using existing future-time, running-job and cadence guards, and requires publication:dispatch. Scheduling a draft requires promotion; removing a schedule requires the existing lifecycle workflow. Omitted settings remain unchanged. Pending approval requests are superseded exactly as for individual draft saves.
AuthorizationBearer <Postdot API key>A user-owned Postdot API key sent as Authorization: Bearer <token>. Its project scope is limited by the creator’s current access.
projectId*string1 <= lengthpostId*string1 <= lengthpostdot-structured-text?stringSend require to refuse a write with structure warnings with 422 structured_text_required, before anything is saved.
postdot-structured-text-acknowledgement?stringKeeps text the person wants as one post. Retry the refused request unchanged with both headers and error.structureAcknowledgement from the 422 response. A different body, path, caller or warning set is refused again.
- body
includeSiblingEditors?booleanexpectedUserId?string1 <= lengthexpectedSourceRevision*integer1 <= valuesourceContent?publications*array<>items <= 100Response for status 200
application/json- response
post*publications*array<>structureWarnings?array<>items <= 100curl -X PUT 'https://postdot.example/api/projects/string/posts/string/composition' \
-H 'Content-Type: application/json' \
-d '{
"expectedSourceRevision": 1,
"publications": [
{
"publicationId": "string",
"expectedRevision": 1
}
]
}'{
"post": {
"id": "string",
"projectId": "string",
"title": "string",
"sourceContent": "string",
"sourceRevision": -9007199254740991,
"createdByActorId": "string",
"createdAt": -9007199254740991,
"updatedAt": -9007199254740991
},
"publications": [
{
"publication": {
"id": "string",
"projectId": "string",
"postId": "string",
"channelId": "string",
"targetRevisionId": "string",
"deliveryMode": "manual",
"reviewState": "compatible",
"state": "draft",
"scheduledAt": -9007199254740991,
"publishedAt": -9007199254740991,
"externalId": "string",
"externalUrl": "string",
"errorMessage": "string",
"createdByActorId": "string",
"scheduledByActorId": "string",
"stateChangedByActorId": "string",
"publishedByActorId": "string",
"lastAssessedProfileVersionId": "string",
"createdAt": -9007199254740991,
"updatedAt": -9007199254740991,
"profileAssessmentIssues": [
{}
],
"remoteRemoval": {
"state": "running",
"removedAt": 0,
"removedBy": {
"id": "string",
"displayName": "string"
},
"errorMessage": "string",
"errorCode": "string",
"requiresReconnect": true,
"requestedAt": 0
}
},
"post": {
"id": "string",
"projectId": "string",
"title": "string",
"sourceContent": "string",
"sourceRevision": -9007199254740991,
"createdByActorId": "string",
"createdAt": -9007199254740991,
"updatedAt": -9007199254740991
},
"channel": {
"id": "string",
"name": "string",
"profileVersionId": "string",
"state": "active",
"archivedAt": -9007199254740991,
"websiteUrl": "string",
"imageUrl": "string",
"imageSource": "upload",
"executionMode": "automatic",
"revision": -9007199254740991,
"createdAt": -9007199254740991,
"updatedAt": -9007199254740991,
"projectId": "string",
"profileId": "string"
},
"profile": {
"id": "string",
"projectId": "string",
"channelId": "string",
"profileId": "string",
"version": 1,
"origin": "built_in",
"state": "draft",
"revision": 1,
"profile": {},
"createdByActorId": "string",
"createdAt": 0,
"updatedAt": 0
},
"draft": {
"id": "string",
"projectId": "string",
"publicationId": "string",
"profileVersionId": "string",
"sourceRevision": 1,
"baseSourceContent": {
"body": {
"text": "string",
"format": "plain_text"
},
"headline": "string",
"language": "string",
"media": [
{
"assetId": "string",
"accessibilityText": "string"
}
]
},
"content": {},
"reviewState": "compatible",
"validationIssues": [
{}
],
"lastAssessedProfileVersionId": "string",
"revision": 1,
"updatedByActorId": "string",
"createdAt": 0,
"updatedAt": 0
},
"remoteEditContent": {
"text": "string",
"title": "string",
"tags": [
"string"
],
"coverUrl": "string",
"canonicalUrl": "string",
"series": "string"
},
"quoteUnavailable": "server_unsupported",
"threadMessages": [
{
"executionRevisionId": "string",
"position": 0,
"state": "pending",
"externalId": "string",
"externalUrl": "string",
"externalCid": "string",
"errorMessage": "string"
}
],
"movement": {
"canMove": true,
"fromPublicationId": "string",
"toPublicationId": "string",
"requestedScheduledAt": 0
},
"adoptionCount": 0,
"selectedTargetProfile": {
"id": "string",
"projectId": "string",
"channelId": "string",
"profileId": "string",
"version": 1,
"origin": "built_in",
"state": "draft",
"revision": 1,
"profile": {},
"createdByActorId": "string",
"createdAt": 0,
"updatedAt": 0
},
"selectedTarget": {
"id": "string",
"projectId": "string",
"publicationId": "string",
"sequence": 1,
"profileVersionId": "string",
"sourceRevision": 1,
"deliveryMode": "manual",
"mediaReferenceCount": 0,
"content": {},
"contentHash": "string",
"profileHash": "string",
"schemaHash": "string",
"validationIssues": [
{}
],
"createdByActorId": "string",
"createdAt": 0
}
}
],
"structureWarnings": [
{
"code": "structure_in_text",
"message": "string",
"channelId": "string",
"field": "source",
"proposal": {
"messages": [
{
"text": "string",
"note": "string"
}
],
"firstComment": "string",
"separatePosts": [
{
"label": "string",
"text": "string"
}
]
}
}
]
}Was this page helpful?
Restore a post from the trash POST
Brings the post back exactly as it was. Cancelled channels stay cancelled and nothing is rescheduled. A post with a published channel needs the same authority as removing it. Emits post.restored. API keys need publication:delete.
Save the shared source without modifying destinations PATCH
Next Page