# Get All Users

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

###  **Description**

This API endpoint fetches a complete list of all user accounts in the system along with their associated details such as name, extension, campaigns, profile level, allowed companies, and specific permissions like inbound, dialer, and manual dial capabilities. It also returns the list of all available campaigns, preview campaigns and the total of users.

## 🔗 **URL**

#### https://**DOMAIN**.croco-dial.net/goAPIv2/goUsers/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;">**goGetAllUsers**</td><td style="height: 29.7167px;">Action to retrieve all users in the system (Active and inactive ones).</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><td><span data-offset-key="d83de-0-0"><span data-text="true">only\_inactives</span></span></td><td>0</td><td>0 to show Active Users, or 1 to show Inactive Users.</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>

### **📝 Optional Parameters**  


<table border="1" id="bkmrk-parameter-value-desc-1" 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><td><span data-offset-key="d83de-0-0"><span data-text="true">only\_inactives</span></span></td><td>0 or 1</td><td>Use the value 0 to show Active Users, or 1 to show Inactive Users.</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/goUsers/goAPI.php?goAction=goGetAllUsers&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/goUsers/goAPI.php" \
  -H "Content-Type: application/x-www-form-urlencoded" \
  --data-urlencode "goAction=goGetAllUsers" \
  --data-urlencode "goUser=MyUser" \
  --data-urlencode "goPass=MyPass" \
  --data-urlencode "responsetype=json"

```

####  **Example Response**

```json
{
  "result": "success",
  "data": {
    "user_list": [
      {
        "user_id": 2222,
        "user": "Jhon.Exp",
        "name": "Jhon Example",
        "exten": 2222,
        "level": 1,
        "active": "Y",
        "campaign_id": "4460708090",
        "campaign_name": "...",
        "rank": 0,
        "profile_id": 22,
        "allowed_companys": ["AMI", "IST", "PTR"],
        "inbound": 1,
        "dialer": 1,
        "xfer": 1,
        "manual_dial_only": 0,
        "closer_campaigns": " AGENTDIRECT ",
        "agentcall_manual": "1"
      },
      ...
    ],
    "all_campaigns": [
      "SERVERS", "CUSTSERVICE", "COLLECTIONS", "NEWLOANS",
      ...
    ],
    "all_preview_campaigns": [
      {
        "campaign_id": "12345678",
        "campaign_name": "PAYMENTS"
      },
      {
        "campaign_id": "234567891",
        "campaign_name": "GENERAL"
      }
     ],
        "total_users": 165,
        "total_active_users": 165,
        "total_inactive_users": 0
    }
}

```

### <span class="_fadeIn_m1hgl_8" style="box-sizing: border-box; outline-color: rgb(51, 51, 51); outline-width: 1px; margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline;">📌 </span>**<span class="_fadeIn_m1hgl_8" style="box-sizing: border-box; outline-color: rgb(51, 51, 51); outline-width: 1px; margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline;">Response </span><span class="_fadeIn_m1hgl_8" style="box-sizing: border-box; outline-color: rgb(51, 51, 51); outline-width: 1px; margin: 0px; padding: 0px; border: 0px; font: inherit; vertical-align: baseline;">Fields</span>**

<table border="1" id="bkmrk-field-description-us" style="width: 67.5%; border-collapse: collapse; border-color: rgb(206, 212, 217);"><thead><tr><th style="width: 33.7944%; border-color: rgb(206, 212, 217);">**Field**</th><th style="width: 66.189%; border-color: rgb(206, 212, 217);">**Description**</th></tr></thead><tbody><tr><td style="width: 33.7944%; border-color: rgb(206, 212, 217);">`user_id`</td><td style="width: 66.189%; border-color: rgb(206, 212, 217);">Unique identifier for the user.</td></tr><tr><td style="width: 33.7944%; border-color: rgb(206, 212, 217);">`user`</td><td style="width: 66.189%; border-color: rgb(206, 212, 217);">Username.</td></tr><tr><td style="width: 33.7944%; border-color: rgb(206, 212, 217);">`name`</td><td style="width: 66.189%; border-color: rgb(206, 212, 217);">Full name of the user.</td></tr><tr><td style="width: 33.7944%; border-color: rgb(206, 212, 217);">`exten`</td><td style="width: 66.189%; border-color: rgb(206, 212, 217);">User extension number.</td></tr><tr><td style="width: 33.7944%; border-color: rgb(206, 212, 217);">`level`</td><td style="width: 66.189%; border-color: rgb(206, 212, 217);">Access level of the user.</td></tr><tr><td style="width: 33.7944%; border-color: rgb(206, 212, 217);">`active`</td><td style="width: 66.189%; border-color: rgb(206, 212, 217);">Whether the user is active ("Y" or "N").</td></tr><tr><td style="width: 33.7944%; border-color: rgb(206, 212, 217);">`campaign_id`</td><td style="width: 66.189%; border-color: rgb(206, 212, 217);">ID of the primary campaign assigned.</td></tr><tr><td style="width: 33.7944%; border-color: rgb(206, 212, 217);">`campaign_name`</td><td style="width: 66.189%; border-color: rgb(206, 212, 217);">Name of the primary campaign.</td></tr><tr><td style="width: 33.7944%; border-color: rgb(206, 212, 217);">`rank`</td><td style="width: 66.189%; border-color: rgb(206, 212, 217);">User rank (for prioritization).</td></tr><tr><td style="width: 33.7944%; border-color: rgb(206, 212, 217);">`profile_id`</td><td style="width: 66.189%; border-color: rgb(206, 212, 217);">ID of the assigned user profile.</td></tr><tr><td style="width: 33.7944%; border-color: rgb(206, 212, 217);">`allowed_companys`</td><td style="width: 66.189%; border-color: rgb(206, 212, 217);">List of companies the user has access to.</td></tr><tr><td style="width: 33.7944%; border-color: rgb(206, 212, 217);">`inbound`</td><td style="width: 66.189%; border-color: rgb(206, 212, 217);">Inbound call permission (1 = Yes, 0 = No).</td></tr><tr><td style="width: 33.7944%; border-color: rgb(206, 212, 217);">`dialer`</td><td style="width: 66.189%; border-color: rgb(206, 212, 217);">Dialer permission (1 = Yes, 0 = No).</td></tr><tr><td style="width: 33.7944%; border-color: rgb(206, 212, 217);">`xfer`</td><td style="width: 66.189%; border-color: rgb(206, 212, 217);">Transfer permission (1 = Yes, 0 = No).</td></tr><tr><td style="width: 33.7944%; border-color: rgb(206, 212, 217);">`manual_dial_only`</td><td style="width: 66.189%; border-color: rgb(206, 212, 217);">Whether the user is restricted to manual dialing only.</td></tr><tr><td style="width: 33.7944%; border-color: rgb(206, 212, 217);">`closer_campaigns`</td><td style="width: 66.189%; border-color: rgb(206, 212, 217);">String of campaigns available for call transfers.</td></tr><tr><td style="width: 33.7944%; border-color: rgb(206, 212, 217);">`agentcall_manual`</td><td style="width: 66.189%; border-color: rgb(206, 212, 217);">Indicates if manual agent calling is enabled (usually "1").</td></tr></tbody></table>