Skip to content

Validate a saved draft

PubNio API posts.validate: validate a saved draft. Request fields, examples in five clients, errors, and idempotency.

Validate a saved draft with POST /api/v1/posts/{postId}/validate. Requires an API key with the read scope or a signed-in workspace member.

Request

Dry run for the saved accounts and placements. Returns typed issues for readiness, captions, media, and settings. It never submits.

Parameter In Type Required
postId path UUID Yes
workspaceId query UUID Yes

Response

  • HTTP 200: PostValidation with canPublish, errors, warnings, targets, billing.

The OpenAPI document has each field’s type.

Examples

const validation = await workspace.posts.validate(postId);
validation = workspace.posts.validate(post_id)
curl -X POST "https://pubnio.com/api/v1/posts/$POST_ID/validate?workspaceId=$WORKSPACE_ID" \
  -H "Authorization: Bearer $PUBNIO_API_KEY"
pnio posts validate "$POST_ID"
async () => {
  const postId = "<postId>";
  const response = await codemode.request({
    method: "POST",
    path: `/api/v1/posts/${postId}/validate`,
    query: { workspaceId: codemode.workspaceId },
  });
  return response.data;
};

Errors

It declares no problem of its own.

It declares the problems most operations declare.

Idempotency

No key, so a retried POST is not deduplicated. Read the current state before you retry.

Limits

Type to search…

↑↓ navigate↵ selectEsc close