---
title: "Read a campaign plan and its target operations"
description: "PubNio API ads.getCampaignPlan: read a campaign plan and its target operations. 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.

# Read a campaign plan and its target operations

Read a campaign plan and its target operations with [`GET /api/v1/ads/plans/{planId}`](https://pubnio.com/api/v1/docs#tag/ads/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: `AdCampaignPlanDetail` with `planId`, `status`, `createdAt`, `targets`, `issues`.
  - `status`: `queued`, `creating`, `partial`, `succeeded`, `failed`, `unresolved`

The [OpenAPI document](https://pubnio.com/api/v1/openapi) has each field's type.

## Examples

### TypeScript

```ts
const plan = await workspace.ads.campaignPlan(planId);
```

### Python

```python
plan = workspace.ads.get_campaign_plan(plan_id)
```

### cURL

```sh
curl "https://pubnio.com/api/v1/ads/plans/$PLAN_ID?workspaceId=$WORKSPACE_ID" \
  -H "Authorization: Bearer $PUBNIO_API_KEY"
```

### CLI

```sh
pnio ads get-campaign-plan "$PLAN_ID"
```

### MCP execute

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

## Idempotency

None needed: a read is safe to retry.

## Limits

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

## Related

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

Source: https://pubnio.com/docs/reference/ads-get-campaign-plan/index.mdx
