---
title: "Validate a saved draft"
description: "PubNio API posts.validate: validate a saved draft. Request fields, examples in five clients, errors, and idempotency."
---

> Documentation Index
> Fetch the complete documentation index at: https://pubnio.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Validate a saved draft

Validate a saved draft with [`POST /api/v1/posts/{postId}/validate`](https://pubnio.com/api/v1/docs#tag/posts/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](https://pubnio.com/api/v1/openapi) has each field's type.

## Examples

### TypeScript

```ts
const validation = await workspace.posts.validate(postId);
```

### Python

```python
validation = workspace.posts.validate(post_id)
```

### cURL

```sh
curl -X POST "https://pubnio.com/api/v1/posts/$POST_ID/validate?workspaceId=$WORKSPACE_ID" \
  -H "Authorization: Bearer $PUBNIO_API_KEY"
```

### CLI

```sh
pnio posts validate "$POST_ID"
```

### MCP execute

```js
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](https://pubnio.com/docs/reference/#shared-problems) declare.

## Idempotency

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

## Limits

- Field lengths and ranges are in the [OpenAPI document](https://pubnio.com/api/v1/openapi).

## Related

- [Posts operations](https://pubnio.com/docs/reference/#posts)
- [Publishing](https://pubnio.com/docs/publishing/)
- [Post lifecycle](https://pubnio.com/docs/concepts/post-lifecycle/)

Source: https://pubnio.com/docs/reference/posts-validate/index.mdx
