---
title: "Invalid ad request (invalid-ad-request)"
description: "PubNio invalid-ad-request problem, HTTP 400: An ads request is invalid for its resource: a reused Idempotency-Key, an unpublished post, a missing or archived campaign or entity, a missing budget or creative, or media that is not ready."
---

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

# Invalid ad request (invalid-ad-request)

HTTP 400 Invalid ad request. An ads request is invalid for its resource: a reused `Idempotency-Key`, an unpublished post, a missing or archived campaign or entity, a missing budget or creative, or media that is not ready.

## When it happens

40 of 175 API operations declare it.

## Response body

```json
{
  "type": "https://pubnio.com/docs/problems/invalid-ad-request/",
  "status": 400,
  "title": "Invalid ad request",
  "code": "invalid_ad_request",
  "reason": "post_not_published",
  "nextAction": "Publish the post, confirm its provider post ID, then validate again.",
  "requestId": "0f8e4c2a-6b1d-4e3f-8a9b-7c6d5e4f3a21"
}
```

| Field        | Type   | Always present |
| ------------ | ------ | -------------- |
| `reason`     | string | Yes            |
| `field`      | string | No             |
| `nextAction` | string | Yes            |

## Recovery for agents

- Do what `nextAction` says.

## Retryable

No: the SDKs mark HTTP 400 not `retryable`.

## Limits

- Match on `type` or `code`, not on `detail`.

## Related

- [Ads problems](https://pubnio.com/docs/problems/#ads)
- [API reference](https://pubnio.com/docs/api/)

Source: https://pubnio.com/docs/problems/invalid-ad-request/index.mdx
