---
title: "Read one ad operation"
description: "PubNio API ads.getOperation: read one ad operation. 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 one ad operation

Read one ad operation with [`GET /api/v1/ads/accounts/{accountId}/operations/{operationId}`](https://pubnio.com/api/v1/docs#tag/ads/GET/api/v1/ads/accounts/{accountId}/operations/{operationId}). Requires an API key with the `ads_read` scope or a signed-in workspace member.

## Request

Returns status, step, sanitized input and result references, issues, attempts, and the next action. Cross-workspace or cross-account IDs return 404. No provider call happens during the request.

| Parameter     | In    | Type | Required |
| ------------- | ----- | ---- | -------- |
| `accountId`   | path  | UUID | Yes      |
| `operationId` | path  | UUID | Yes      |
| `workspaceId` | query | UUID | Yes      |

## Response

- HTTP 200: `AdOperation` with `id`, `accountId`, `kind`, `status`, `step`, `input`, `result`, `issues`, `attempts`, `canRetry`, `nextAction`, `createdAt`, `updatedAt`, `startedAt`, `completedAt`.
  - `kind`: `boost.create`, `campaign.create`, `campaign.activate`, `campaign.pause`, `campaign.archive`, `ad_group.status`, `ad_group.create`, `ad.status`, `ad.attach`, `creative.create`, `campaign.duplicate`, `budget.update`
  - `status`: `queued`, `preflight`, `creating`, `recording`, `reviewing`, `activating`, `succeeded`, `partial`, `failed`, `unresolved`, `cancelled`
  - `step`: `queued`, `preflight`, `create`, `record`, `review`, `activate`, `finish`

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

## Examples

### TypeScript

```ts
const operation = await workspace.ads.operation(accountId, operationId);
```

### Python

```python
operation = workspace.ads.get_operation(account_id, operation_id)
```

### cURL

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

### CLI

```sh
pnio ads get-operation "$ACCOUNT_ID" "$OPERATION_ID"
```

### MCP execute

```js
async () => {
  const accountId = "<accountId>";
  const operationId = "<operationId>";
  const response = await codemode.request({
    method: "GET",
    path: `/api/v1/ads/accounts/${accountId}/operations/${operationId}`,
    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-operation/index.mdx
