Read a campaign plan and its target operations with GET /api/v1/ads/plans/{planId}. Requires an API key with the ads_read scope or a signed-in workspace member.
Request
Returns plan status, per-target operation progress, and created campaign references. Cross-workspace IDs return 404.
| Parameter | In | Type | Required |
|---|---|---|---|
planId |
path | UUID | Yes |
workspaceId |
query | UUID | Yes |
Response
- HTTP 200:
AdCampaignPlanDetailwithplanId,status,createdAt,targets,issues.status:queued,creating,partial,succeeded,failed,unresolved
The OpenAPI document has each field’s type.
Examples
const plan = await workspace.ads.campaignPlan(planId);plan = workspace.ads.get_campaign_plan(plan_id)curl "https://pubnio.com/api/v1/ads/plans/$PLAN_ID?workspaceId=$WORKSPACE_ID" \
-H "Authorization: Bearer $PUBNIO_API_KEY"pnio ads get-campaign-plan "$PLAN_ID"async () => {
const planId = "<planId>";
const response = await codemode.request({
method: "GET",
path: `/api/v1/ads/plans/${planId}`,
query: { workspaceId: codemode.workspaceId },
});
return response.data;
};Errors
It declares no problem of its own.
It declares the problems every Ads operation and most operations declare.
Idempotency
None needed: a read is safe to retry.
Limits
- Field lengths and ranges are in the OpenAPI document.