OverviewProductsPlatformsAPI ReferenceResources
Posts

Approve or reject a post

POSThttps://zernio.com/api/v1/posts/{postId}/review

Approves or rejects a post saved with requiresApproval: true (status pending_approval). approve schedules the post for its scheduledFor and fires the post.scheduled webhook. When that time has already passed, the post publishes within a couple of minutes. reject returns the post to draft. Returns 409 when the post is not pending_approval.

Authentication

AuthorizationBearer tokenRequired

API key authentication: send your Zernio API key in the Authorization header, prefixed with Bearer.

Path parameters

postIdstringRequired

Body

application/json

What every request needs

decisionstringRequiredOne of approve | reject

approve schedules the post; reject returns it to draft.

Responses

Success· the request worked

Errors· the request failed

POST/v1/posts/{postId}/review
import Zernio from '@zernio/node';const zernio = new Zernio({ apiKey: process.env.ZERNIO_API_KEY });const { data } = await zernio.posts.reviewPost({  path: {    postId: 'post_abc123',  },  body: {    decision: 'approve',  },});console.log(data);
{  "post": {    "_id": "string",    "userId": "string",    "title": "string",    "content": "string",    "contentNotRetained": true,    "mediaItems": [      {        "type": "image",        "url": "http://example.com",        "fileId": "string",        "accountId": "string",        "title": "string",        "altText": "string",        "filename": "string",        "size": 0,        "mimeType": "string",        "thumbnail": "http://example.com",        "instagramThumbnail": "http://example.com",        "subtitles": [          {            "url": "http://example.com",            "language": "string"          }        ],        "tiktokProcessed": true      }    ],    "platforms": [      {        "platform": "string",        "accountId": "string",        "customContent": "string",        "customMedia": [          {            "type": "image",            "url": "http://example.com",            "fileId": "string",            "accountId": "string",            "title": "string",            "altText": "string",            "filename": "string",            "size": 0,            "mimeType": "string",            "thumbnail": "http://example.com",            "instagramThumbnail": "http://example.com",            "subtitles": [              {                "url": "http://example.com",                "language": "string"              }            ],            "tiktokProcessed": true          }        ],        "scheduledFor": "2019-08-24T14:15:22Z",        "platformSpecificData": {},        "status": "string",        "platformPostId": "string",        "platformPostUrl": "string",        "publishedAt": "2019-08-24T14:15:22Z",        "removedFromPlatformAt": "2019-08-24T14:15:22Z",        "isTrialReel": true,        "trialGraduationStrategy": "MANUAL",        "publishAttempts": 0,        "publishRetries": 0,        "errorMessage": "string",        "errorCategory": "auth_expired",        "errorSource": "user",        "platformError": {          "code": 0,          "subcode": 0,          "message": "string"        }      }    ],    "scheduledFor": "2019-08-24T14:15:22Z",    "timezone": "string",    "status": "draft",    "tags": [      "string"    ],    "hashtags": [      "string"    ],    "mentions": [      "string"    ],    "visibility": "public",    "metadata": {},    "recycling": {      "enabled": true,      "gap": 0,      "gapFreq": "week",      "startDate": "2019-08-24T14:15:22Z",      "expireCount": 0,      "expireDate": "2019-08-24T14:15:22Z",      "contentVariations": [        "string"      ],      "contentVariationIndex": 0,      "recycleCount": 0,      "nextRecycleAt": "2019-08-24T14:15:22Z",      "lastRecycledAt": "2019-08-24T14:15:22Z"    },    "recycledFromPostId": "string",    "queuedFromProfile": "string",    "queueId": "string",    "profileId": "string",    "createdAt": "2019-08-24T14:15:22Z",    "updatedAt": "2019-08-24T14:15:22Z"  }}
OpenAPI specification
Was this page helpful?