Publications

Adopt Publication Draft Profile

POST
/api/projects/{projectId}/publications/{publicationId}/draft/adopt-profile

Authorization

headerAuthorizationBearer <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.

Path Parameters

projectId*string
Length1 <= length
publicationId*string
Length1 <= length

Request Body

  1. body
expectedRevision*integer
Range1 <= value
expectedSourceRevision*integer
Range1 <= value
expectedProfileVersionId*string
Length1 <= length
activeProfileVersionId*string
Length1 <= length
targetContent*
previousLocalContent?

Response Body

Response for status 200

application/json
  1. response
editor*
Example Request
curl -X POST 'https://postbot.example/api/projects/string/publications/string/draft/adopt-profile' \
  -H 'Content-Type: application/json' \
  -d '{
  "expectedRevision": 1,
  "expectedSourceRevision": 1,
  "expectedProfileVersionId": "string",
  "activeProfileVersionId": "string",
  "targetContent": {}
}'
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
    }
  }
}

Was this page helpful?