# Fetch All Campaigns Information

## <span style="color: rgb(2, 106, 73);">**API: goGetAllCampaigns**</span>

###  **Description**

This endpoint provides a detailed list of all campaigns configured in the system, along with their properties and current status. The response includes essential information about each campaign, such as the name, dialing method, auto-dial level, and its activation status.

## 🔗 **URL**

#### https://**DOMAIN**.croco-dial.net/goAPIv2/goCampaigns/goAPI.php

<p class="callout info align-left">**Note:** Replace `DOMAIN` with the specific domain you want to query.</p>

### **📝 Required Parameters**  


<table border="1" id="bkmrk-parameter-value-desc" style="border-collapse: collapse; width: 100%; height: 179.25px;"><colgroup><col style="width: 23.0031%;"></col><col style="width: 20.0234%;"></col><col style="width: 56.9715%;"></col></colgroup><thead><tr style="height: 29.7167px;"><td style="height: 29.7167px;">**Parameter**</td><td style="height: 29.7167px;">**Value**</td><td style="height: 29.7167px;">**Description**</td></tr></thead><tbody><tr style="height: 29.7167px;"><td style="height: 29.7167px;">goAction</td><td style="height: 29.7167px;">**goGetAllCampaigns**</td><td style="height: 29.7167px;">Action to retrieve all campaigns.</td></tr><tr style="height: 29.7167px;"><td style="height: 29.7167px;">goUser</td><td style="height: 29.7167px;">MyUser</td><td style="height: 29.7167px;">API authorized user.</td></tr><tr style="height: 29.7167px;"><td style="height: 29.7167px;">goPass</td><td style="height: 29.7167px;">MyPass</td><td style="height: 29.7167px;">Password for the API authorized user.</td></tr><tr style="height: 30.6667px;"><td style="height: 30.6667px;">responsetype</td><td style="height: 30.6667px;">json/xml</td><td style="height: 30.6667px;">Format of the response (`json` recommended).</td></tr></tbody></table>

**Note:** This endpoint uses body parameters for authentication instead of tokens or headers.

### **Request Examples:**

#### **GET:** 

```bash
curl -X GET "https://DOMAIN.croco-dial.net/goAPIv2/goCampaigns/goAPI.php?goAction=goGetAllCampaigns&goUser=MyUser&goPass=MyPass&responsetype=json"

```

#### **POST (Form Data):**

If you prefer to send the data as form parameters:

```bash
curl -X POST "https://DOMAIN.croco-dial.net/goAPIv2/goCampaigns/goAPI.php" \
  -H "Content-Type: application/x-www-form-urlencoded" \
  --data-urlencode "goAction=goGetAllCampaigns" \
  --data-urlencode "goUser=MyUser" \
  --data-urlencode "goPass=Mypass" \
  --data-urlencode "responsetype=json"

```

####  **Example Response**

```json
{
    "result": "success",
    "data": {
        "rows": [
            {
                "id": "99999999",
                "campaign_name": "SERVERS",
                "dialer": "Y",
                "campaign_vdad_exten": "Y",
                "list_order_mix": "Y",
                "dial_method": "POWER DIAL",
                "auto_dial_level": "3",
                "active": "Y"
            },
            {
                "id": "88888888",
                "campaign_name": "DEFAULT",
                "dialer": "N",
                "campaign_vdad_exten": "Y",
                "list_order_mix": "Y",
                "dial_method": "POWER DIAL",
                "auto_dial_level": "0",
                "active": "Y"
            },
            {
                "id": "77777777",
                "campaign_name": "COLLECTIONS",
                "dialer": "Y",
                "campaign_vdad_exten": "Y",
                "list_order_mix": "Y",
                "dial_method": "POWER DIAL",
                "auto_dial_level": "2",
                "active": "Y"
            },
          ...
         ]
    }
}

```


### <span class="_fadeIn_m1hgl_8">📌 </span>**<span class="_fadeIn_m1hgl_8">Response </span><span class="_fadeIn_m1hgl_8">Fields</span>**

<table border="1" id="bkmrk-field-description-id" style="width: 86.3095%; height: 283.65px; border-collapse: collapse; border-color: rgb(206, 212, 217);"><thead><tr style="height: 29.7167px;"><th style="width: 29.2691%; height: 29.7167px; border-color: rgb(206, 212, 217);">**Field**</th><th style="width: 70.7194%; height: 29.7167px; border-color: rgb(206, 212, 217);">**Description**</th></tr></thead><tbody><tr style="height: 30.6667px;"><td style="width: 29.2691%; height: 30.6667px; border-color: rgb(206, 212, 217);">`id`</td><td style="width: 70.7194%; height: 30.6667px; border-color: rgb(206, 212, 217);">Unique identifier of the campaign.</td></tr><tr style="height: 30.6667px;"><td style="width: 29.2691%; height: 30.6667px; border-color: rgb(206, 212, 217);">`campaign_name`</td><td style="width: 70.7194%; height: 30.6667px; border-color: rgb(206, 212, 217);">Name of the campaign.</td></tr><tr style="height: 30.6667px;"><td style="width: 29.2691%; height: 30.6667px; border-color: rgb(206, 212, 217);">`dialer`</td><td style="width: 70.7194%; height: 30.6667px; border-color: rgb(206, 212, 217);">Indicates if the campaign is configured for auto-dial (`Y`) or not (`N`).</td></tr><tr style="height: 34.4167px;"><td style="width: 29.2691%; height: 34.4167px; border-color: rgb(206, 212, 217);">`campaign_vdad_exten`</td><td style="width: 70.7194%; height: 34.4167px; border-color: rgb(206, 212, 217);">Defines if the campaign uses Answering Machine Detection (AMD).</td></tr><tr style="height: 30.6667px;"><td style="width: 29.2691%; height: 30.6667px; border-color: rgb(206, 212, 217);">`list_order_mix`</td><td style="width: 70.7194%; height: 30.6667px; border-color: rgb(206, 212, 217);">Indicates if the leads are mixed during the dialing process.</td></tr><tr style="height: 35.5167px;"><td style="width: 29.2691%; height: 35.5167px; border-color: rgb(206, 212, 217);">`dial_method`</td><td style="width: 70.7194%; height: 35.5167px; border-color: rgb(206, 212, 217);">The dialing method used: "POWER DIAL", "PREDICTIVE", or "PREVIEW".</td></tr><tr style="height: 30.6667px;"><td style="width: 29.2691%; height: 30.6667px; border-color: rgb(206, 212, 217);">`auto_dial_level`</td><td style="width: 70.7194%; height: 30.6667px; border-color: rgb(206, 212, 217);">Auto-dial level (number of channels per agent).</td></tr><tr style="height: 30.6667px;"><td style="width: 29.2691%; height: 30.6667px; border-color: rgb(206, 212, 217);">`active`</td><td style="width: 70.7194%; height: 30.6667px; border-color: rgb(206, 212, 217);">Specifies if the campaign is active (`Y`) or inactive (`N`).</td></tr></tbody></table>