Publications
Rebase a stale publication draft onto the current source
POST
header
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*stringLength
1 <= lengthpublicationId*stringLength
1 <= length- body
expectedSourceRevision?integerRange
1 <= valuereplaceContent?booleanexpectedRevision*integerRange
1 <= valueResponse for status 200
application/json- response
editor*curl -X POST 'https://postbot.example/api/projects/string/publications/string/draft/rebase' \
-H 'Content-Type: application/json' \
-d '{
"expectedRevision": 1
}'Example Response
{
"editor": {
"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": [
{}
]
},
"post": {
"id": "string",
"projectId": "string",
"title": "string",
"sourceContent": "string",
"sourceRevision": -9007199254740991,
"createdByActorId": "string",
"createdAt": -9007199254740991,
"updatedAt": -9007199254740991
},
"channel": {
"id": "string",
"projectId": "string",
"name": "string",
"profileVersionId": "string",
"state": "active",
"archivedAt": -9007199254740991,
"revision": -9007199254740991,
"createdAt": -9007199254740991,
"updatedAt": -9007199254740991,
"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
},
"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
}
}
}