---
title: "List one account's campaigns newest first"
description: "PubNio API ads.listCampaigns: list one account's campaigns newest first. 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.

# List one account's campaigns newest first

List one account's campaigns newest first with [`GET /api/v1/ads/accounts/{accountId}/campaigns`](https://pubnio.com/api/v1/docs#tag/ads/GET/api/v1/ads/accounts/{accountId}/campaigns). Requires an API key with the `read` scope or a signed-in workspace member.

## Request

| Parameter     | In    | Type                     | Required |
| ------------- | ----- | ------------------------ | -------- |
| `accountId`   | path  | UUID                     | Yes      |
| `workspaceId` | query | UUID                     | Yes      |
| `provider`    | query | one of 9 strings         | No       |
| `status`      | query | one of 9 strings         | No       |
| `managed`     | query | `"provider"`, `"pubnio"` | No       |
| `cursor`      | query | string                   | No       |
| `limit`       | query | string                   | No       |

## Response

- HTTP 200: `AdCampaignList` with `data`, `hasMore`, `nextCursor`, `freshness`.

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

## Examples

### TypeScript

```ts
const campaigns = await workspace.ads.accountCampaigns(accountId, {
  status: "paused",
});
```

### Python

```python
campaigns = workspace.ads.list_campaigns(account_id)
```

### cURL

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

### CLI

```sh
pnio ads list-campaigns "$ACCOUNT_ID" --status paused
```

### MCP execute

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

- Up to 100 items a page; pass `nextCursor` back as `cursor`. See [Pagination](https://pubnio.com/docs/concepts/pagination/).

## Related

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

Source: https://pubnio.com/docs/reference/ads-list-campaigns/index.mdx
