Skip to content

Validate a Facebook Page post boost

PubNio API ads.validateBoost: validate a Facebook Page post boost. Request fields, examples in five clients, errors, and idempotency.

Validate a Facebook Page post boost with POST /api/v1/ads/accounts/{accountId}/boosts/validate. Requires an API key with the read scope or a signed-in workspace member.

Request

Validates the published source, Facebook Page actor, budget, schedule, targeting, spend policy, and kill switch without a provider write. Returns every issue and the next action. Phase 1 supports Facebook Page posts; Instagram is rejected.

Parameter In Type Required
accountId path UUID Yes
workspaceId query UUID Yes
Body field Type Required
postId UUID Yes
postTargetId UUID No
actorAccountId UUID No
budget AdBudget Yes
schedule AdSchedule No
targeting object No

Response

  • HTTP 200: AdValidation with valid, accountId, provider, actorAccountId, currency, budget, schedule, killSwitchActive, issues, nextAction.
    • provider: meta_ads, google_ads, reddit_ads, pinterest_ads, tiktok_ads, linkedin_ads, snapchat_ads, amazon_ads, openai_ads

The OpenAPI document has each field’s type.

Examples

const validation = await workspace.ads.validateBoost(accountId, {
  postId,
  budget: { amountMinor: 5000, currency: "USD", kind: "lifetime" },
});
validation = workspace.ads.validate_boost(
    account_id,
    post_id=post_id,
    budget={"amountMinor": 5000, "currency": "USD", "kind": "lifetime"},
)
curl -X POST "https://pubnio.com/api/v1/ads/accounts/$ACCOUNT_ID/boosts/validate?workspaceId=$WORKSPACE_ID" \
  -H "Authorization: Bearer $PUBNIO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"postId":"'"$POST_ID"'","budget":{"amountMinor":5000,"currency":"USD","kind":"lifetime"}}'
pnio ads validate-boost "$ACCOUNT_ID" --post-id "$POST_ID"
async () => {
  const accountId = "<accountId>";
  const postId = "<postId>";
  const response = await codemode.request({
    method: "POST",
    path: `/api/v1/ads/accounts/${accountId}/boosts/validate`,
    query: { workspaceId: codemode.workspaceId },
    body: {
      postId: postId,
      budget: { amountMinor: 5000, currency: "USD", kind: "lifetime" },
    },
  });
  return response.data;
};

Errors

It declares no problem of its own.

It declares the problems every Ads operation and 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