> For the complete documentation index, see [llms.txt](https://api.senderwiz.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://api.senderwiz.com/customer/campaigns/get-all-campaigns.md).

# Get All Campaigns

### 📊 Get All Campaigns

List all campaigns created in your account, with support for pagination and optional filtering.

***

#### 🔹 HTTP Request

```http
GET API-URL/campaigns
```

***

#### 🔎 Query Parameters

| Parameter  | Default | Description                                                      |
| ---------- | ------- | ---------------------------------------------------------------- |
| `page`     | 1       | Current page number to retrieve.                                 |
| `per_page` | 10      | Number of campaigns per page.                                    |
| `list_uid` |         | Optional. Return only campaigns belonging to the specified list. |

***

#### 🔐 Authorization Header

```
X-API-KEY: your-api-key-here
```

***

#### 💻 PHP Example

```php
// GET ALL ITEMS
$response = $endpoint->getCampaigns($pageNumber = 1, $perPage = 10);

// DISPLAY RESPONSE
echo "<pre>";
print_r($response->body);
echo "</pre>";
```

***

#### 📦 Sample JSON Response

```json
[
  {
    "status": "success",
    "data": {
      "count": "12",
      "total_pages": 2,
      "current_page": 1,
      "next_page": 2,
      "prev_page": null,
      "records": [
        {
          "campaign_uid": "ab123cd456ef1",
          "campaign_id": "101",
          "name": "Demo Campaign #3",
          "status": "sent",
          "group": []
        },
        {
          "campaign_uid": "gh234ij567kl2",
          "campaign_id": "102",
          "name": "Demo Campaign #2",
          "status": "sent",
          "group": []
        },
        {
          "campaign_uid": "mn345op678qr3",
          "campaign_id": "103",
          "name": "Demo Campaign #1",
          "status": "sent",
          "group": []
        },
        {
          "campaign_uid": "st456uv789wx4",
          "campaign_id": "104",
          "name": "Demo Campaign Main",
          "status": "sent",
          "group": []
        },
        {
          "campaign_uid": "yz567ab890cd5",
          "campaign_id": "105",
          "name": "Launch Campaign #1",
          "status": "draft",
          "group": []
        },
        {
          "campaign_uid": "ef678gh901ij6",
          "campaign_id": "106",
          "name": "Launch Campaign #2",
          "status": "draft",
          "group": []
        },
        {
          "campaign_uid": "kl789mn012op7",
          "campaign_id": "107",
          "name": "Launch Campaign #3",
          "status": "draft",
          "group": []
        },
        {
          "campaign_uid": "qr890st123uv8",
          "campaign_id": "108",
          "name": "Paused Campaign",
          "status": "paused",
          "group": []
        },
        {
          "campaign_uid": "wx901yz234ab9",
          "campaign_id": "109",
          "name": "Test Campaign #1",
          "status": "sent",
          "group": []
        },
        {
          "campaign_uid": "cd012ef345gh0",
          "campaign_id": "110",
          "name": "Test Campaign #2",
          "status": "sent",
          "group": []
        }
      ]
    }
  }
]
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://api.senderwiz.com/customer/campaigns/get-all-campaigns.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
