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
{
"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
nextActionsays.
Retryable
No: the SDKs mark HTTP 400 not retryable.
Limits
- Match on
typeorcode, not ondetail.