# Get campaign progress

> GET /v2/campaigns/{campaignId}/progress

`GET https://api.zavu.dev/v2/campaigns/{campaignId}/progress`

## Parameters

- `campaignId` (path, string, required): Campaign ID. The same ID works as `broadcastId` on /v1.

## Responses

### 200

Progress.

- `status` (string, required): Current status of the campaign. `pending_review`: in the automated content review. `pending_admin_review`: the automated review passed and it waits for a person, which is where every channel but a WhatsApp campaign on an approved template goes. `rejected`: the review refused it; edit it and send again, or escalate. `scheduled` and `sending` follow approval. One of: `draft`, `pending_review`, `pending_admin_review`, `approved`, `rejected`, `escalated`, `rejected_final`, `scheduled`, `sending`, `paused`, `completed`, `cancelled`, `failed`.
- `total` (integer, required): Total contacts in broadcast.
- `pending` (integer, required): Not yet queued for sending.
- `sending` (integer, required): Currently being sent.
- `sent` (integer): Accepted by the provider, delivery not confirmed yet.
- `delivered` (integer, required): Confirmed delivered to the device.
- `failed` (integer, required): Failed to deliver.
- `skipped` (integer, required): Skipped (broadcast cancelled).
- `percentComplete` (number, required): Percentage complete (0-100).
- `estimatedCost` (number, nullable): Estimated total cost in USD.
- `reservedAmount` (number, nullable): Amount reserved from balance in USD.
- `actualCost` (number, nullable): Actual cost so far in USD.
- `startedAt` (string<date-time>)
- `estimatedCompletionAt` (string<date-time>)
- `campaignId` (string, required)

### 401

Unauthorized.

- `code` (string, required)
- `message` (string, required)
- `details` (object): Machine-readable context. Keys that mean the same thing everywhere: - `errors`: present on every `400 invalid_request` for an invalid body or query parameter, `[{path, message, ...}]`, `path` naming the field (`["to"]`, `["contacts", 2, "recipient"]`, `["limit"]`). - `recommendation`: one sentence saying what to do next. - `dashboardUrl`: the dashboard screen that fixes it. - `connect`: on `409 no_channel`, the channels this project can connect to reach the recipient, each `{type, request, note, available, dashboardUrl?}`; `request` is the exact call (`POST /v2/channels` with its body, or `POST /v2/numbers`), or null for a channel connected from the dashboard (WhatsApp, Instagram, Messenger). `available: false` says why in `note` (one-way SMS closed until business verification is approved). - `address` / `from`: the address the error is about, under the name the request used for it.
  - `errors` (object[])
    - `path` (object[], required)
    - `message` (string, required)
    - `code` (string)

### 404

Campaign not found, or it belongs to another project.

- `code` (string, required)
- `message` (string, required)
- `details` (object): Machine-readable context. Keys that mean the same thing everywhere: - `errors`: present on every `400 invalid_request` for an invalid body or query parameter, `[{path, message, ...}]`, `path` naming the field (`["to"]`, `["contacts", 2, "recipient"]`, `["limit"]`). - `recommendation`: one sentence saying what to do next. - `dashboardUrl`: the dashboard screen that fixes it. - `connect`: on `409 no_channel`, the channels this project can connect to reach the recipient, each `{type, request, note, available, dashboardUrl?}`; `request` is the exact call (`POST /v2/channels` with its body, or `POST /v2/numbers`), or null for a channel connected from the dashboard (WhatsApp, Instagram, Messenger). `available: false` says why in `note` (one-way SMS closed until business verification is approved). - `address` / `from`: the address the error is about, under the name the request used for it.
  - `errors` (object[])
    - `path` (object[], required)
    - `message` (string, required)
    - `code` (string)

## Example

```bash
curl -X GET "https://api.zavu.dev/v2/campaigns/campaign_abc123/progress" \
  -H "Authorization: Bearer $ZAVUDEV_API_KEY"
```

```typescript
import Zavudev from "@zavudev/sdk";

const zavu = new Zavudev({ apiKey: process.env.ZAVUDEV_API_KEY });

const result = await zavu.v2.campaigns.progress("campaign_abc123");

console.log(result);
```
