# API Rest

# Reports

# Outbound Call Detail Records

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

### **Description**

Fetch detailed records of outbound calls made through the last 24 hours or a specific time given. Results include per-call information like timestamp, caller, agent, disposition, campaign, and wait time. Also includes a summary of total and handled calls by campaign.

## 🔗 **URL**

#### https://**DOMAIN**.croco-dial.net/goAPIv2/goReports/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: 178.667px;"><colgroup><col style="width: 22.9972%;"></col><col style="width: 20.0399%;"></col><col style="width: 57.0543%;"></col></colgroup><thead><tr style="height: 29.6px;"><td style="height: 29.6px;">**Parameter**</td><td style="height: 29.6px;">**Value**</td><td style="height: 29.6px;">**Description**</td></tr></thead><tbody><tr style="height: 29.6px;"><td style="height: 29.6px;">goAction</td><td style="height: 29.6px;">outbound\_cdr</td><td style="height: 29.6px;">Action to perform</td></tr><tr style="height: 29.6px;"><td style="height: 29.6px;">goUser</td><td style="height: 29.6px;">MyUser</td><td style="height: 29.6px;">API authorized user.</td></tr><tr style="height: 29.6px;"><td style="height: 29.6px;">goPass</td><td style="height: 29.6px;">MyPass</td><td style="height: 29.6px;">Authorized user's password.</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: 169.417px;"><colgroup><col style="width: 23.0008%;"></col><col style="width: 28.0062%;"></col><col style="width: 48.9811%;"></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: 31.0667px;"><td style="height: 31.0667px;">tenant</td><td style="height: 31.0667px;">\['AAA', 'BBB'\]</td><td style="height: 31.0667px;"><span class="_fadeIn_m1hgl_8">A </span><span class="_fadeIn_m1hgl_8">list </span><span class="_fadeIn_m1hgl_8">of </span><span class="_fadeIn_m1hgl_8">tenants </span><span class="_fadeIn_m1hgl_8">to </span><span class="_fadeIn_m1hgl_8">filter </span><span class="_fadeIn_m1hgl_8">the </span><span class="_fadeIn_m1hgl_8">results. (Three characters only)</span></td></tr><tr style="height: 31.0667px;"><td style="height: 31.0667px;">profile</td><td style="height: 31.0667px;">\['LOANS', 'COLLECTIONS'\]</td><td style="height: 31.0667px;"><span class="_fadeIn_m1hgl_8">A </span><span class="_fadeIn_m1hgl_8">list </span><span class="_fadeIn_m1hgl_8">of </span><span class="_fadeIn_m1hgl_8">profiles </span><span class="_fadeIn_m1hgl_8">to </span><span class="_fadeIn_m1hgl_8">filter </span><span class="_fadeIn_m1hgl_8">the </span><span class="_fadeIn_m1hgl_8">results.</span></td></tr><tr style="height: 46.5px;"><td style="height: 46.5px;">fromDate</td><td style="height: 46.5px;">`YYYY-MM-DD`</td><td style="height: 46.5px;"><span class="_fadeIn_m1hgl_8">The </span><span class="_fadeIn_m1hgl_8">start </span><span class="_fadeIn_m1hgl_8">date </span><span class="_fadeIn_m1hgl_8">for </span><span class="_fadeIn_m1hgl_8">the </span><span class="_fadeIn_m1hgl_8">report. </span><span style="color: rgb(22, 145, 121);"><span class="_fadeIn_m1hgl_8">If </span><span class="_fadeIn_m1hgl_8">no </span><span class="_fadeIn_m1hgl_8">date </span><span class="_fadeIn_m1hgl_8">range </span><span class="_fadeIn_m1hgl_8">is </span><span class="_fadeIn_m1hgl_8">provided, </span><span class="_fadeIn_m1hgl_8">the </span><span class="_fadeIn_m1hgl_8">endpoint </span><span class="_fadeIn_m1hgl_8">defaults </span><span class="_fadeIn_m1hgl_8">to </span><span class="_fadeIn_m1hgl_8">returning </span><span class="_fadeIn_m1hgl_8">records </span><span class="_fadeIn_m1hgl_8">from </span><span class="_fadeIn_m1hgl_8">the </span><span class="_fadeIn_m1hgl_8">last </span><span class="_fadeIn_m1hgl_8">24 </span><span class="_fadeIn_m1hgl_8">hours.</span></span></td></tr><tr style="height: 31.0667px;"><td style="height: 31.0667px;">toDate</td><td style="height: 31.0667px;">`YYYY-MM-DD`</td><td style="height: 31.0667px;">The end date for the report.</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/goReports/goAPI.php?goAction=outbound_cdr&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/goReports/goAPI.php" \
  -H "Content-Type: application/x-www-form-urlencoded" \
  --data-urlencode "goAction=outbound_cdr" \
  --data-urlencode "goUser=MyUSer" \
  --data-urlencode "goPass=MyPass" \
  --data-urlencode "responsetype=json"

```

####  **Example Response**

```json
{
    "result": "success",
    "data": {
        "rows": [
            {
                "call_date": "2025-05-02 06:58:53",
                "src": "8888888888",
                "dst": "3333333333",
                "agent": "Agent.Example",
                "campaign": "CAMPAIGN-1",
                "call_type": "Dialer",
                "disposition": "Voicemail",
                "carrier_disposition": "Answer",
                "term_reason": "AGENT",
                "queue_time": "0",
                "portfolio": "AAA",
                "vendor_lead_code": "11111111-22222222...",
                "lead_id": "11111111",
                "list_id": "222222222222222",
                "entry_date": "2025-05-02 06:55:08"
            },
            {
                "call_date": "2025-05-02 06:58:54",
                "src": "2222222222",
                "dst": "4444444444",
                "agent": "Agent.Example",
                "campaign": "CAMPAIGN-2",
                "call_type": "Dialer",
                "disposition": "Voicemail",
                "carrier_disposition": "Answer",
                "term_reason": "AGENT",
                "queue_time": "37",
                "portfolio": "BBB",
                "vendor_lead_code": "22222222-33333333...",
                "lead_id": "222222222",
                "list_id": "33333333333333",
                "entry_date": "2025-05-02 06:55:08"
            },
          ...
       ],
        "headers": [
          ...
        ],
        "summary_headers": [
          ...
        ],
        "summary_rows": [
            {
                "campaign_name": "CAMPAIGN-1",
                "total_leads": 296,
                "dialable": 296,
                "pending": 0,
                "total_calls": 651,
                "dialer": 526,
                "dialed": 651,
                "manual_calls": 125,
                "handled_calls": 285,
                "total_removed": 0,
                "removed": 127,
                "remove_all_period": 127
            },
            {
                "campaign_name": "CAMPAIGN-2",
                "total_leads": 3031,
                "dialable": 3031,
                "pending": 2018,
                "total_calls": 1013,
                "dialer": 1010,
                "dialed": 1013,
                "manual_calls": 3,
                "handled_calls": 661,
                "total_removed": 0,
                "removed": 11,
                "remove_all_period": 11
            },
          ...
        ]
    }
}
```

# Inbound Call Detail Records

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

### **Description**

This API provides detailed information about inbound calls handled by crocodial. It includes timestamps, caller and destination numbers, queue and campaign metadata, agent assignments, and call outcomes. This API is useful for analyzing call flow, queue behavior, and agent performance in inbound call operations.

## 🔗 **URL**

#### https://**DOMAIN**.croco-dial.net/goAPIv2/goReports/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: 178.667px;"><colgroup><col style="width: 22.9972%;"></col><col style="width: 20.0399%;"></col><col style="width: 57.0543%;"></col></colgroup><thead><tr style="height: 29.6px;"><td style="height: 29.6px;">**Parameter**</td><td style="height: 29.6px;">**Value**</td><td style="height: 29.6px;">**Description**</td></tr></thead><tbody><tr style="height: 29.6px;"><td style="height: 29.6px;">goAction</td><td style="height: 29.6px;">inbound\_cdr</td><td style="height: 29.6px;">API's name. Action to perform.</td></tr><tr style="height: 29.6px;"><td style="height: 29.6px;">goUser</td><td style="height: 29.6px;">MyUser</td><td style="height: 29.6px;">API authorized user.</td></tr><tr style="height: 29.6px;"><td style="height: 29.6px;">goPass</td><td style="height: 29.6px;">MyPass</td><td style="height: 29.6px;">Authorized user's password.</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: 169.417px;"><colgroup><col style="width: 23.0008%;"></col><col style="width: 28.0062%;"></col><col style="width: 48.9811%;"></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: 31.0667px;"><td style="height: 31.0667px;">tenant</td><td style="height: 31.0667px;">\['AAA', 'BBB'\]</td><td style="height: 31.0667px;"><span class="_fadeIn_m1hgl_8">A </span><span class="_fadeIn_m1hgl_8">list </span><span class="_fadeIn_m1hgl_8">of </span><span class="_fadeIn_m1hgl_8">tenants </span><span class="_fadeIn_m1hgl_8">to </span><span class="_fadeIn_m1hgl_8">filter </span><span class="_fadeIn_m1hgl_8">the </span><span class="_fadeIn_m1hgl_8">results. (Three characters only)</span></td></tr><tr style="height: 31.0667px;"><td style="height: 31.0667px;">profile</td><td style="height: 31.0667px;">\['LOANS', 'COLLECTIONS'\]</td><td style="height: 31.0667px;"><span class="_fadeIn_m1hgl_8">A </span><span class="_fadeIn_m1hgl_8">list </span><span class="_fadeIn_m1hgl_8">of </span><span class="_fadeIn_m1hgl_8">profiles </span><span class="_fadeIn_m1hgl_8">to </span><span class="_fadeIn_m1hgl_8">filter </span><span class="_fadeIn_m1hgl_8">the </span><span class="_fadeIn_m1hgl_8">results.</span></td></tr><tr style="height: 46.5px;"><td style="height: 46.5px;">fromDate</td><td style="height: 46.5px;">`YYYY-MM-DD`</td><td style="height: 46.5px;"><span class="_fadeIn_m1hgl_8">The </span><span class="_fadeIn_m1hgl_8">start </span><span class="_fadeIn_m1hgl_8">date </span><span class="_fadeIn_m1hgl_8">for </span><span class="_fadeIn_m1hgl_8">the </span><span class="_fadeIn_m1hgl_8">report. </span><span style="color: rgb(22, 145, 121);"><span class="_fadeIn_m1hgl_8">If </span><span class="_fadeIn_m1hgl_8">no </span><span class="_fadeIn_m1hgl_8">date </span><span class="_fadeIn_m1hgl_8">range </span><span class="_fadeIn_m1hgl_8">is </span><span class="_fadeIn_m1hgl_8">provided, </span><span class="_fadeIn_m1hgl_8">the </span><span class="_fadeIn_m1hgl_8">endpoint </span><span class="_fadeIn_m1hgl_8">defaults </span><span class="_fadeIn_m1hgl_8">to </span><span class="_fadeIn_m1hgl_8">returning </span><span class="_fadeIn_m1hgl_8">records </span><span class="_fadeIn_m1hgl_8">from </span><span class="_fadeIn_m1hgl_8">the </span><span class="_fadeIn_m1hgl_8">last </span><span class="_fadeIn_m1hgl_8">24 </span><span class="_fadeIn_m1hgl_8">hours.</span></span></td></tr><tr style="height: 31.0667px;"><td style="height: 31.0667px;">toDate</td><td style="height: 31.0667px;">`YYYY-MM-DD`</td><td style="height: 31.0667px;">The end date for the report.</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/goReports/goAPI.php?goAction=inbound_cdr&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/goReports/goAPI.php" \
  -H "Content-Type: application/x-www-form-urlencoded" \
  --data-urlencode "goAction=inbound_cdr" \
  --data-urlencode "goUser=MyUSer" \
  --data-urlencode "goPass=MyPass" \
  --data-urlencode "responsetype=json" \
  --data-urlencode "tenant[]=CCC" \
  --data-urlencode "profile[]=COLLECTIONS" \

```

####  **Example Response**

```json
{
    "result": "success",
    "data": {
        "rows": [
            {
                "call_date": "2025-05-29 22:23:05",
                "enter_on_queue": "2025-05-29 22:23:33",
                "src": "5551234567",
                "dst": "5559876543",
                "carrier": "SIP/EXAMPLE1-00000001",
                "uniq1": "1234567890.000001",
                "queue": "EXAMPLE_QUEUE_1",
                "agent": "Agent001",
                "campaign": "EXAMPLE_CAMPAIGN_A",
                "disposition": "Live Disconnect",
                "term_reason": "CALLER",
                "queue_time": "0",
                "call_duration": "34",
                "queue_position": "1",
                "portfolio": "PORTFOLIO_A",
                "lead_id": "10000001",
                "list_id": "Example List",
                "vendor_lead_code": "John Doe"
            },
            {
                "call_date": "2025-05-29 20:07:06",
                "enter_on_queue": "2025-05-29 20:07:15",
                "src": "5557654321",
                "dst": "5552468135",
                "carrier": "SIP/EXAMPLE2-00000002",
                "uniq1": "1234567890.000002",
                "queue": "EXAMPLE_QUEUE_2",
                "agent": "Agent002",
                "campaign": "EXAMPLE_CAMPAIGN_B",
                "disposition": "Denied",
                "term_reason": "CALLER",
                "queue_time": "0",
                "call_duration": "140",
                "queue_position": "1",
                "portfolio": "PORTFOLIO_B",
                "lead_id": "10000002",
                "list_id": "Example List",
                "vendor_lead_code": "Jane Smith"
            }
        ],
        "headers": [
            ...
        ]
    }
}

```

### <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-name-descripti" style="border-collapse: collapse; border-color: rgb(206, 212, 217);"><thead><tr><th style="border-color: rgb(206, 212, 217);">**Field Name**</th><th style="border-color: rgb(206, 212, 217);">**Description**</th></tr></thead><tbody><tr><td style="border-color: rgb(206, 212, 217);">`call_date`</td><td style="border-color: rgb(206, 212, 217);">Date and time when the call started.</td></tr><tr><td style="border-color: rgb(206, 212, 217);">`enter_on_queue`</td><td style="border-color: rgb(206, 212, 217);">Timestamp when the caller entered the queue.</td></tr><tr><td style="border-color: rgb(206, 212, 217);">`src`</td><td style="border-color: rgb(206, 212, 217);">Caller’s phone number.</td></tr><tr><td style="border-color: rgb(206, 212, 217);">`dst`</td><td style="border-color: rgb(206, 212, 217);">Destination phone number (usually the DID or agent extension).</td></tr><tr><td style="border-color: rgb(206, 212, 217);">`carrier`</td><td style="border-color: rgb(206, 212, 217);">The SIP carrier or trunk that handled the call.</td></tr><tr><td style="border-color: rgb(206, 212, 217);">`uniq1`</td><td style="border-color: rgb(206, 212, 217);">Unique call identifier. Often used for logging and tracking.</td></tr><tr><td style="border-color: rgb(206, 212, 217);">`queue`</td><td style="border-color: rgb(206, 212, 217);">Queue name where the call was routed.</td></tr><tr><td style="border-color: rgb(206, 212, 217);">`agent`</td><td style="border-color: rgb(206, 212, 217);">Agent who handled the call.</td></tr><tr><td style="border-color: rgb(206, 212, 217);">`campaign`</td><td style="border-color: rgb(206, 212, 217);">Campaign associated with the call.</td></tr><tr><td style="border-color: rgb(206, 212, 217);">`disposition`</td><td style="border-color: rgb(206, 212, 217);">Final status of the call (e.g., Answered, Denied, Live Disconnect).</td></tr><tr><td style="border-color: rgb(206, 212, 217);">`term_reason`</td><td style="border-color: rgb(206, 212, 217);">Call termination reason (e.g., AGENT, CALLER, QUEUE\_TIMEOUT).</td></tr><tr><td style="border-color: rgb(206, 212, 217);">`queue_time`</td><td style="border-color: rgb(206, 212, 217);">Time in seconds the caller spent in queue.</td></tr><tr><td style="border-color: rgb(206, 212, 217);">`call_duration`</td><td style="border-color: rgb(206, 212, 217);">Total duration of the call in seconds.</td></tr><tr><td style="border-color: rgb(206, 212, 217);">`queue_position`</td><td style="border-color: rgb(206, 212, 217);">Position of the caller in the queue at entry.</td></tr><tr><td style="border-color: rgb(206, 212, 217);">`portfolio`</td><td style="border-color: rgb(206, 212, 217);">Portfolio or business unit associated with the call.</td></tr><tr><td style="border-color: rgb(206, 212, 217);">`lead_id`</td><td style="border-color: rgb(206, 212, 217);">Identifier of the lead/contact associated with the call.</td></tr><tr><td style="border-color: rgb(206, 212, 217);">`list_id`</td><td style="border-color: rgb(206, 212, 217);">Name or ID of the list from which the lead came.</td></tr><tr><td style="border-color: rgb(206, 212, 217);">`vendor_lead_code`</td><td style="border-color: rgb(206, 212, 217);">Lead code from the vendor (usually the customer's name or tag).</td></tr></tbody></table>

# Agent Activity Report

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

### **Description**

This API provides detailed reporting data for agents over a specified date range. It returns various statistics such as activity times, call durations, and sales for individual users, as well as aggregated summaries for specific parameters.

## 🔗 **URL**

#### https://**DOMAIN**.croco-dial.net/goAPIv2/goReports/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: 241.784px;"><colgroup><col style="width: 23.0008%;"></col><col style="width: 27.9976%;"></col><col style="width: 48.9896%;"></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;">exportAgentReport</td><td style="height: 29.7167px;">Action to perform</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;">Authorized user's password.</td></tr><tr style="height: 31.0667px;"><td style="height: 31.0667px;">responsetype</td><td style="height: 31.0667px;">json/xml</td><td style="height: 31.0667px;">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: 241.784px;"><colgroup><col style="width: 23.0008%;"></col><col style="width: 27.9976%;"></col><col style="width: 48.9896%;"></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: 31.0667px;"><td style="height: 31.0667px;">fromDate</td><td style="height: 31.0667px;">`YYYY-MM-DD`</td><td style="height: 31.0667px;">The start date for the report.</td></tr><tr style="height: 31.0667px;"><td style="height: 31.0667px;">toDate</td><td style="height: 31.0667px;">`YYYY-MM-DD`</td><td style="height: 31.0667px;">The end date for the report.</td></tr><tr style="height: 29.7167px;"><td style="height: 29.7167px;">user</td><td style="height: 29.7167px;">\['example.user1', 'example.user2'\]</td><td style="height: 29.7167px;">A list of specific users to include in the report.</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/goReports/goAPI.php?goAction=exportAgentReport&goUser=MyUser&goPass=MyPass&responsetype=json&fromDate=2025-05-01&toDate=2025-05-14&user=example.user1
```

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

If you prefer to send the data as form parameters:

```bash
curl -X POST "https://DOMAIN.croco-dial.net/goAPIv2/goReports/goAPI.php" \
  -H "Content-Type: application/x-www-form-urlencoded" \
  --data-urlencode "goAction=exportAgentReport" \
  --data-urlencode "goUser=MyUser" \
  --data-urlencode "goPass=MyPass" \
  --data-urlencode "responsetype=json" \
  --data-urlencode "fromDate=2025-05-09" \
  --data-urlencode "toDate=2025-05-10" \
  --data-urlencode "user[]=Example.User1" \
  --data-urlencode "user[]=Example.User2"
```

####  **Example Response**

```json
{
    "result": "success",
    "data": {
        "headers": [
            {
                "title": "User",
                "field": "user",
                "frozen": true
            },
            {
                "title": "First Activity",
                "field": "first_activity",
                "minWidth": 125
            },
           ...
        ],
        "rows": [
            {
                "user": "Example.User1",
                "portfolio": "CSC",
                "first_activity": "2025-05-05 10:39:25",
                "last_activity": "2025-05-05 20:00:41",
                "avalible": "6708",
                "avail_between_calls": "10",
                "talk": "21066",
                "avg_talk": "30",
                "talk_+_avail": "27774",
                "wp_sec": null,
                "aftercall": "2203",
                "total_calls": "684",
                "break": "3699",
                "pause": "6",
                "login_time": "33685",
                "sales": "3",
                "denied": "0",
                "lip": "0",
                "vrf": "0",
                "profile": "Servers"
            },
            {
                "user": "Example.User1",
                "portfolio": "GAL",
                "first_activity": "2025-05-05 12:06:13",
                "last_activity": "2025-05-05 20:57:27",
                "avalible": "5542",
                "avail_between_calls": "19",
                "talk": "15440",
                "avg_talk": "42",
                "talk_+_avail": "20982",
                "wp_sec": null,
                "aftercall": "3263",
                "total_calls": "299",
                "break": "6394",
                "pause": "125",
                "login_time": "30926",
                "sales": "4",
                "denied": "0",
                "lip": "0",
                "vrf": "0",
                "profile": "Mul Portfo"
            }
        ],
        "summary_headers": [
            {
                "title": "Type",
                "field": "type",
                "frozen": true
            },
            {
                "title": "Login Time",
                "field": "login_time"
            },
           ...
        ],
        "summary_rows": [
            {
                "type": "Summary",
                "user": 0,
                "portfolio": 0,
                "first_activity": 4050,
                "last_activity": 4050,
                "avalible": 12250,
                "avail_between_calls": 29,
                "talk": 36506,
                "avg_talk": 72,
                "talk_+_avail": 48756,
                "wp_sec": 0,
                "aftercall": 5466,
                "total_calls": 983,
                "break": 10093,
                "pause": 131,
                "login_time": 64611,
                "sales": 7,
                "denied": 0,
                "lip": 0,
                "vrf": 0,
                "profile": 0
            },
            {
                "type": "Average",
                "user": 0,
                "portfolio": 0,
                "first_activity": 2025,
                "last_activity": 2025,
                "avalible": 6125,
                "avail_between_calls": 14.5,
                "talk": 18253,
                "avg_talk": 36,
                "talk_+_avail": 24378,
                "wp_sec": 0,
                "aftercall": 2733,
                "total_calls": 491.5,
                "break": 5046.5,
                "pause": 65.5,
                "login_time": 32305.5,
                "sales": 3.5,
                "denied": 0,
                "lip": 0,
                "vrf": 0,
                "profile": 0
            },
            {
                "type": "Max",
                "user": 0,
                "portfolio": 0,
                "first_activity": 2025,
                "last_activity": 2025,
                "avalible": 5542,
                "avail_between_calls": 19,
                "talk": 15440,
                "avg_talk": 42,
                "talk_+_avail": 20982,
                "wp_sec": 0,
                "aftercall": 3263,
                "total_calls": 299,
                "break": 6394,
                "pause": 125,
                "login_time": 30926,
                "sales": 4,
                "denied": 0,
                "lip": 0,
                "vrf": 0,
                "profile": 0
            },
            {
                "type": "Min",
                "user": 0,
                "portfolio": 0,
                "first_activity": 2025,
                "last_activity": 2025,
                "avalible": 5542,
                "avail_between_calls": 10,
                "talk": 15440,
                "avg_talk": 30,
                "talk_+_avail": 20982,
                "wp_sec": 0,
                "aftercall": 2203,
                "total_calls": 299,
                "break": 3699,
                "pause": 6,
                "login_time": 30926,
                "sales": 3,
                "denied": 0,
                "lip": 0,
                "vrf": 0,
                "profile": 0
            }
        ]
    }
}
```

# Agent Call Detail Records

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

### **Description**

<span class="_fadeIn_m1hgl_8">This endpoint allows you to retrieve detailed call records of agents, providing comprehensive information such as user details, call times, dispositions, phone numbers, call types, and more. You can specify the agents and the date range to include in the report. This API is ideal for generating detailed call logs, monitoring agent activity, and analyzing call performance across different campaigns and portfolios.</span>

## 🔗 **URL**

#### https://**DOMAIN**.croco-dial.net/goAPIv2/goReports/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: 149.934px;"><colgroup><col style="width: 23.0008%;"></col><col style="width: 27.9976%;"></col><col style="width: 48.9896%;"></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;">**agent\_cdr**</td><td style="height: 29.7167px;">Action to perform</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;">Authorized user's password.</td></tr><tr style="height: 31.0667px;"><td style="height: 31.0667px;">responsetype</td><td style="height: 31.0667px;">json/xml</td><td style="height: 31.0667px;">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: 183.7px;"><colgroup><col style="width: 23.0008%;"></col><col style="width: 28.0062%;"></col><col style="width: 48.9811%;"></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;">user</td><td style="height: 29.7167px;">\['example.user1', 'example.user2'\]</td><td style="height: 29.7167px;">A list of specific users to include in the report.</td></tr><tr style="height: 31.0667px;"><td style="height: 31.0667px;">tenant</td><td style="height: 31.0667px;">\['AAA', 'BBB'\]</td><td style="height: 31.0667px;"><span class="_fadeIn_m1hgl_8">A </span><span class="_fadeIn_m1hgl_8">list </span><span class="_fadeIn_m1hgl_8">of </span><span class="_fadeIn_m1hgl_8">tenants </span><span class="_fadeIn_m1hgl_8">to </span><span class="_fadeIn_m1hgl_8">filter </span><span class="_fadeIn_m1hgl_8">the </span><span class="_fadeIn_m1hgl_8">results. (Three characters only)</span></td></tr><tr style="height: 31.0667px;"><td style="height: 31.0667px;">profile</td><td style="height: 31.0667px;">\['SERVERS', 'COLLECTIONS'\]</td><td style="height: 31.0667px;"><span class="_fadeIn_m1hgl_8">A </span><span class="_fadeIn_m1hgl_8">list </span><span class="_fadeIn_m1hgl_8">of </span><span class="_fadeIn_m1hgl_8">profiles </span><span class="_fadeIn_m1hgl_8">to </span><span class="_fadeIn_m1hgl_8">filter </span><span class="_fadeIn_m1hgl_8">the </span><span class="_fadeIn_m1hgl_8">results.</span></td></tr><tr style="height: 31.0667px;"><td style="height: 31.0667px;">fromDate</td><td style="height: 31.0667px;">`YYYY-MM-DD`</td><td style="height: 31.0667px;"><span class="_fadeIn_m1hgl_8">The </span><span class="_fadeIn_m1hgl_8">start </span><span class="_fadeIn_m1hgl_8">date </span><span class="_fadeIn_m1hgl_8">for </span><span class="_fadeIn_m1hgl_8">the </span><span class="_fadeIn_m1hgl_8">report. </span><span style="color: rgb(22, 145, 121);"><span class="_fadeIn_m1hgl_8">If </span><span class="_fadeIn_m1hgl_8">no </span><span class="_fadeIn_m1hgl_8">date </span><span class="_fadeIn_m1hgl_8">range </span><span class="_fadeIn_m1hgl_8">is </span><span class="_fadeIn_m1hgl_8">provided, </span><span class="_fadeIn_m1hgl_8">the </span><span class="_fadeIn_m1hgl_8">endpoint </span><span class="_fadeIn_m1hgl_8">defaults </span><span class="_fadeIn_m1hgl_8">to </span><span class="_fadeIn_m1hgl_8">returning </span><span class="_fadeIn_m1hgl_8">records </span><span class="_fadeIn_m1hgl_8">from </span><span class="_fadeIn_m1hgl_8">the </span><span class="_fadeIn_m1hgl_8">last </span><span class="_fadeIn_m1hgl_8">24 </span><span class="_fadeIn_m1hgl_8">hours.</span></span></td></tr><tr style="height: 31.0667px;"><td style="height: 31.0667px;">toDate</td><td style="height: 31.0667px;">`YYYY-MM-DD`</td><td style="height: 31.0667px;">The end date for the report.</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/goReports/goAPI.php?goAction=agent_cdr&goUser=MyUser&goPass=MyPass&responsetype=json&profile[]=COLLECTIONS&tenant[]=CSC&fromDate=2025-05-13&toDate=2025-05-13"

```

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

If you prefer to send the data as form parameters:

```bash
curl -X POST "https://DOMAIN.croco-dial.net/goAPIv2/goReports/goAPI.php" \
  -H "Content-Type: application/x-www-form-urlencoded" \
  --data-urlencode "goAction=agent_cdr" \
  --data-urlencode "goUser=MyUser" \
  --data-urlencode "goPass=MyPass" \
  --data-urlencode "responsetype=json" \
  --data-urlencode "profile[]=COLLECTIONS" \
  --data-urlencode "tenant[]=CSC" \
  --data-urlencode "fromDate=2025-05-13" \
  --data-urlencode "toDate=2025-05-13"
```

####  **Example Response**

```json
{
    "result": "success",
    "data": {
        "rows": [
            {
                "user": "Example.User1",
                "answer_time": "2025-05-13 20:59:08",
                "disposition": "VM / NML",
                "phone_number": "1234567890",
                "loan_number": "1111111-222222-...",
                "call_type": "MANUAL",
                "call_duration": "00:00:47",
                "lead_id": 3333333,
                "term_reason": "CALLER",
                "portfolio": "GAL",
                "campaign_name": "GALSERVERS"
            },
            {
                "user": "Example.User2",
                "answer_time": "2025-05-13 20:56:45",
                "disposition": "VM / NML",
                "phone_number": "9876543210",
                "loan_number": "33333333-444444...",
                "call_type": "DIALER",
                "call_duration": "00:00:20",
                "lead_id": 3344444,
                "term_reason": "CALLER",
                "portfolio": "GAL",
                "campaign_name": "GALFRESHLEADS"
            },
          ...
                  ],
        "headers": [
            {
                "title": "USER",
                "field": "user",
                "formatter": "html"
            },
            {
                "title": "ANSWER TIME",
                "field": "answer_time",
                "formatter": "html"
            },
          ...
        ]
    }
}
```

### <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-us" style="width: 77.6191%; border-collapse: collapse; border-color: rgb(206, 212, 217);"><thead><tr><th style="width: 34.5627%; border-color: rgb(206, 212, 217);">**Field**</th><th style="width: 65.4141%; border-color: rgb(206, 212, 217);">**Description**</th></tr></thead><tbody><tr><td style="width: 34.5627%; border-color: rgb(206, 212, 217);">**user**</td><td style="width: 65.4141%; border-color: rgb(206, 212, 217);">Agent's username.</td></tr><tr><td style="width: 34.5627%; border-color: rgb(206, 212, 217);">**answer\_time**</td><td style="width: 65.4141%; border-color: rgb(206, 212, 217);">Timestamp when the call was answered.</td></tr><tr><td style="width: 34.5627%; border-color: rgb(206, 212, 217);">**disposition**</td><td style="width: 65.4141%; border-color: rgb(206, 212, 217);">Call result or status (e.g., VM / NML).</td></tr><tr><td style="width: 34.5627%; border-color: rgb(206, 212, 217);">**phone\_number**</td><td style="width: 65.4141%; border-color: rgb(206, 212, 217);">Contact phone number.</td></tr><tr><td style="width: 34.5627%; border-color: rgb(206, 212, 217);">**loan\_number**</td><td style="width: 65.4141%; border-color: rgb(206, 212, 217);"><span class="_fadeIn_m1hgl_8">Unique </span><span class="_fadeIn_m1hgl_8">Identifier for the loan record.</span></td></tr><tr><td style="width: 34.5627%; border-color: rgb(206, 212, 217);">**call\_type**</td><td style="width: 65.4141%; border-color: rgb(206, 212, 217);">Type of call (e.g., MANUAL, DIALER).</td></tr><tr><td style="width: 34.5627%; border-color: rgb(206, 212, 217);">**call\_duration**</td><td style="width: 65.4141%; border-color: rgb(206, 212, 217);">Total duration of the call.</td></tr><tr><td style="width: 34.5627%; border-color: rgb(206, 212, 217);">**lead\_id**</td><td style="width: 65.4141%; border-color: rgb(206, 212, 217);">Unique identifier of the lead.</td></tr><tr><td style="width: 34.5627%; border-color: rgb(206, 212, 217);">**term\_reason**</td><td style="width: 65.4141%; border-color: rgb(206, 212, 217);">Reason for call termination.</td></tr><tr><td style="width: 34.5627%; border-color: rgb(206, 212, 217);">**portfolio**</td><td style="width: 65.4141%; border-color: rgb(206, 212, 217);">Portfolio associated with the call.</td></tr><tr><td style="width: 34.5627%; border-color: rgb(206, 212, 217);">**campaign\_name**</td><td style="width: 65.4141%; border-color: rgb(206, 212, 217);">Name of the campaign associated with the call.</td></tr></tbody></table>

# Agent Calls Summary Report

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

### **Description**

This endpoint provides detailed information of agent. Shows a breakdown of call metrics for each agent, including average talk time, total calls, and call types (manual, inbound, dialer).

## 🔗 **URL**

#### https://**DOMAIN**.croco-dial.net/goAPIv2/goReports/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: 149.934px;"><colgroup><col style="width: 23.0008%;"></col><col style="width: 27.9976%;"></col><col style="width: 48.9896%;"></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;">**agent\_calls\_report**</td><td style="height: 29.7167px;">Action to perform</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;">Authorized user's password.</td></tr><tr style="height: 31.0667px;"><td style="height: 31.0667px;">responsetype</td><td style="height: 31.0667px;">json/xml</td><td style="height: 31.0667px;">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: 183.7px;"><colgroup><col style="width: 23.0008%;"></col><col style="width: 28.0062%;"></col><col style="width: 48.9811%;"></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;">user</td><td style="height: 29.7167px;">\['example.user1', 'example.user2'\]</td><td style="height: 29.7167px;">A list of specific users to include in the report.</td></tr><tr style="height: 31.0667px;"><td style="height: 31.0667px;">tenant</td><td style="height: 31.0667px;">\['AAA', 'BBB'\]</td><td style="height: 31.0667px;"><span class="_fadeIn_m1hgl_8">A </span><span class="_fadeIn_m1hgl_8">list </span><span class="_fadeIn_m1hgl_8">of </span><span class="_fadeIn_m1hgl_8">tenants </span><span class="_fadeIn_m1hgl_8">to </span><span class="_fadeIn_m1hgl_8">filter </span><span class="_fadeIn_m1hgl_8">the </span><span class="_fadeIn_m1hgl_8">results. (Three characters only)</span></td></tr><tr style="height: 31.0667px;"><td style="height: 31.0667px;">profile</td><td style="height: 31.0667px;">\['SERVERS', 'COLLECTIONS'\]</td><td style="height: 31.0667px;"><span class="_fadeIn_m1hgl_8">A </span><span class="_fadeIn_m1hgl_8">list </span><span class="_fadeIn_m1hgl_8">of </span><span class="_fadeIn_m1hgl_8">profiles </span><span class="_fadeIn_m1hgl_8">to </span><span class="_fadeIn_m1hgl_8">filter </span><span class="_fadeIn_m1hgl_8">the </span><span class="_fadeIn_m1hgl_8">results.</span></td></tr><tr style="height: 31.0667px;"><td style="height: 31.0667px;">fromDate</td><td style="height: 31.0667px;">`YYYY-MM-DD`</td><td style="height: 31.0667px;"><span class="_fadeIn_m1hgl_8">The </span><span class="_fadeIn_m1hgl_8">start </span><span class="_fadeIn_m1hgl_8">date </span><span class="_fadeIn_m1hgl_8">for </span><span class="_fadeIn_m1hgl_8">the </span><span class="_fadeIn_m1hgl_8">report. </span><span style="color: rgb(22, 145, 121);"><span class="_fadeIn_m1hgl_8">If </span><span class="_fadeIn_m1hgl_8">no </span><span class="_fadeIn_m1hgl_8">date </span><span class="_fadeIn_m1hgl_8">range </span><span class="_fadeIn_m1hgl_8">is </span><span class="_fadeIn_m1hgl_8">provided, </span><span class="_fadeIn_m1hgl_8">the </span><span class="_fadeIn_m1hgl_8">endpoint </span><span class="_fadeIn_m1hgl_8">defaults </span><span class="_fadeIn_m1hgl_8">to </span><span class="_fadeIn_m1hgl_8">returning </span><span class="_fadeIn_m1hgl_8">records </span><span class="_fadeIn_m1hgl_8">from </span><span class="_fadeIn_m1hgl_8">the </span><span class="_fadeIn_m1hgl_8">last </span><span class="_fadeIn_m1hgl_8">24 </span><span class="_fadeIn_m1hgl_8">hours.</span></span></td></tr><tr style="height: 31.0667px;"><td style="height: 31.0667px;">toDate</td><td style="height: 31.0667px;">`YYYY-MM-DD`</td><td style="height: 31.0667px;">The end date for the report.</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/goReports/goAPI.php?goAction=agent_calls_report&goUser=MyUser&goPass=MyPass&responsetype=json&profile[]=SERVERS&tenant[]=GAL&fromDate=2025-05-12&toDate=2025-05-14"

```

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

If you prefer to send the data as form parameters:

```bash
curl -X POST "https://DOMAIN.croco-dial.net/goAPIv2/goReports/goAPI.php" \
  -H "Content-Type: application/x-www-form-urlencoded" \
  --data-urlencode "goAction=agent_calls_report" \
  --data-urlencode "goUser=MyUser" \
  --data-urlencode "goPass=MyPass" \
  --data-urlencode "responsetype=json" \
  --data-urlencode "profile[]=SERVERS" \
  --data-urlencode "tenant[]=GAL" \
  --data-urlencode "fromDate=2025-05-12" \
  --data-urlencode "toDate=2025-05-14"
```

####  **Example Response**

```json
{
    "result": "success",
    "data": {
        "agent_report": {
            "headers": [
              ...
            ],
            "rows": [
                {
                    "user": "User.Example1",
                    "profile": "Collections",
                    "portfolio": "GAL",
                    "avg_talk": "43",
                    "total_calls": "577",
                    "manual": "9",
                    "inbound": "12",
                    "dialer": "0"
                },
                {
                    "user": "User.Example2",
                    "profile": "Servers",
                    "portfolio": "CSC",
                    "avg_talk": "67",
                    "total_calls": "245",
                    "manual": "24",
                    "inbound": "22",
                    "dialer": "0"
                },
                {
                    "user": "User.Example3",
                    "profile": "VIP",
                    "portfolio": "ADMIN",
                    "avg_talk": "46",
                    "total_calls": "887",
                    "manual": "235",
                    "inbound": "41",
                    "dialer": "0"
                },
              ...
            ]
        },
        "frequency_report": {
            "headers": [],
            "rows": []
        }
    }
}
              
```

### <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-us" style="width: 77.619%; border-collapse: collapse; border-color: rgb(206, 212, 217); height: 270.672px;"><thead><tr style="height: 29.7969px;"><th style="width: 25.8437%; height: 29.7969px;">**Field**</th><th style="width: 74.3099%; height: 29.7969px;">**Description**</th></tr></thead><tbody><tr style="height: 30.1094px;"><td style="width: 25.8437%; height: 30.1094px;">**user**</td><td style="width: 74.3099%; height: 30.1094px;">Username of the agent.</td></tr><tr style="height: 30.1094px;"><td style="width: 25.8437%; height: 30.1094px;">**profile**</td><td style="width: 74.3099%; height: 30.1094px;">Profile assigned to the agent (e.g., Servers, Loan, VIP).</td></tr><tr style="height: 30.1094px;"><td style="width: 25.8437%; height: 30.1094px;">**portfolio**</td><td style="width: 74.3099%; height: 30.1094px;">The portfolio associated with the agent (e.g., CSC, GAL).</td></tr><tr style="height: 30.1094px;"><td style="width: 25.8437%; height: 30.1094px;">**avg\_talk**</td><td style="width: 74.3099%; height: 30.1094px;">Average handle time of the agent in seconds.</td></tr><tr style="height: 30.1094px;"><td style="width: 25.8437%; height: 30.1094px;">**total\_calls**</td><td style="width: 74.3099%; height: 30.1094px;">Total number of calls handled.</td></tr><tr style="height: 30.1094px;"><td style="width: 25.8437%; height: 30.1094px;">**manual**</td><td style="width: 74.3099%; height: 30.1094px;">Number of manual calls made.</td></tr><tr style="height: 30.1094px;"><td style="width: 25.8437%; height: 30.1094px;">**inbound**</td><td style="width: 74.3099%; height: 30.1094px;">Number of inbound calls received.</td></tr><tr style="height: 30.1094px;"><td style="width: 25.8437%; height: 30.1094px;">**dialer**</td><td style="width: 74.3099%; height: 30.1094px;">Number of dialer calls made.</td></tr></tbody></table>

# Export Agents Pause Report

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

### **Description**

<span class="_fadeIn_m1hgl_8">This endpoint provides a detailed breakdown of agent activity across billable and non-billable categories during login sessions. It returns metrics such as talk time, after-call work, breaks, and total login duration per agent in seconds, allowing for precise time tracking and performance analysis. This report is essential for understanding how agents allocate their working hours.</span>

## 🔗 **URL**

#### https://**DOMAIN**.croco-dial.net/goAPIv2/goReports/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: 149.934px;"><colgroup><col style="width: 23.0008%;"></col><col style="width: 28.0062%;"></col><col style="width: 48.9811%;"></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;">**agent\_cdr**</td><td style="height: 29.7167px;">Action to perform</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;">Authorized user's password.</td></tr><tr><td style="height: 31.0667px;">responsetype</td><td style="height: 31.0667px;">json/xml</td><td style="height: 31.0667px;">Format of the response (`json` recommended).</td></tr><tr><td style="height: 31.0667px;">fromDate</td><td style="height: 31.0667px;">`YYYY-MM-DD`</td><td style="height: 31.0667px;"><span class="_fadeIn_m1hgl_8">The </span><span class="_fadeIn_m1hgl_8">start </span><span class="_fadeIn_m1hgl_8">date </span><span class="_fadeIn_m1hgl_8">for </span><span class="_fadeIn_m1hgl_8">the </span><span class="_fadeIn_m1hgl_8">report.</span></td></tr><tr style="height: 31.0667px;"><td style="height: 31.0667px;">toDate</td><td style="height: 31.0667px;">`YYYY-MM-DD`</td><td style="height: 31.0667px;">The end date for the report.</td></tr></tbody></table>

### **Optional Parameters**

<table border="1" id="bkmrk-parameter-value-desc-1" style="border-collapse: collapse; width: 100%; height: 183.7px;"><colgroup><col style="width: 23.0008%;"></col><col style="width: 28.0062%;"></col><col style="width: 48.9811%;"></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;">user</td><td style="height: 29.7167px;">\['example.user1', 'example.user2'\]</td><td style="height: 29.7167px;">A list of specific users to include in the report.</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/goReports/goAPI.php?goAction=exportPauseReport&goUser=MyUser&goPass=MyPass&responsetype=json&fromDate=2025-05-25&toDate=2025-05-27"

```

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

If you prefer to send the data as form parameters:

```bash
curl -X POST "https://DOMAIN.croco-dial.net/goAPIv2/goReports/goAPI.php" \
  -H "Content-Type: application/x-www-form-urlencoded" \
  --data-urlencode "goAction=exportPauseReport" \
  --data-urlencode "goUser=MyUser" \
  --data-urlencode "goPass=MyPass" \
  --data-urlencode "responsetype=json" \
  --data-urlencode "user[]=Example.User1" \
  --data-urlencode "user[]=Example.User2" \
  --data-urlencode "fromDate=2025-05-13" \
  --data-urlencode "toDate=2025-05-13"
```

####  **Example Response**

```json
{
    "result": "success",
    "data": {
        "headers": [
           ...
        ],
        "rows": [
            {
                "user": "Example.User1",
                "logged_days": 1,
                "pause_sec": 6571,
                "wait_sec": 16789,
                "talk_sec": 973,
                "wp_sec": 3314,
                "dispo_sec": 1899,
                "dead_sec": 157,
                "manual_talk": 6757,
                "pause": 58,
                "dialne": 643,
                "manual": 1001,
                "priv": 2232,
                "virtua": 2460,
                "data": 0,
                "meetin": 0,
                "train": 0,
                "wc": 0,
                "lunch": 0,
                "lagged": 0,
                "login": 0,
                "andial": 0,
                "billable_time": 29879,
                "no_billable_time": 2290,
                "total_time": 32169
            },
            {
                "user": "Example.User2",
                "logged_days": 1,
                "pause_sec": 9567,
                "wait_sec": 12565,
                "talk_sec": 4679,
                "wp_sec": 0,
                "dispo_sec": 484,
                "dead_sec": 14,
                "manual_talk": 1365,
                "pause": 956,
                "dialne": 49,
                "login": 11,
                "lunch": 1870,
                "manual": 37,
                "priv": 1387,
                "virtua": 1753,
                "wc": 635,
                "data": 0,
                "meetin": 0,
                "train": 0,
                "lagged": 0,
                "andial": 0,
                "billable_time": 20883,
                "no_billable_time": 4859,
                "total_time": 25742
            }
        ]
    }
}
```

### <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-name-descripti" style="width: 65.1191%; height: 651.034px; border-collapse: collapse; border-color: rgb(206, 212, 217);"><thead><tr style="height: 29.7px;"><td class="align-center" style="width: 28.3831%; height: 29.7px; border-color: rgb(206, 212, 217);">**Field Name**</td><td class="align-center" style="width: 71.5986%; height: 29.7px; border-color: rgb(206, 212, 217);">**Description**</td></tr></thead><tbody><tr style="height: 31.0667px;"><td style="width: 28.3831%; height: 31.0667px; border-color: rgb(206, 212, 217);">`user`</td><td style="width: 71.5986%; height: 31.0667px; border-color: rgb(206, 212, 217);">Username of the agent.</td></tr><tr style="height: 31.0667px;"><td style="width: 28.3831%; height: 31.0667px; border-color: rgb(206, 212, 217);">`logged_days`</td><td style="width: 71.5986%; height: 31.0667px; border-color: rgb(206, 212, 217);">Number of days the agent has logged in.</td></tr><tr style="height: 31.0667px;"><td style="width: 28.3831%; height: 31.0667px; border-color: rgb(206, 212, 217);">`dispo_sec`</td><td style="width: 71.5986%; height: 31.0667px; border-color: rgb(206, 212, 217);">Seconds spent in after-call disposition (aftercall).</td></tr><tr style="height: 31.0667px;"><td style="width: 28.3831%; height: 31.0667px; border-color: rgb(206, 212, 217);">`wait_sec`</td><td style="width: 71.5986%; height: 31.0667px; border-color: rgb(206, 212, 217);">Seconds spent available, waiting for calls (available).</td></tr><tr style="height: 31.0667px;"><td style="width: 28.3831%; height: 31.0667px; border-color: rgb(206, 212, 217);">`talk_sec`</td><td style="width: 71.5986%; height: 31.0667px; border-color: rgb(206, 212, 217);">Seconds spent talking on calls.</td></tr><tr style="height: 31.0667px;"><td style="width: 28.3831%; height: 31.0667px; border-color: rgb(206, 212, 217);">`manual_talk`</td><td style="width: 71.5986%; height: 31.0667px; border-color: rgb(206, 212, 217);">Seconds spent talking on manually dialed calls.</td></tr><tr style="height: 31.0667px;"><td style="width: 28.3831%; height: 31.0667px; border-color: rgb(206, 212, 217);">`manual`</td><td style="width: 71.5986%; height: 31.0667px; border-color: rgb(206, 212, 217);">Time spent in manual dial mode (excluding talk time).</td></tr><tr style="height: 31.0667px;"><td style="width: 28.3831%; height: 31.0667px; border-color: rgb(206, 212, 217);">`data`</td><td style="width: 71.5986%; height: 31.0667px; border-color: rgb(206, 212, 217);">Time spent handling data-related tasks.</td></tr><tr style="height: 31.0667px;"><td style="width: 28.3831%; height: 31.0667px; border-color: rgb(206, 212, 217);">`virtua`</td><td style="width: 71.5986%; height: 31.0667px; border-color: rgb(206, 212, 217);">Time categorized as "Virtua" (custom category).</td></tr><tr style="height: 31.0667px;"><td style="width: 28.3831%; height: 31.0667px; border-color: rgb(206, 212, 217);">`billable_time`</td><td style="width: 71.5986%; height: 31.0667px; border-color: rgb(206, 212, 217);">Total time that is considered billable.</td></tr><tr style="height: 31.0667px;"><td style="width: 28.3831%; height: 31.0667px; border-color: rgb(206, 212, 217);">`lunch`</td><td style="width: 71.5986%; height: 31.0667px; border-color: rgb(206, 212, 217);">Time spent on lunch breaks.</td></tr><tr style="height: 31.0667px;"><td style="width: 28.3831%; height: 31.0667px; border-color: rgb(206, 212, 217);">`wc`</td><td style="width: 71.5986%; height: 31.0667px; border-color: rgb(206, 212, 217);">Time marked for bathroom breaks.</td></tr><tr style="height: 31.0667px;"><td style="width: 28.3831%; height: 31.0667px; border-color: rgb(206, 212, 217);">`priv`</td><td style="width: 71.5986%; height: 31.0667px; border-color: rgb(206, 212, 217);">Time spent on personal/private breaks.</td></tr><tr style="height: 31.0667px;"><td style="width: 28.3831%; height: 31.0667px; border-color: rgb(206, 212, 217);">`train`</td><td style="width: 71.5986%; height: 31.0667px; border-color: rgb(206, 212, 217);">Time spent in training sessions.</td></tr><tr style="height: 31.0667px;"><td style="width: 28.3831%; height: 31.0667px; border-color: rgb(206, 212, 217);">`meetin`</td><td style="width: 71.5986%; height: 31.0667px; border-color: rgb(206, 212, 217);">Time spent in meetings.</td></tr><tr style="height: 31.0667px;"><td style="width: 28.3831%; height: 31.0667px; border-color: rgb(206, 212, 217);">`pause`</td><td style="width: 71.5986%; height: 31.0667px; border-color: rgb(206, 212, 217);">Time paused without a specific reason.</td></tr><tr style="height: 31.0667px;"><td style="width: 28.3831%; height: 31.0667px; border-color: rgb(206, 212, 217);">`lagged`</td><td style="width: 71.5986%; height: 31.0667px; border-color: rgb(206, 212, 217);">Time marked as lagged (connectivity/system delays).</td></tr><tr style="height: 31.0667px;"><td style="width: 28.3831%; height: 31.0667px; border-color: rgb(206, 212, 217);">`login`</td><td style="width: 71.5986%; height: 31.0667px; border-color: rgb(206, 212, 217);">Time spent during login stage.</td></tr><tr style="height: 31.0667px;"><td style="width: 28.3831%; height: 31.0667px; border-color: rgb(206, 212, 217);">`no_billable_time`</td><td style="width: 71.5986%; height: 31.0667px; border-color: rgb(206, 212, 217);">Total non-billable time.</td></tr><tr style="height: 31.0667px;"><td style="width: 28.3831%; height: 31.0667px; border-color: rgb(206, 212, 217);">`total_time`</td><td style="width: 71.5986%; height: 31.0667px; border-color: rgb(206, 212, 217);">Total login session time (billable + non-billable).</td></tr></tbody></table>

# Inbound Call Summary Statistics

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

### **Description**

This endpoint provides a summarized report of inbound call activity for a given date range, optionally filtered by tenant. It returns daily metrics including total calls, queued calls, abandoned calls (split by those that waited more than 20 seconds), handled calls, and average hold and handle times.

## 🔗 **URL**

#### https://**DOMAIN**.croco-dial.net/goAPIv2/goReports/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: 149.934px;"><colgroup><col style="width: 23.0008%;"></col><col style="width: 28.0062%;"></col><col style="width: 48.9811%;"></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;">**inbound\_summary\_stats**</td><td style="height: 29.7167px;">Action to perform. Name of endpoint</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;">Authorized user's password.</td></tr><tr><td style="height: 31.0667px;">responsetype</td><td style="height: 31.0667px;">json/xml</td><td style="height: 31.0667px;">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: 121.719px;"><colgroup><col style="width: 23.0036%;"></col><col style="width: 28.0095%;"></col><col style="width: 48.9869%;"></col></colgroup><thead><tr style="height: 29.7969px;"><td style="height: 29.7969px;">**Parameter**</td><td style="height: 29.7969px;">**Value**</td><td style="height: 29.7969px;">**Description**</td></tr></thead><tbody><tr style="height: 31.0625px;"><td style="height: 31.0625px;">fromDate</td><td style="height: 31.0625px;">`YYYY-MM-DD`</td><td style="height: 31.0625px;"><span class="_fadeIn_m1hgl_8">The </span><span class="_fadeIn_m1hgl_8">start </span><span class="_fadeIn_m1hgl_8">date </span><span class="_fadeIn_m1hgl_8">for </span><span class="_fadeIn_m1hgl_8">the </span><span class="_fadeIn_m1hgl_8">report.</span></td></tr><tr style="height: 31.0625px;"><td style="height: 31.0625px;">toDate</td><td style="height: 31.0625px;">`YYYY-MM-DD`</td><td style="height: 31.0625px;">The end date for the report.</td></tr><tr style="height: 29.7969px;"><td style="height: 29.7969px;">tenant</td><td style="height: 29.7969px;">\["AAA", "BBB"\]</td><td style="height: 29.7969px;">Array of tenant identifiers to restrict data.</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/goReports/goAPI.php?goAction=inbound_summary_stats&goUser=MyUser&goPass=MyPass&responsetype=json&fromDate=2025-05-25&toDate=2025-05-30"
```

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

If you prefer to send the data as form parameters:

```bash
curl -X POST "https://DOMAIN.croco-dial.net/goAPIv2/goReports/goAPI.php" \
  -H "Content-Type: application/x-www-form-urlencoded" \
  --data-urlencode "goAction=inbound_summary_stats" \
  --data-urlencode "goUser=MyUser" \
  --data-urlencode "goPass=MyPass" \
  --data-urlencode "responsetype=json" \
  --data-urlencode "tenant[]=TTY" \
  --data-urlencode "fromDate=2025-05-20" \
  --data-urlencode "toDate=2025-05-30"
```

####  **Example Response**

```json
{
    "result": "success",
    "data": {
        "rows": [
            {
                "calldate": "2025-05-28",
                "total_calls": "693",
                "queued_calls": "424",
                "abandon1": "38",
                "abandon2": "61",
                "handled_calls": "372",
                "avg_hold_time": "67.78",
                "avg_handle_time": "469.33"
            },
            {
                "calldate": "2025-05-29",
                "total_calls": "716",
                "queued_calls": "507",
                "abandon1": "42",
                "abandon2": "57",
                "handled_calls": "448",
                "avg_hold_time": "38.84",
                "avg_handle_time": "544.30"
            },
            {
                "calldate": "2025-05-30",
                "total_calls": "308",
                "queued_calls": "204",
                "abandon1": "54",
                "abandon2": "24",
                "handled_calls": "130",
                "avg_hold_time": "147.03",
                "avg_handle_time": "423.23"
            },
        ],
        "headers": [
           ...
        ]
    }
}
```

### <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-ca" style="border-collapse: collapse; border-color: rgb(206, 212, 217); border-width: 1px;"><thead><tr><th style="border-color: rgb(206, 212, 217);">**Field**</th><th style="border-color: rgb(206, 212, 217);">**Description**</th></tr></thead><tbody><tr><td style="border-color: rgb(206, 212, 217);">`calldate`</td><td style="border-color: rgb(206, 212, 217);">The date of the call activity (`YYYY-MM-DD`).</td></tr><tr><td style="border-color: rgb(206, 212, 217);">`total_calls`</td><td style="border-color: rgb(206, 212, 217);">Total inbound calls received.</td></tr><tr><td style="border-color: rgb(206, 212, 217);">`queued_calls`</td><td style="border-color: rgb(206, 212, 217);">Calls that entered the queue.</td></tr><tr><td style="border-color: rgb(206, 212, 217);">`abandon1`</td><td style="border-color: rgb(206, 212, 217);">Calls abandoned *after* waiting more than 20 seconds.</td></tr><tr><td style="border-color: rgb(206, 212, 217);">`abandon2`</td><td style="border-color: rgb(206, 212, 217);">All abandoned calls, including those under 20 seconds.</td></tr><tr><td style="border-color: rgb(206, 212, 217);">`handled_calls`</td><td style="border-color: rgb(206, 212, 217);">Calls successfully answered by an agent.</td></tr><tr><td style="border-color: rgb(206, 212, 217);">`avg_hold_time`</td><td style="border-color: rgb(206, 212, 217);">Average hold time (in seconds).</td></tr><tr><td style="border-color: rgb(206, 212, 217);">`avg_handle_time`</td><td style="border-color: rgb(206, 212, 217);">Average handle time (in seconds).</td></tr></tbody></table>

# Agent Summary Statistics

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

###  **Description**

This endpoint retrieves a summary of agent activity and performance statistics over the last day. It is useful for supervisors and managers to monitor agent productivity, call handling metrics, and time distribution across various call and pause states. This returns detailed data per agent, including call counts (manual, inbound, dialer), time spent in login, pause, talk, and break statuses, as well as call outcomes and user profile information.

## 🔗 **URL**

#### https://**DOMAIN**.croco-dial.net/goAPIv2/goReports/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%;"><colgroup> <col style="width: 23%;"></col> <col style="width: 20%;"></col> <col style="width: 57%;"></col> </colgroup><thead><tr><td>**Parameter**</td><td>**Value**</td><td>**Description**</td></tr></thead><tbody><tr><td>goAction</td><td>agent\_summary\_stats</td><td>Action to perform</td></tr><tr><td>goUser</td><td>MyUser</td><td>API authorized user.</td></tr><tr><td>goPass</td><td>MyPass</td><td>Authorized user's password.</td></tr><tr><td>responsetype</td><td>json/xml</td><td>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/goReports/goAPI.php?goAction=agent_summary_stats&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/goReports/goAPI.php" \
  -H "Content-Type: application/x-www-form-urlencoded" \
  --data-urlencode "goAction=agent_summary_stats" \
  --data-urlencode "goUser=MyUser" \
  --data-urlencode "goPass=MyPass" \
  --data-urlencode "responsetype=json"

```

####  **Example Response**

```json
{
  "result": "success",
  "data": {
    "dates": "'2025-05-06' AND '2025-05-06 23:59:59'",
    "headers": [...],
    "rows": [
            {
                "USER": "user.example",
                "calls_handled": "8",
                "manual_calls": "0",
                "inbound_calls": "8",
                "dialer_calls": "0",
                "xfer_out": "0",
                "xfer_in": "0",
                "voicemail": "0",
                "denied": "0",
                "noa": "0",
                "sales": "0",
                "WIT": "0",
                "login_time": "18455",
                "pause": "8",
                "break": "853",
                "talk": "1847",
                "most_dispo": null,
                "portfolio": "AAA",
                "profile": "CUSTSERVICE"
            },
            {
                "USER": "user.example2",
                "calls_handled": "71",
                "manual_calls": "68",
                "inbound_calls": "3",
                "dialer_calls": "68",
                "xfer_out": "0",
                "xfer_in": "0",
                "voicemail": "0",
                "denied": "0",
                "noa": "0",
                "sales": "0",
                "WIT": "0",
                "login_time": "18709",
                "pause": "298",
                "break": "1877",
                "talk": "1640",
                "most_dispo": null,
                "portfolio": "BBB",
                "profile": "COLLECTIONS"
            },
        ...
      ]
  }
}
```

### **Data Fields per Agent**

<div class="_tableContainer_16hzy_1" id="bkmrk-field-description-us"><div class="_tableWrapper_16hzy_14 group flex w-fit flex-col-reverse align-left" tabindex="-1"><table border="1" class="w-fit min-w-(--thread-content-width) align-left" data-end="3246" data-start="1862" style="width: 51.6675%; height: 611.788px; border-collapse: collapse; border-color: rgb(206, 212, 217); border-width: 1px;"><thead><tr data-end="1927" data-start="1862" style="height: 29.6887px;"><td data-col-size="sm" data-end="1880" data-start="1862" style="width: 32.9494%; height: 29.6887px; border-color: rgb(206, 212, 217);">**Field**</td><td data-col-size="sm" data-end="1927" data-start="1880" style="width: 67.0253%; height: 29.6887px; border-color: rgb(206, 212, 217);">**Description**</td></tr></thead><tbody data-end="3246" data-start="1993"><tr data-end="2058" data-start="1993" style="height: 30.6368px;"><td data-col-size="sm" data-end="2011" data-start="1993" style="width: 32.9494%; height: 30.6368px; border-color: rgb(206, 212, 217);">`USER`</td><td data-col-size="sm" data-end="2058" data-start="2011" style="width: 67.0253%; height: 30.6368px; border-color: rgb(206, 212, 217);">Agent username</td></tr><tr data-end="2124" data-start="2059" style="height: 30.6368px;"><td data-col-size="sm" data-end="2077" data-start="2059" style="width: 32.9494%; height: 30.6368px; border-color: rgb(206, 212, 217);">`calls_handled`</td><td data-col-size="sm" data-end="2124" data-start="2077" style="width: 67.0253%; height: 30.6368px; border-color: rgb(206, 212, 217);">Total number of calls handled</td></tr><tr data-end="2190" data-start="2125" style="height: 30.6368px;"><td data-col-size="sm" data-end="2143" data-start="2125" style="width: 32.9494%; height: 30.6368px; border-color: rgb(206, 212, 217);">`manual_calls`</td><td data-col-size="sm" data-end="2190" data-start="2143" style="width: 67.0253%; height: 30.6368px; border-color: rgb(206, 212, 217);">Outbound manual calls</td></tr><tr data-end="2256" data-start="2191" style="height: 30.6368px;"><td data-col-size="sm" data-end="2209" data-start="2191" style="width: 32.9494%; height: 30.6368px; border-color: rgb(206, 212, 217);">`inbound_calls`</td><td data-col-size="sm" data-end="2256" data-start="2209" style="width: 67.0253%; height: 30.6368px; border-color: rgb(206, 212, 217);">Calls received from inbound queues</td></tr><tr data-end="2322" data-start="2257" style="height: 30.6368px;"><td data-col-size="sm" data-end="2275" data-start="2257" style="width: 32.9494%; height: 30.6368px; border-color: rgb(206, 212, 217);">`dialer_calls`</td><td data-col-size="sm" data-end="2322" data-start="2275" style="width: 67.0253%; height: 30.6368px; border-color: rgb(206, 212, 217);">Calls initiated by the dialer</td></tr><tr data-end="2388" data-start="2323" style="height: 30.6368px;"><td data-col-size="sm" data-end="2341" data-start="2323" style="width: 32.9494%; height: 30.6368px; border-color: rgb(206, 212, 217);">`xfer_out`</td><td data-col-size="sm" data-end="2388" data-start="2341" style="width: 67.0253%; height: 30.6368px; border-color: rgb(206, 212, 217);">Calls transferred out by the agent</td></tr><tr data-end="2454" data-start="2389" style="height: 30.6368px;"><td data-col-size="sm" data-end="2407" data-start="2389" style="width: 32.9494%; height: 30.6368px; border-color: rgb(206, 212, 217);">`xfer_in`</td><td data-col-size="sm" data-end="2454" data-start="2407" style="width: 67.0253%; height: 30.6368px; border-color: rgb(206, 212, 217);">Calls transferred to the agent</td></tr><tr data-end="2520" data-start="2455" style="height: 30.6368px;"><td data-col-size="sm" data-end="2473" data-start="2455" style="width: 32.9494%; height: 30.6368px; border-color: rgb(206, 212, 217);">`voicemail`</td><td data-col-size="sm" data-end="2520" data-start="2473" style="width: 67.0253%; height: 30.6368px; border-color: rgb(206, 212, 217);">Voicemails left or received</td></tr><tr data-end="2586" data-start="2521" style="height: 30.6368px;"><td data-col-size="sm" data-end="2539" data-start="2521" style="width: 32.9494%; height: 30.6368px; border-color: rgb(206, 212, 217);">`denied`</td><td data-col-size="sm" data-end="2586" data-start="2539" style="width: 67.0253%; height: 30.6368px; border-color: rgb(206, 212, 217);">Calls denied or blocked</td></tr><tr data-end="2652" data-start="2587" style="height: 30.6368px;"><td data-col-size="sm" data-end="2605" data-start="2587" style="width: 32.9494%; height: 30.6368px; border-color: rgb(206, 212, 217);">`noa`</td><td data-col-size="sm" data-end="2652" data-start="2605" style="width: 67.0253%; height: 30.6368px; border-color: rgb(206, 212, 217);">Not answered (No Answer)</td></tr><tr data-end="2718" data-start="2653" style="height: 30.6368px;"><td data-col-size="sm" data-end="2671" data-start="2653" style="width: 32.9494%; height: 30.6368px; border-color: rgb(206, 212, 217);">`sales`</td><td data-col-size="sm" data-end="2718" data-start="2671" style="width: 67.0253%; height: 30.6368px; border-color: rgb(206, 212, 217);">Calls marked as sales</td></tr><tr data-end="2784" data-start="2719" style="height: 30.6368px;"><td data-col-size="sm" data-end="2737" data-start="2719" style="width: 32.9494%; height: 30.6368px; border-color: rgb(206, 212, 217);">`WIT`</td><td data-col-size="sm" data-end="2784" data-start="2737" style="width: 67.0253%; height: 30.6368px; border-color: rgb(206, 212, 217);">Calls marked with “WIT” disposition</td></tr><tr data-end="2850" data-start="2785" style="height: 30.6368px;"><td data-col-size="sm" data-end="2803" data-start="2785" style="width: 32.9494%; height: 30.6368px; border-color: rgb(206, 212, 217);">`login_time`</td><td data-col-size="sm" data-end="2850" data-start="2803" style="width: 67.0253%; height: 30.6368px; border-color: rgb(206, 212, 217);">Total login time (in seconds)</td></tr><tr data-end="2916" data-start="2851" style="height: 30.6368px;"><td data-col-size="sm" data-end="2869" data-start="2851" style="width: 32.9494%; height: 30.6368px; border-color: rgb(206, 212, 217);">`pause`</td><td data-col-size="sm" data-end="2916" data-start="2869" style="width: 67.0253%; height: 30.6368px; border-color: rgb(206, 212, 217);">Total pause time (in seconds)</td></tr><tr data-end="2982" data-start="2917" style="height: 30.6368px;"><td data-col-size="sm" data-end="2935" data-start="2917" style="width: 32.9494%; height: 30.6368px; border-color: rgb(206, 212, 217);">`break`</td><td data-col-size="sm" data-end="2982" data-start="2935" style="width: 67.0253%; height: 30.6368px; border-color: rgb(206, 212, 217);">Total break time (in seconds)</td></tr><tr data-end="3048" data-start="2983" style="height: 30.6368px;"><td data-col-size="sm" data-end="3001" data-start="2983" style="width: 32.9494%; height: 30.6368px; border-color: rgb(206, 212, 217);">`talk`</td><td data-col-size="sm" data-end="3048" data-start="3001" style="width: 67.0253%; height: 30.6368px; border-color: rgb(206, 212, 217);">Total talk time (in seconds)</td></tr><tr data-end="3114" data-start="3049" style="height: 30.6368px;"><td data-col-size="sm" data-end="3067" data-start="3049" style="width: 32.9494%; height: 30.6368px; border-color: rgb(206, 212, 217);">`most_dispo`</td><td data-col-size="sm" data-end="3114" data-start="3067" style="width: 67.0253%; height: 30.6368px; border-color: rgb(206, 212, 217);">Most frequent call disposition</td></tr><tr data-end="3180" data-start="3115" style="height: 30.6368px;"><td data-col-size="sm" data-end="3133" data-start="3115" style="width: 32.9494%; height: 30.6368px; border-color: rgb(206, 212, 217);">`portfolio`</td><td data-col-size="sm" data-end="3180" data-start="3133" style="width: 67.0253%; height: 30.6368px; border-color: rgb(206, 212, 217);">Associated portfolio name</td></tr><tr data-end="3246" data-start="3181" style="height: 30.6368px;"><td data-col-size="sm" data-end="3199" data-start="3181" style="width: 32.9494%; height: 30.6368px; border-color: rgb(206, 212, 217);">`profile`</td><td data-col-size="sm" data-end="3246" data-start="3199" style="width: 67.0253%; height: 30.6368px; border-color: rgb(206, 212, 217);">Agent's role or function profile</td></tr></tbody></table>

</div></div>

# Dashboard

# Agents Time Metrics and Usage Statistics

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

###  **Description**

This endpoint retrieves detailed time usage statistics for each agent, showing how much time was spent in different states such as talking, paused, available, and more. It also includes general usage averages across all agents.

## 🔗 **URL**

#### https://**DOMAIN**.croco-dial.net/goAPIv2/goDashboard/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%;"><colgroup> <col style="width: 23%;"></col> <col style="width: 20%;"></col> <col style="width: 57%;"></col> </colgroup><thead><tr><td>**Parameter**</td><td>**Value**</td><td>**Description**</td></tr></thead><tbody><tr><td>goAction</td><td>agentTimeUsage</td><td>Action to perform.</td></tr><tr><td>goUser</td><td>MyUser</td><td>API authorized user.</td></tr><tr><td>goPass</td><td>MyPass</td><td>Authorized user's password.</td></tr><tr><td>responsetype</td><td>json/xml</td><td>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/goDashboard/goAPI.php?goAction=agentTimeUsage&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/goDashboard/goAPI.php" \
  -H "Content-Type: application/x-www-form-urlencoded" \
  --data-urlencode "goAction=agentTimeUsage" \
  --data-urlencode "goUser=MyUser" \
  --data-urlencode "goPass=MyPass" \
  --data-urlencode "responsetype=json"

```

####  **Example Response**

```json
{
  "result": "success",
  "data": {
    "breakdown": [
      {
        "user": "john.doe",
        "first_login": 0,
        "last_logoff": 0,
        "login_time": 14.0,
        "after_call": 0,
        "break": 12.0,
        "pausa": 0,
        "avalible": 30.0,
        "talk": 37.14,
        "wrapup": 0,
        "cust_leave": 0,
        "total_calls": 25,
        "pause": 15.0,
        "ready": 25.0
      },
      {
        "user": "jane.smith",
        "first_login": 0,
        "last_logoff": 0,
        "login_time": 140,
        "after_call": 0,
        "break": 18.0,
        "pausa": 0,
        "avalible": 42.0,
        "talk": 57.54,
        "wrapup": 0,
        "cust_leave": 2,
        "total_calls": 30,
        "pause": 12.5,
        "ready": 30.5
      },
      ...
    ],
    "general": {
      "pause": 13.75,
      "ready": 27.75,
      "talk": 38.0
    }
  }
}

```

# Get Agents Availability Overview

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

###  **Description**

This endpoint retrieves the current status of agents in the system, including how many are connected, paused, ready, in a call, or offline.

## 🔗 **URL**

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

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

### **📝 Body Parameters**  


<table border="1" id="bkmrk-parameter-value-desc" style="border-collapse: collapse; width: 100%;"><colgroup> <col style="width: 25%;"></col> <col style="width: 25%;"></col> <col style="width: 50%;"></col> </colgroup><thead><tr><td>**Parameter**</td><td>**Value**</td><td>**Description**</td></tr></thead><tbody><tr><td>goAction</td><td>getAgentStatus</td><td>Action to perform. This parameter specifies the exact operation the API should execute.</td></tr><tr><td>goUser</td><td>MyUser</td><td>API authorized user.</td></tr><tr><td>goPass</td><td>MyPass</td><td>Authorized user's password.</td></tr><tr><td>responsetype</td><td>json/xml</td><td>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/goDashboard/goAPI.php?goAction=getAgentStatus&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/goDashboard/goAPI.php" \
  -H "Content-Type: application/x-www-form-urlencoded" \
  --data-urlencode "goAction=getAgentStatus" \
  --data-urlencode "goUser=MyUser" \
  --data-urlencode "goPass=MyPass" \
  --data-urlencode "responsetype=json"

```

####  **Example Response**

```json
{
  "result": "success",
  "data": {
    "total_live_agents": 61,
    "paused_agents": 9,
    "ready_agents": 24,
    "incall_agents": 28,
    "offline_agents": 42,
    "total_active_agents": 102
  }
}

```

# Get Total Number of Agents Currently in Call

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

###  **Description**

This endpoint retrieves the **total number of agents currently handling calls**. It specifically looks for agents that are in the following states: InCall, Queue, 3-Way and Park. Is perfect for **real-time monitoring** of agent activity. It allows you to quickly know how many agents are currently in action.

## 🔗 **URL**

#### https://**DOMAIN**.croco-dial.net/goAPIv2/goDashboard/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%;"><colgroup> <col style="width: 23%;"></col> <col style="width: 20%;"></col> <col style="width: 57%;"></col> </colgroup><thead><tr><td>**Parameter**</td><td>**Value**</td><td>**Description**</td></tr></thead><tbody><tr><td>goAction</td><td>goGetTotalAgentsCall</td><td>Action to perform.</td></tr><tr><td>goUser</td><td>MyUser</td><td>API authorized user.</td></tr><tr><td>goPass</td><td>MyPass</td><td>Authorized user's password.</td></tr><tr><td>responsetype</td><td>json/xml</td><td>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/goDashboard/goAPI.php?goAction=goGetTotalAgentsCall&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/goDashboard/goAPI.php" \
  -H "Content-Type: application/x-www-form-urlencoded" \
  --data-urlencode "goAction=goGetTotalAgentsCall" \
  --data-urlencode "goUser=MyUser" \
  --data-urlencode "goPass=MyPass" \
  --data-urlencode "responsetype=json"

```

####  **Example Response**

```json
{
    "result": "success",
    "data": 23
}

```

# Users

# Get User Information and Performance Statistics

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

###  **Description**

This action retrieves detailed information and performance statistics for a specific user. It includes user credentials, profile settings, permissions, and real-time productivity metrics such as login time, talk time, break duration, and total calls.

## 🔗 **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: 178.667px;"><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.6px;"><td style="height: 29.6px;">**Parameter**</td><td style="height: 29.6px;">**Value**</td><td style="height: 29.6px;">**Description**</td></tr></thead><tbody><tr style="height: 29.6px;"><td style="height: 29.6px;">goAction</td><td style="height: 29.6px;">getUserInfo</td><td style="height: 29.6px;">Action to retrieve detailed information and performance statistics for a specific user.</td></tr><tr style="height: 29.6px;"><td style="height: 29.6px;">goUser</td><td style="height: 29.6px;">MyUser</td><td style="height: 29.6px;">API authorized user.</td></tr><tr style="height: 29.6px;"><td style="height: 29.6px;">goPass</td><td style="height: 29.6px;">MyPass</td><td style="height: 29.6px;">Password for the API authorized user.</td></tr><tr><td style="height: 29.6px;">user</td><td style="height: 29.6px;">example.user</td><td style="height: 29.6px;">Username of the user whose data is being requested.</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/goUsers/goAPI.php?goAction=getUserInfo&goUser=MyUser&goPass=MyPass&user=example.user&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=getUserInfo" \
  --data-urlencode "goUser=MyUser" \
  --data-urlencode "goPass=MyPass" \
  --data-urlencode "responsetype=json" \
  --data-urlencode "user=Example.User"

```

####  **Example Response**

```json
{
  "result": "success",
  "data": {
    "user_info": {
      "user_id": 1234,
      "user": "example.user",
      "pass": "examplePass",
      "pass_hash": "ABC123xyzHashValue",
      "email": "example.user@example.com",
      "voicemail_id": "",
      "phone_login": "1234567890",
      "phone_pass": "phonePass123",
      "full_name": "Example User",
      "user_level": 1,
      "territory": "",
      "tenant": "EXAMPLE_TENANT",
      "user_code": "1234",
      "hotkeys_active": "1",
      "agent_choose_ingroups": "0",
      "scheduled_callbacks": "1",
      "agentonly_callbacks": "1",
      "agentcall_manual": "1",
      "dialer_recording": "1",
      "dialer_transfers": "1",
      "closer_default_blended": "0",
      "user_group": "EXAMPLE_GROUP",
      "dialer_recording_override": "DISABLED",
      "alter_custphone_override": "NOT_ACTIVE",
      "alert_enabled": "0",
      "agent_shift_enforcement_override": "DISABLED",
      "shift_override_flag": "0",
      "allow_alerts": "0",
      "closer_campaigns": " CAMPAIGN1 CAMPAIGN2 CAMPAIGN3 -",
      "agent_choose_territories": "0",
      "custom_one": "",
      "custom_two": "",
      "custom_three": "",
      "custom_four": "",
      "custom_five": "",
      "agent_call_log_view_override": "DISABLED",
      "agent_choose_blended": "1",
      "agent_lead_search_override": "NOT_ACTIVE",
      "preset_contact_search": "NOT_ACTIVE",
      "voicemail_pass": "voicePass123"
    },
    "user_stats": {
      "first_activity": "09:00:00",
      "last_activity": "17:00:00",
      "login_time": "08:00:00",
      "after_call": "00:10:00",
      "break": "00:30:00",
      "pause": "00:05:00",
      "avalible": "01:00:00",
      "avg_wait": "00:00:20",
      "talk": "06:00:00",
      "talk_avalible": "07:00:00",
      "total_calls": 100,
      "denied": 2,
      "lip": 1,
      "vrf": 3,
      "sales": 5,
      "sla_productivity": "87%"
    }
  }
}
```

# Get Real-Time Agent Status

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

###  **Description**

Retrieves real-time status information for a specific agent. This includes the agent's current activity (e.g., READY, IN CALL,, DISPOSITION, PAUSE - BREAK or LUNCH BREAK,), call details, and campaign context if the agent is handling a live call.

## 🔗 **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: 178.667px;"><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.6px;"><td style="height: 29.6px;">**Parameter**</td><td style="height: 29.6px;">**Value**</td><td style="height: 29.6px;">**Description**</td></tr></thead><tbody><tr style="height: 29.6px;"><td style="height: 29.6px;">goAction</td><td style="height: 29.6px;">getLiveAgentInfo</td><td style="height: 29.6px;">Action to retrieve live status and call info for a specific user.</td></tr><tr style="height: 29.6px;"><td style="height: 29.6px;">goUser</td><td style="height: 29.6px;">MyUser</td><td style="height: 29.6px;">API authorized user.</td></tr><tr style="height: 29.6px;"><td style="height: 29.6px;">goPass</td><td style="height: 29.6px;">MyPass</td><td style="height: 29.6px;">Password for the API authorized user.</td></tr><tr><td style="height: 29.6px;">user</td><td style="height: 29.6px;">example.user</td><td style="height: 29.6px;">The username of the agent to check live info for.</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/goUsers/goAPI.php?goAction=getLiveAgentInfo&goUser=MyUser&goPass=MyPass&user=example.user&responsetype=json"
```

#### **POST:**

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=getLiveAgentInfo" \
  --data-urlencode "goUser=MyUser" \
  --data-urlencode "goPass=MyPass" \
  --data-urlencode "responsetype=json" \
  --data-urlencode "user=Example.User"

```

####  **Example Response Agent READY**

```json
{
  "result": "success",
  "data": {
    "status": "READY",
    "color": "primary",
    "in_call_with": "",
    "campaign_id": "",
    "campaign_name": "",
    "call_type": "",
    "caller_id": "",
    "conf_exten": "8600118",
    "server_ip": "127.0.0.1",
    "vendor_lead_code": "",
    "lead_id": 0
  }
}
```

####  **Example Response Agent IN CALL** 

```json
{
  "result": "success",
  "data": {
    "status": "IN CALL",
    "color": "green",
    "in_call_with": "1234567890",
    "campaign_id": "CAMP001",
    "campaign_name": "EXAMPLE_CAMPAIGN",
    "call_type": "DIALER",
    "caller_id": "9876543210",
    "conf_exten": "8600118",
    "server_ip": "127.0.0.1",
    "vendor_lead_code": "abc123-xyz456",
    "lead_id": 7890123
  }
}
```

# Get All Portfolios

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

###  **Description**

This endpoint retrieves a list of all available portfolios and their corresponding names. Portfolios represent different business segments or client groups in the call center system. Each portfolio is associated with a unique code and a descriptive name.

## 🔗 **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: 178.667px;"><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.6px;"><td style="height: 29.6px;">**Parameter**</td><td style="height: 29.6px;">**Value**</td><td style="height: 29.6px;">**Description**</td></tr></thead><tbody><tr style="height: 29.6px;"><td style="height: 29.6px;">goAction</td><td style="height: 29.6px;">**getAllPortfolios**</td><td style="height: 29.6px;">Action to perform.</td></tr><tr style="height: 29.6px;"><td style="height: 29.6px;">goUser</td><td style="height: 29.6px;">MyUser</td><td style="height: 29.6px;">API authorized user.</td></tr><tr style="height: 29.6px;"><td style="height: 29.6px;">goPass</td><td style="height: 29.6px;">MyPass</td><td style="height: 29.6px;">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/goUsers/goAPI.php?goAction=getAllPortfolios&goUser=MyUser&goPass=MyPass&responsetype=json"
```

#### **POST:**

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=getAllPortfolios" \
  --data-urlencode "goUser=MyUser" \
  --data-urlencode "goPass=MyPass" \
  --data-urlencode "responsetype=json" 
```

####  **Example Response** 

```json
{
    "result": "success",
    "data": [
        {
            "portfolio": "ABC",
            "portfolio_name": "Alpha Business Corp"
        },
        {
            "portfolio": "XYZ",
            "portfolio_name": "Xylon Technologies"
        },
        {
            "portfolio": "MNO",
            "portfolio_name": "Monolith Solutions"
        },
        {
            "portfolio": "PQR",
            "portfolio_name": "Pioneer Realty Group"
        }
    ]
}

```

# Get All Profiles

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

###  **Description**

This endpoint retrieves a list of all available profiles configured in the system. Each profile is represented with its unique identifier (`profile_id`) and its display name (`profile_name`). This endpoint also provides additional data for profiles, such as disposition sets and the option to edit each profile.

## 🔗 **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: 178.667px;"><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.6px;"><td style="height: 29.6px;">**Parameter**</td><td style="height: 29.6px;">**Value**</td><td style="height: 29.6px;">**Description**</td></tr></thead><tbody><tr style="height: 29.6px;"><td style="height: 29.6px;">goAction</td><td style="height: 29.6px;">**getAllProfiles**</td><td style="height: 29.6px;">Action to perform.</td></tr><tr style="height: 29.6px;"><td style="height: 29.6px;">goUser</td><td style="height: 29.6px;">MyUser</td><td style="height: 29.6px;">API authorized user.</td></tr><tr style="height: 29.6px;"><td style="height: 29.6px;">goPass</td><td style="height: 29.6px;">MyPass</td><td style="height: 29.6px;">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/goUsers/goAPI.php?goAction=getAllProfiles&goUser=MyUser&goPass=MyPass&responsetype=json"
```

#### **POST:**

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=getAllProfiles" \
  --data-urlencode "goUser=MyUser" \
  --data-urlencode "goPass=MyPass" \
  --data-urlencode "responsetype=json" 
```

####  **Example Response**

```json
{
  "result": "success",
  "data": [
    {
      "profile_id": "COLLECTIONS",
      "profile_name": "COLLECTIONS"
    },
    {
      "profile_id": "CUSTOMER_SERVICE",
      "profile_name": "CUSTOMER_SERVICE"
    },
    {
      "profile_id": "SALES_SUPPORT",
      "profile_name": "SALES_SUPPORT"
    }
  ],
  "use_profile": 1,
  "profiles": {
    "headers": [ ... ],
    "rows": [
      {
        "id": 1,
        "profile_id": "COLLECTIONS",
        "profile_name": "COLLECTIONS",
        "disposition_set": "PAYMENT FOLLOW-UP",
        "action": "<button class=\"btn btn-success btn-normal edit_profile\" profile=\"COLLECTIONS_TEAM\" profile_type=\"profile\" profile_id=\"1\" title=\"Edit\"><i class=\"fa fa-pencil\"></i></button>"
      },
      {
        "id": 2,
        "profile_id": "CUSTOMER_SERVICE",
        "profile_name": "CUSTOMER_SERVICE",
        "disposition_set": "GENERAL INQUIRIES",
        "action": "<button class=\"btn btn-success btn-normal edit_profile\" profile=\"CUSTOMER_SERVICE\" profile_type=\"profile\" profile_id=\"2\" title=\"Edit\"><i class=\"fa fa-pencil\"></i></button>"
      },
      {
        "id": 3,
        "profile_id": "SALES_SUPPORT",
        "profile_name": "SALES_SUPPORT",
        "disposition_set": "NEW LEADS",
        "action": "<button class=\"btn btn-success btn-normal edit_profile\" profile=\"SALES_SUPPORT\" profile_type=\"profile\" profile_id=\"3\" title=\"Edit\"><i class=\"fa fa-pencil\"></i></button>"
      }
    ]
  }
}

```

# 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>

# Call Times

# Get All Predefined Call Time Settings

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

###  **Description**

This endpoint retrieves all predefined call time configurations in the system. Each configuration defines allowed call time ranges for each day of the week, typically used for campaign scheduling or restrictions.

## 🔗 **URL**

#### https://**DOMAIN**.croco-dial.net/goAPIv2/goCalltimes/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%;"><colgroup> <col style="width: 23%;"></col> <col style="width: 20%;"></col> <col style="width: 57%;"></col> </colgroup><thead><tr><td>**Parameter**</td><td>**Value**</td><td>**Description**</td></tr></thead><tbody><tr><td>goAction</td><td>goGetAllCalltimes</td><td>Action to perform</td></tr><tr><td>goUser</td><td>MyUser</td><td>API authorized user.</td></tr><tr><td>goPass</td><td>MyPass</td><td>Authorized user's password.</td></tr><tr><td>responsetype</td><td>json/xml</td><td>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/goCalltimes/goAPI.php?goAction=goGetAllCalltimes&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/goCalltimes/goAPI.php" \
  -H "Content-Type: application/x-www-form-urlencoded" \
  --data-urlencode "goAction=goGetAllCalltimes" \
  --data-urlencode "goUser=MyUser" \
  --data-urlencode "goPass=MyPass" \
  --data-urlencode "responsetype=json"
```

####  **Example Response**

```json
{
    "result": "success",
    "call_time_id": [
        "24hrs",
        "7am6pm",
        "CLOSED",
        "7am6pmMF",
        "7am8pmMF",
        "24hours"
    ],
    "call_time_name": [
        "24 Hours",
        "7am6pm",
        "CLOSED",
        "7am6pm M to F",
        "7am8pmMF",
        "24 Hours"
    ],
    "ct_default_start": [
        0,
        700,
        2400,
        700,
        700,
        0
    ],
    "ct_default_stop": [
        2400,
        1800,
        2400,
        1800,
        2000,
        2400
    ],
    "ct_sunday_start": [
        0,
        0,
        0,
        0,
        900,
        0
    ],
    "ct_sunday_stop": [
        0,
        0,
        0,
        0,
        1700,
        0
    ],
    "ct_monday_start": [
        0,
        700,
        0,
        700,
        700,
        0
    ],
    "ct_monday_stop": [
        0,
        1800,
        0,
        1800,
        2000,
        0
    ],
    "ct_tuesday_start": [
        0,
        700,
        0,
        700,
        700,
        0
    ],
    "ct_tuesday_stop": [
        0,
        1800,
        0,
        1800,
        2000,
        0
    ],
    "ct_wednesday_start": [
        0,
        700,
        0,
        700,
        700,
        0
    ],
    "ct_wednesday_stop": [
        0,
        1800,
        0,
        1800,
        2000,
        0
    ],
    "ct_thursday_start": [
        0,
        700,
        0,
        700,
        700,
        0
    ],
    "ct_thursday_stop": [
        0,
        1800,
        0,
        1800,
        2000,
        0
    ],
    "ct_friday_start": [
        0,
        700,
        0,
        700,
        700,
        0
    ],
    "ct_friday_stop": [
        0,
        1800,
        0,
        1800,
        2000,
        0
    ],
    "ct_saturday_start": [
        0,
        700,
        0,
        0,
        700,
        0
    ],
    "ct_saturday_stop": [
        0,
        1600,
        0,
        0,
        1600,
        0
    ],
    "user_group": [
        "---ALL---",
        "---ALL---",
        "---ALL---",
        "---ALL---",
        "---ALL---",
        "---ALL---"
    ]
}

```

# Get Specific Call Time Configuration

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

###  **Description**

This endpoint retrieves detailed information about a specific call time configurations. This includes the default call time ranges for each day of the week, any custom after-hours configurations, and comments associated with the call time settings. It is useful for understanding the permitted call windows and any specific rules applied to different days.

## 🔗 **URL**

#### https://**DOMAIN**.croco-dial.net/goAPIv2/goCalltimes/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.0013%;"></col><col style="width: 24.0695%;"></col><col style="width: 52.9193%;"></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;">goGetAllCalltimes</td><td style="height: 29.7167px;">Action to perform</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;">Authorized user's password.</td></tr><tr style="height: 29.7167px;"><td style="height: 29.7167px;">call\_time\_id</td><td style="height: 29.7167px;">"weekdays-example"</td><td style="height: 29.7167px;">The ID of the call time configuration you want to retreive.</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/goCalltimes/goAPI.php?goAction=goGetCalltimeInfo&goUser=MyUser&goPass=MyPass&responsetype=json&call_time_id=weekdays-example"
```

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

If you prefer to send the data as form parameters:

```bash
curl -X POST "https://DOMAIN.croco-dial.net/goAPIv2/goCalltimes/goAPI.php" \
  -H "Content-Type: application/x-www-form-urlencoded" \
  --data-urlencode "goAction=goGetCalltimeInfo" \
  --data-urlencode "goUser=MyUser" \
  --data-urlencode "goPass=MyPass" \
  --data-urlencode "responsetype=json" \
  --data-urlencode "call-time-id=weekdays-example" \
```

####  **Example Response**

```json
{
    "result": "success",
    "id": 14,
    "call_time_id": "weekdays-example",
    "call_time_name": "weekdays-example",
    "call_time_comments": "weekdays-example_7am6pm_7am4pm-Saturday",
    "ct_default_start": 700,
    "ct_default_stop": 1800,
    "ct_sunday_start": 0,
    "ct_sunday_stop": 0,
    "ct_monday_start": 700,
    "ct_monday_stop": 1800,
    "ct_tuesday_start": 700,
    "ct_tuesday_stop": 1800,
    "ct_wednesday_start": 700,
    "ct_wednesday_stop": 1800,
    "ct_thursday_start": 700,
    "ct_thursday_stop": 1800,
    "ct_friday_start": 700,
    "ct_friday_stop": 1800,
    "ct_saturday_start": 700,
    "ct_saturday_stop": 1600,
    "ct_state_call_times": "",
    "default_afterhours_filename_override": "",
    "sunday_afterhours_filename_override": "",
    "monday_afterhours_filename_override": "",
    "tuesday_afterhours_filename_override": "",
    "wednesday_afterhours_filename_override": "",
    "thursday_afterhours_filename_override": "",
    "friday_afterhours_filename_override": "",
    "saturday_afterhours_filename_override": "",
    "user_group": "---ALL---",
    "ct_holidays": ""
}
```

### <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: 94.4048%; border-collapse: collapse; border-color: rgb(206, 212, 217); height: 1001.33px;"><thead><tr style="height: 29.7167px;"><th style="width: 34.0873%; border-color: rgb(206, 212, 217); height: 29.7167px;">**Field**</th><th style="width: 65.9022%; border-color: rgb(206, 212, 217); height: 29.7167px;">**Description**</th></tr></thead><tbody><tr style="height: 29.7167px;"><td style="width: 34.0873%; border-color: rgb(206, 212, 217); height: 29.7167px;">**id**</td><td style="width: 65.9022%; border-color: rgb(206, 212, 217); height: 29.7167px;">The unique identifier for the call time entry.</td></tr><tr style="height: 29.7167px;"><td style="width: 34.0873%; border-color: rgb(206, 212, 217); height: 29.7167px;">**call\_time\_id**</td><td style="width: 65.9022%; border-color: rgb(206, 212, 217); height: 29.7167px;">The ID of the call time configuration.</td></tr><tr style="height: 29.7167px;"><td style="width: 34.0873%; border-color: rgb(206, 212, 217); height: 29.7167px;">**call\_time\_name**</td><td style="width: 65.9022%; border-color: rgb(206, 212, 217); height: 29.7167px;">The name of the call time configuration.</td></tr><tr style="height: 29.7167px;"><td style="width: 34.0873%; border-color: rgb(206, 212, 217); height: 29.7167px;">**call\_time\_comments**</td><td style="width: 65.9022%; border-color: rgb(206, 212, 217); height: 29.7167px;">Additional comments or description for the call time configuration.</td></tr><tr style="height: 29.7167px;"><td style="width: 34.0873%; border-color: rgb(206, 212, 217); height: 29.7167px;">**ct\_default\_start**</td><td style="width: 65.9022%; border-color: rgb(206, 212, 217); height: 29.7167px;">Default start time in military format (HHMM).</td></tr><tr style="height: 29.7167px;"><td style="width: 34.0873%; border-color: rgb(206, 212, 217); height: 29.7167px;">**ct\_default\_stop**</td><td style="width: 65.9022%; border-color: rgb(206, 212, 217); height: 29.7167px;">Default stop time in military format (HHMM).</td></tr><tr style="height: 29.7167px;"><td style="width: 34.0873%; border-color: rgb(206, 212, 217); height: 29.7167px;">**ct\_sunday\_start**</td><td style="width: 65.9022%; border-color: rgb(206, 212, 217); height: 29.7167px;">Call start time for Sunday (HHMM). The value 0 to use the default settings.</td></tr><tr style="height: 29.7167px;"><td style="width: 34.0873%; border-color: rgb(206, 212, 217); height: 29.7167px;">**ct\_sunday\_stop**</td><td style="width: 65.9022%; border-color: rgb(206, 212, 217); height: 29.7167px;">Call stop time for Sunday (HHMM). The value 0 to use the default settings.  
</td></tr><tr style="height: 29.7167px;"><td style="width: 34.0873%; border-color: rgb(206, 212, 217); height: 29.7167px;">**ct\_state\_call\_times**</td><td style="width: 65.9022%; border-color: rgb(206, 212, 217); height: 29.7167px;">Custom state-specific call times, if any.</td></tr><tr style="height: 29.7167px;"><td style="width: 34.0873%; border-color: rgb(206, 212, 217); height: 29.7167px;">**default\_afterhours\_filename\_override**</td><td style="width: 65.9022%; border-color: rgb(206, 212, 217); height: 29.7167px;">Custom audio file for after-hours calls (default).</td></tr><tr style="height: 29.7167px;"><td style="width: 34.0873%; border-color: rgb(206, 212, 217); height: 29.7167px;">**sunday\_afterhours\_filename\_override**</td><td style="width: 65.9022%; border-color: rgb(206, 212, 217); height: 29.7167px;">Custom audio file for after-hours calls on Sunday.</td></tr><tr style="height: 29.7167px;"><td style="width: 34.0873%; border-color: rgb(206, 212, 217); height: 29.7167px;">**user\_group**</td><td style="width: 65.9022%; border-color: rgb(206, 212, 217); height: 29.7167px;">The user group associated with this call time configuration.</td></tr><tr style="height: 29.7167px;"><td style="width: 34.0873%; border-color: rgb(206, 212, 217); height: 29.7167px;">**ct\_holidays**</td><td style="width: 65.9022%; border-color: rgb(206, 212, 217); height: 29.7167px;">Configured holidays for the call time setting.</td></tr></tbody></table>

# Campaigns

# Get Specific Campaign Details

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

###  **Description**

Retrieves detailed information about a specific campaign, including its settings, dial statuses, configurations, and associated transfer groups.

## 🔗 **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: 178.667px;"><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.6px;"><td style="height: 29.6px;">**Parameter**</td><td style="height: 29.6px;">**Value**</td><td style="height: 29.6px;">**Description**</td></tr></thead><tbody><tr style="height: 29.6px;"><td style="height: 29.6px;">goAction</td><td style="height: 29.6px;">getCampaignInfo</td><td style="height: 29.6px;">Action to retrieve campaign details and settings.</td></tr><tr style="height: 29.6px;"><td style="height: 29.6px;">goUser</td><td style="height: 29.6px;">MyUser</td><td style="height: 29.6px;">API authorized user.</td></tr><tr style="height: 29.6px;"><td style="height: 29.6px;">goPass</td><td style="height: 29.6px;">MyPass</td><td style="height: 29.6px;">Password for the API authorized user.</td></tr><tr><td style="height: 29.6px;">campaign\_id</td><td style="height: 29.6px;">MyCampaignID</td><td style="height: 29.6px;">The ID of the campaign you want to retrieve information for.</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=getCampaignInfo&goUser=MyUser&goPass=MyPass&campaign_id=MyCampaignID&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=getCampaignInfo" \
  --data-urlencode "goUser=MyUser" \
  --data-urlencode "goPass=Mypass" \
  --data-urlencode "responsetype=json" \
  --data-urlencode "campaign_id=11111111"

```

####  **Example Response**

```json
{
  "result": "success",
  "data": {
    "campaign_id": "1234567",
    "campaign_name": "CUTSERVICE",
    "active": "Y",
    "dial_status_a": null,
    "dial_status_b": "",
    "lead_order": "DOWN_LAST_CALL_TIME",
    "hopper_level": 1000,
    "auto_dial_level": "3",
    "next_agent_call": "longest_wait_time",
    "local_call_time": "24hrs",
    "dial_timeout": 30,
    "dial_prefix": "903",
    "campaign_cid": "123456789",
    "campaign_script": "SCRIPT001",
    "campaign_recording": "ALLFORCE",
    "closer_campaigns": "AGENTDIRECT, CUTSERVICE",
    "drop_call_seconds": 1,
    "drop_action": "IN_GROUP",
    "wrapup_seconds": 0,
    "manual_dial_list_id": 999999999,
    "queue_priority": 50,
    "default_xfer_group": "AGENTDIRECT",
    "survey_method": "AGENT_XFER",
    "survey_dtmf_digits": "1238",
    "survey_xfer_exten": "8300",
    "use_internal_dnc": "Y",
    "manual_dial_timeout": "30",
    "three_way_call_cid": "CAMPAIGN",
    "three_way_dial_prefix": "903",
    "callback_days_limit": 0,
    "campaign_description": null,
    "campaign_calldate": "2025-05-07 11:51:49"
  },
  "campaign_type": "OUTBOUND",
  "custom_fields_launch": "ONCALL"
}

```


### **Response Structure** 

<table border="1" id="bkmrk-field-type-descripti" style="border-collapse: collapse; border-color: rgb(206, 212, 217);"><thead><tr><td style="border-color: rgb(206, 212, 217);">**Field**</td><td style="border-color: rgb(206, 212, 217);">**Type**</td><td style="border-color: rgb(206, 212, 217);">**Description**</td></tr></thead><tbody><tr><td style="border-color: rgb(206, 212, 217);">`data`</td><td style="border-color: rgb(206, 212, 217);">`object`</td><td style="border-color: rgb(206, 212, 217);">Contains all the campaign details.</td></tr><tr><td style="border-color: rgb(206, 212, 217);">└── `campaign_id`</td><td style="border-color: rgb(206, 212, 217);">`string`</td><td style="border-color: rgb(206, 212, 217);">Unique ID of the campaign.</td></tr><tr><td style="border-color: rgb(206, 212, 217);">└── `campaign_name`</td><td style="border-color: rgb(206, 212, 217);">`string`</td><td style="border-color: rgb(206, 212, 217);">The name of the campaign.</td></tr><tr><td style="border-color: rgb(206, 212, 217);">└── `active`</td><td style="border-color: rgb(206, 212, 217);">`string`</td><td style="border-color: rgb(206, 212, 217);">Whether the campaign is active (`Y`) or not (`N`).</td></tr><tr><td style="border-color: rgb(206, 212, 217);">└── `dial_status_a` to `dial_status_e`</td><td style="border-color: rgb(206, 212, 217);">`string`</td><td style="border-color: rgb(206, 212, 217);">The dial statuses associated with the campaign.</td></tr><tr><td style="border-color: rgb(206, 212, 217);">└── `lead_order`</td><td style="border-color: rgb(206, 212, 217);">`string`</td><td style="border-color: rgb(206, 212, 217);">Specifies the order of leads in the hopper.</td></tr><tr><td style="border-color: rgb(206, 212, 217);">└── `hopper_level`</td><td style="border-color: rgb(206, 212, 217);">`number`</td><td style="border-color: rgb(206, 212, 217);">Number of leads loaded into the hopper.</td></tr><tr><td style="border-color: rgb(206, 212, 217);">└── `auto_dial_level`</td><td style="border-color: rgb(206, 212, 217);">`string`</td><td style="border-color: rgb(206, 212, 217);">The auto-dial level for the campaign.</td></tr><tr><td style="border-color: rgb(206, 212, 217);">└── `next_agent_call`</td><td style="border-color: rgb(206, 212, 217);">`string`</td><td style="border-color: rgb(206, 212, 217);">Specifies the method for the next agent call assignment.</td></tr><tr><td style="border-color: rgb(206, 212, 217);">└── `local_call_time`</td><td style="border-color: rgb(206, 212, 217);">`string`</td><td style="border-color: rgb(206, 212, 217);">Time restrictions for dialing.</td></tr><tr><td style="border-color: rgb(206, 212, 217);">└── `dial_timeout`</td><td style="border-color: rgb(206, 212, 217);">`number`</td><td style="border-color: rgb(206, 212, 217);">Time in seconds before the call times out.</td></tr><tr><td style="border-color: rgb(206, 212, 217);">└── `dial_prefix`</td><td style="border-color: rgb(206, 212, 217);">`string`</td><td style="border-color: rgb(206, 212, 217);">The prefix added to dialed numbers.</td></tr><tr><td style="border-color: rgb(206, 212, 217);">└── `campaign_cid`</td><td style="border-color: rgb(206, 212, 217);">`string`</td><td style="border-color: rgb(206, 212, 217);">Caller ID for the campaign.</td></tr><tr><td style="border-color: rgb(206, 212, 217);">└── `campaign_script`</td><td style="border-color: rgb(206, 212, 217);">`string`</td><td style="border-color: rgb(206, 212, 217);">The script associated with the campaign.</td></tr><tr><td style="border-color: rgb(206, 212, 217);">└── `campaign_recording`</td><td style="border-color: rgb(206, 212, 217);">`string`</td><td style="border-color: rgb(206, 212, 217);">Indicates the call recording policy.</td></tr><tr><td style="border-color: rgb(206, 212, 217);">└── `closer_campaigns`</td><td style="border-color: rgb(206, 212, 217);">`string`</td><td style="border-color: rgb(206, 212, 217);">List of related closer campaigns.</td></tr><tr><td style="border-color: rgb(206, 212, 217);">└── `drop_call_seconds`</td><td style="border-color: rgb(206, 212, 217);">`number`</td><td style="border-color: rgb(206, 212, 217);">Seconds before considering the call as "dropped".</td></tr><tr><td style="border-color: rgb(206, 212, 217);">└── `drop_action`</td><td style="border-color: rgb(206, 212, 217);">`string`</td><td style="border-color: rgb(206, 212, 217);">Action to take when a call is dropped.</td></tr><tr><td style="border-color: rgb(206, 212, 217);">└── `wrapup_seconds`</td><td style="border-color: rgb(206, 212, 217);">`number`</td><td style="border-color: rgb(206, 212, 217);">Time for agents to wrap up after a call.</td></tr><tr><td style="border-color: rgb(206, 212, 217);">└── `wrapup_message`</td><td style="border-color: rgb(206, 212, 217);">`string`</td><td style="border-color: rgb(206, 212, 217);">Message displayed during the wrap-up.</td></tr><tr><td style="border-color: rgb(206, 212, 217);">└── `manual_dial_list_id`</td><td style="border-color: rgb(206, 212, 217);">`number`</td><td style="border-color: rgb(206, 212, 217);">List ID for manual dialing.</td></tr><tr><td style="border-color: rgb(206, 212, 217);">└── `queue_priority`</td><td style="border-color: rgb(206, 212, 217);">`number`</td><td style="border-color: rgb(206, 212, 217);">Priority of this campaign in the call queue.</td></tr><tr><td style="border-color: rgb(206, 212, 217);">└── `default_xfer_group`</td><td style="border-color: rgb(206, 212, 217);">`string`</td><td style="border-color: rgb(206, 212, 217);">Default transfer group for calls.</td></tr><tr><td style="border-color: rgb(206, 212, 217);">└── `survey_method`</td><td style="border-color: rgb(206, 212, 217);">`string`</td><td style="border-color: rgb(206, 212, 217);">Method for handling survey calls (e.g., `AGENT_XFER`).</td></tr><tr><td style="border-color: rgb(206, 212, 217);">└── `survey_dtmf_digits`</td><td style="border-color: rgb(206, 212, 217);">`string`</td><td style="border-color: rgb(206, 212, 217);">DTMF digits used for survey responses.</td></tr><tr><td style="border-color: rgb(206, 212, 217);">└── `survey_xfer_exten`</td><td style="border-color: rgb(206, 212, 217);">`string`</td><td style="border-color: rgb(206, 212, 217);">Extension for survey transfers.</td></tr><tr><td style="border-color: rgb(206, 212, 217);">└── `use_internal_dnc`</td><td style="border-color: rgb(206, 212, 217);">`string`</td><td style="border-color: rgb(206, 212, 217);">Whether the campaign uses the internal Do Not Call list (`Y`/`N`).</td></tr><tr><td style="border-color: rgb(206, 212, 217);">└── `manual_dial_timeout`</td><td style="border-color: rgb(206, 212, 217);">`string`</td><td style="border-color: rgb(206, 212, 217);">Timeout for manual dial attempts.</td></tr><tr><td style="border-color: rgb(206, 212, 217);">└── `three_way_call_cid`</td><td style="border-color: rgb(206, 212, 217);">`string`</td><td style="border-color: rgb(206, 212, 217);">Caller ID for three-way calls.</td></tr><tr><td style="border-color: rgb(206, 212, 217);">└── `three_way_dial_prefix`</td><td style="border-color: rgb(206, 212, 217);">`string`</td><td style="border-color: rgb(206, 212, 217);">Dial prefix for three-way calls.</td></tr><tr><td style="border-color: rgb(206, 212, 217);">└── `callback_days_limit`</td><td style="border-color: rgb(206, 212, 217);">`number`</td><td style="border-color: rgb(206, 212, 217);">Maximum days allowed for scheduled callbacks.</td></tr><tr><td style="border-color: rgb(206, 212, 217);">└── `campaign_description`</td><td style="border-color: rgb(206, 212, 217);">`string`</td><td style="border-color: rgb(206, 212, 217);">Optional description of the campaign.</td></tr><tr><td style="border-color: rgb(206, 212, 217);">└── `campaign_calldate`</td><td style="border-color: rgb(206, 212, 217);">`string`</td><td style="border-color: rgb(206, 212, 217);">The last call date for this campaign.</td></tr><tr><td style="border-color: rgb(206, 212, 217);">`campaign_type`</td><td style="border-color: rgb(206, 212, 217);">`string`</td><td style="border-color: rgb(206, 212, 217);">Specifies if the campaign is `INBOUND`, `OUTBOUND`, or `BLENDED`.</td></tr><tr><td style="border-color: rgb(206, 212, 217);">`custom_fields_launch`</td><td style="border-color: rgb(206, 212, 217);">`string`</td><td style="border-color: rgb(206, 212, 217);">Indicates if custom fields are launched during the call (`ONCALL`).</td></tr></tbody></table>

# 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>

# Get Current Leads on Hopper by Campaign

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

###  **Description**

This endpoint retrieves all leads currently in the hopper for a specific campaign. The hopper is a queue of leads that are ready to be dialed. The response includes detailed lead information such as loan ID, phone number, call disposition, source, list name, and an HTML button to delete the lead.

## 🔗 **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;">**<span data-offset-key="8i3ji-0-0"><span data-text="true">getLeadsOnHopper</span></span>**</td><td style="height: 29.7167px;">Action to get the leads for a specific campaign.</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>campaign\_id</td><td>ID-Campaign (number)</td><td>Campaign identifier to search hopper.</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=getLeadsOnHopper&goUser=MyUser&goPass=MyPass&responsetype=json&campaign_id=123456"

```

#### **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=getLeadsOnHopper" \
  --data-urlencode "goUser=MyUser" \
  --data-urlencode "goPass=Mypass" \
  --data-urlencode "campaign_id=123456" \
  --data-urlencode "responsetype=json"

```

####  **Example Response**

```json
{
  "result": "success",
  "data": {
    "rows": [
      {
        "lead_id": "10001",
        "last_local_call_time": "2025-06-01 14:23:45",
        "loan_id": "LN123456",
        "phone_number": "5551234567",
        "state": "CA",
        "disposition": "NEW",
        "count": 0,
        "gmt_offset_now": "-8.00",
        "hopper_id": "5001",
        "alt_dial": "MAIN",
        "list_name": "Default Leads List",
        "list_id": "901",
        "priority": 99,
        "source": "WEBFORM",
        "numrows": 2,
        "delete": "<button class=\"btn btn-delete\"><i class=\"fa fa-trash\" aria-hidden=\"true\"></i></button>"
      },
      {
        "lead_id": "10002",
        "last_local_call_time": "2025-06-01 13:12:09",
        "loan_id": "LN654321",
        "phone_number": "5559876543",
        "state": "TX",
        "disposition": "CALLBK",
        "count": 1,
        "gmt_offset_now": "-6.00",
        "hopper_id": "5002",
        "alt_dial": "ALT",
        "list_name": "Follow-up List",
        "list_id": "902",
        "priority": 90,
        "source": "IMPORT",
        "numrows": 2,
        "delete": "<button class=\"btn btn-delete\"><i class=\"fa fa-trash\" aria-hidden=\"true\"></i></button>"
      }
    ],
    "headers": [
      { "title": "Loan ID", "field": "loan_id" },
      { "title": "Phone Number", "field": "phone_number" },
      { "title": "Disposition", "field": "disposition" },
      { "title": "Count", "field": "count" },
      { "title": "Source", "field": "source" },
      { "title": "List Name", "field": "list_name" },
      { "title": "Lead ID", "field": "lead_id" },
      { "title": "Delete", "field": "delete", "formatter": "html" }
    ],
    "html": "<div class=\"toggleTitlesAction tabulator-Y3Yc\" style=\"width: 90%\">...</div>",
    "content": "table"
  }
}

```


### <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: 81.5476%; height: 583.384px; border-collapse: collapse; border-color: rgb(206, 212, 217);"><thead><tr style="height: 29.7167px;"><th style="width: 28.2129%; height: 29.7167px;">**Field Name**</th><th style="width: 71.7749%; height: 29.7167px;">**Description**</th></tr></thead><tbody><tr style="height: 30.6667px;"><td style="width: 28.2129%; height: 30.6667px;">`lead_id`</td><td style="width: 71.7749%; height: 30.6667px;">Unique identifier of the lead</td></tr><tr style="height: 37.4167px;"><td style="width: 28.2129%; height: 37.4167px;">`last_local_call_time`</td><td style="width: 71.7749%; height: 37.4167px;">Timestamp of the last local call to the lead (if any)</td></tr><tr style="height: 35.5167px;"><td style="width: 28.2129%; height: 35.5167px;">`loan_id`</td><td style="width: 71.7749%; height: 35.5167px;">Vendor lead code (often a unique external ID like a loan or case ID)</td></tr><tr style="height: 34.4167px;"><td style="width: 28.2129%; height: 34.4167px;">`phone_number`</td><td style="width: 71.7749%; height: 34.4167px;">Lead's phone number</td></tr><tr style="height: 30.6667px;"><td style="width: 28.2129%; height: 30.6667px;">`state`</td><td style="width: 71.7749%; height: 30.6667px;">US State (if available) from lead data</td></tr><tr style="height: 41.2167px;"><td style="width: 28.2129%; height: 41.2167px;">`disposition`</td><td style="width: 71.7749%; height: 41.2167px;">Status or outcome of the last interaction (e.g., `NEW`, `CALLBK`, `SALE`)</td></tr><tr style="height: 38.5167px;"><td style="width: 28.2129%; height: 38.5167px;">`count`</td><td style="width: 71.7749%; height: 38.5167px;">Number of times this lead has been called</td></tr><tr style="height: 30.6667px;"><td style="width: 28.2129%; height: 30.6667px;">`gmt_offset_now`</td><td style="width: 71.7749%; height: 30.6667px;">GMT offset of the lead's time zone</td></tr><tr style="height: 30.6667px;"><td style="width: 28.2129%; height: 30.6667px;">`hopper_id`</td><td style="width: 71.7749%; height: 30.6667px;">Internal hopper ID (queue ID)</td></tr><tr style="height: 30.6667px;"><td style="width: 28.2129%; height: 30.6667px;">`alt_dial`</td><td style="width: 71.7749%; height: 30.6667px;">Alternative dialing method or flag</td></tr><tr style="height: 30.6667px;"><td style="width: 28.2129%; height: 30.6667px;">`list_name`</td><td style="width: 71.7749%; height: 30.6667px;">Name of the list this lead belongs to</td></tr><tr style="height: 30.6667px;"><td style="width: 28.2129%; height: 30.6667px;">`list_id`</td><td style="width: 71.7749%; height: 30.6667px;">ID of the list</td></tr><tr style="height: 30.6667px;"><td style="width: 28.2129%; height: 30.6667px;">`priority`</td><td style="width: 71.7749%; height: 30.6667px;">Lead priority in the hopper</td></tr><tr style="height: 36.4167px;"><td style="width: 28.2129%; height: 36.4167px;">`source`</td><td style="width: 71.7749%; height: 36.4167px;">Source of the lead (e.g., `WEB`, `IMPORT`)</td></tr><tr style="height: 38.3167px;"><td style="width: 28.2129%; height: 38.3167px;">`numrows`</td><td style="width: 71.7749%; height: 38.3167px;">Total number of rows returned (same for all rows, used for frontend)</td></tr><tr style="height: 46.5167px;"><td style="width: 28.2129%; height: 46.5167px;">`delete`</td><td style="width: 71.7749%; height: 46.5167px;">HTML snippet for a delete button (used in frontend UI)</td></tr></tbody></table>

# Common Error Responses

# Common Error Responses

Below are the most common error responses returned by the API, along with their descriptions to facilitate troubleshooting:

### **Invalid Username/Password**

```bash
{
  "result": "error",
  "message": "Invalid Username/Password"
}
```

**Description:** The provided username or password is incorrect. Ensure that `goUser` and `goPass` are valid credentials.

### **Invalid Response Type**

```bash
result=error;message=This API function only accepts XML or JSON value on responsetype
```

**Description:** The `responsetype` parameter must be either `json` or `xml`. Double-check the parameter value in your request.

### **Missing Required Parameters**

```bash
{
  "code": "40001",
  "message": "Error: Missing required parameters"
}
```

**Description:** One or more required parameters are missing from the request. Verify that all required fields are correctly populated.

# Agent API

# Get Customer Informacion

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

###  **Description**

The API is responsible for retrieving the client’s information.

## 🔗 **URL**

#### https://**DOMAIN**.croco-dial.net/goAPIv2/goAgent/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: 208.891px;"><colgroup><col style="width: 23%;"></col><col style="width: 20%;"></col><col style="width: 57%;"></col></colgroup><thead><tr style="height: 29.7969px;"><td style="height: 29.7969px;">**Parameter**</td><td style="height: 29.7969px;">**Value**</td><td style="height: 29.7969px;">**Description**</td></tr></thead><tbody><tr style="height: 29.7969px;"><td style="height: 29.7969px;">goAction</td><td style="height: 29.7969px;">agent\_summary\_stats</td><td style="height: 29.7969px;">Action to perform</td></tr><tr style="height: 29.7969px;"><td style="height: 29.7969px;">goUser</td><td style="height: 29.7969px;">MyUser</td><td style="height: 29.7969px;">API authorized user.</td></tr><tr style="height: 29.7969px;"><td style="height: 29.7969px;">goPass</td><td style="height: 29.7969px;">MyPass</td><td style="height: 29.7969px;">Authorized user's password.</td></tr><tr style="height: 30.1094px;"><td style="height: 30.1094px;">responsetype</td><td style="height: 30.1094px;">json/xml</td><td style="height: 30.1094px;">Format of the response (`json` recommended).</td></tr><tr style="height: 29.7969px;"><td style="height: 29.7969px;">phone number</td><td style="height: 29.7969px;">Phone\_Number</td><td style="height: 29.7969px;">Insert the client’s phone number.</td></tr><tr style="height: 29.7969px;"><td style="height: 29.7969px;">leed id</td><td style="height: 29.7969px;">leed\_id</td><td style="height: 29.7969px;">Call ID.</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/goAgent/goAPI.php?goUser=MyUser&goPass=MyPass&goAction=goGetCustomerInfo&responsetype=json&phone_number=PhoneNumer&lead_id=MyLeadID"
```

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

If you prefer to send the data as form parameters:

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

####  **Example Response**

```json
{
    "result": "success",
    "lead_info": {
        "lead_id": 14246,
        "list_id": 22799125,
        "title": "Lic",
        "first_name": "Bruno",
        "middle_initial": "M",
        "last_name": "Macias",
        "phone_number": "8004321000",
        "alt_phone": "5587654321",
        "email": "brunoramiro@email.com",
        "address1": "Av. Reforma 123",
        "address2": "Interior 4B",
        "address3": "Col. Centro",
        "city": "Guadalajara",
        "state": "Jalisco",
        "province": "Ontario",
        "postal_code": "44100",
        "country_code": "MX",
        "gender": "U",
        "date_of_birth": "1825-10-23",
        "status": "PU",
        "user": "Bruno",
        "comments": "Additional information was requested."
    },
    "custom_info": null,
    "is_customer": 0
}
```

### **Data Fields per Agent**

<div class="_tableContainer_16hzy_1" id="bkmrk-field-description-us"><div class="_tableWrapper_16hzy_14 group flex w-fit flex-col-reverse align-left" tabindex="-1"><table border="1" class="w-fit min-w-(--thread-content-width) align-left" data-end="3246" data-start="1862" style="width: 51.6675%; height: 611.672px; border-collapse: collapse; border-color: rgb(206, 212, 217); border-width: 1px;"><thead><tr data-end="1927" data-start="1862" style="height: 29.7969px;"><th style="width: 50.1155%;">Field</th><th style="width: 50.1155%;">Description</th></tr></thead><tbody data-end="3246" data-start="1993"><tr data-end="2058" data-start="1993" style="height: 30.625px;"><td style="width: 50.1155%;">`result`</td><td style="width: 50.1155%;">Indicates the overall status of the API operation (e.g., `success`, `error`, `validation_failed`).</td></tr><tr data-end="2124" data-start="2059" style="height: 30.625px;"><td style="width: 50.1155%;">`lead_info`</td><td style="width: 50.1155%;">Container object that holds the structured information related to the lead.</td></tr><tr data-end="2190" data-start="2125" style="height: 30.625px;"><td style="width: 50.1155%;">`lead_id`</td><td style="width: 50.1155%;">Unique identifier assigned to the lead within the system. Used as the primary reference for subsequent operations.</td></tr><tr data-end="2256" data-start="2191" style="height: 30.625px;"><td style="width: 50.1155%;">`list_id`</td><td style="width: 50.1155%;">Identifier of the campaign or list to which the lead is assigned, enabling segmentation and organization.</td></tr><tr data-end="2322" data-start="2257" style="height: 30.625px;"><td style="width: 50.1155%;">`title`</td><td style="width: 50.1155%;">Honorific or professional title associated with the lead (e.g., Mr., Ms., Dr.).</td></tr><tr data-end="2388" data-start="2323" style="height: 30.625px;"><td style="width: 50.1155%;">`first_name`</td><td style="width: 50.1155%;">Given name of the lead.</td></tr><tr data-end="2454" data-start="2389" style="height: 30.625px;"><td style="width: 50.1155%;">`middle_initial`</td><td style="width: 50.1155%;">Middle name initial of the lead, if available.</td></tr><tr data-end="2520" data-start="2455" style="height: 30.625px;"><td style="width: 50.1155%;">`last_name`</td><td style="width: 50.1155%;">Family name or surname of the lead.</td></tr><tr data-end="2586" data-start="2521" style="height: 30.625px;"><td style="width: 50.1155%;">`phone_number`</td><td style="width: 50.1155%;">Primary contact phone number used for outbound or inbound communication.</td></tr><tr data-end="2652" data-start="2587" style="height: 30.625px;"><td style="width: 50.1155%;">`alt_phone`</td><td style="width: 50.1155%;">Secondary or alternative contact phone number.</td></tr><tr data-end="2718" data-start="2653" style="height: 30.625px;"><td style="width: 50.1155%;">`email`</td><td style="width: 50.1155%;">Email address associated with the lead for electronic correspondence.</td></tr><tr data-end="2784" data-start="2719" style="height: 30.625px;"><td style="width: 50.1155%;">`address1`</td><td style="width: 50.1155%;">Primary street address including street name and number.</td></tr><tr data-end="2850" data-start="2785" style="height: 30.625px;"><td style="width: 50.1155%;">`address2`</td><td style="width: 50.1155%;">Additional address details such as apartment, suite, or unit number.</td></tr><tr data-end="2916" data-start="2851" style="height: 30.625px;"><td style="width: 50.1155%;">`address3`</td><td style="width: 50.1155%;">Optional extended address field depending on system configuration.</td></tr><tr data-end="2982" data-start="2917" style="height: 30.625px;"><td style="width: 50.1155%;">`city`</td><td style="width: 50.1155%;">City of residence associated with the lead’s address.</td></tr><tr data-end="3048" data-start="2983" style="height: 30.625px;"><td style="width: 50.1155%;">`state`</td><td style="width: 50.1155%;">State or administrative region of the lead’s address.</td></tr><tr data-end="3114" data-start="3049" style="height: 30.625px;"><td style="width: 50.1155%;">`province`</td><td style="width: 50.1155%;">Province or territorial division, used when applicable based on country standards.</td></tr><tr data-end="3180" data-start="3115" style="height: 30.625px;"><td style="width: 50.1155%;">`postal_code`</td><td style="width: 50.1155%;">ZIP code or postal code corresponding to the lead’s address.</td></tr><tr data-end="3246" data-start="3181" style="height: 30.625px;"><td style="width: 50.1155%;">`country_code`</td><td style="width: 50.1155%;">Two-letter country code compliant with ISO 3166-1 alpha-2 standards (e.g., US, MX, CA).</td></tr><tr><td style="width: 50.1155%;">`gender`</td><td style="width: 50.1155%;">Gender classification of the lead (`M` = Male, `F` = Female, `U` = Unknown).</td></tr><tr><td style="width: 50.1155%;">`date_of_birth`</td><td style="width: 50.1155%;">Lead’s date of birth formatted according to the ISO 8601 standard (YYYY-MM-DD).</td></tr><tr><td style="width: 50.1155%;">`status`</td><td style="width: 50.1155%;">Operational status code assigned to the lead within the system, determined by internal business logic.</td></tr><tr><td style="width: 50.1155%;">`user`</td><td style="width: 50.1155%;">System user or agent currently assigned to manage the lead.</td></tr><tr><td style="width: 50.1155%;">`comments`</td><td style="width: 50.1155%;">Free-text field used to store notes or annotations related to the lead.</td></tr><tr><td style="width: 50.1155%;">`custom_info`</td><td style="width: 50.1155%;">Object containing configurable custom fields defined by the system; may return null if no custom fields are present.</td></tr><tr><td style="width: 50.1155%;">`is_customer`</td><td style="width: 50.1155%;">Logical indicator specifying whether the lead has been converted into a customer (`1`) or remains a prospect (`0`).</td></tr></tbody></table>

</div></div>

# Leads

# Load Leads

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

###  **Description**

The **Load Lead API** allows you to register, import, and distribute leads within a call center platform. Its purpose is to centralize the capture of potential customers coming from campaigns, web forms, external databases, or CRM integrations, so they can later be managed by agents, auto dialers, or follow-up workflows.

<p class="callout info">**Note:** Api user for this function must have modify\_leads set to 1 and user\_level must be set to 8 or higher  
</p>

## 🔗 **URL**

#### https://DOMAIN.croco-dial.net/API/lmapi.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.094px;"><colgroup><col style="width: 28.7247%;"></col><col style="width: 71.2753%;"></col></colgroup><thead><tr style="height: 29.7969px;"><td style="height: 29.7969px;">**Parameter**</td><td style="height: 29.7969px;">**Description**</td></tr></thead><tbody><tr style="height: 29.7969px;"><td style="height: 29.7969px;">phone\_number</td><td style="height: 29.7969px;">must be all numbers, 6-16 digits.</td></tr><tr style="height: 29.7969px;"><td style="height: 29.7969px;">phone\_code</td><td style="height: 29.7969px;"><span class="_aupe copyable-text xkrh14z">must be all numbers, 1-4 digits, defaults to 1 if not set.</span></td></tr><tr style="height: 29.7969px;"><td style="height: 29.7969px;"><span class="_aupe copyable-text xkrh14z">list\_id</span></td><td style="height: 29.7969px;"><span class="_aupe copyable-text xkrh14z">must be all numbers, 3-12 digits, defaults to 999 if not set.</span></td></tr><tr style="height: 30.1094px;"><td style="height: 30.1094px;">source</td><td style="height: 30.1094px;"><span class="_aupe copyable-text xkrh14z">description of what originated the API call (maximum 20 characters)</span>.</td></tr><tr style="height: 29.7969px;"><td style="height: 29.7969px;">campaing</td><td style="height: 29.7969px;"><span class="_aupe copyable-text xkrh14z">must be the campaign to load the lead</span></td></tr></tbody></table>

### **Opcional Fields**

<table border="1" id="bkmrk-vendor_lead_code-1-2" style="border-collapse: collapse; width: 100%; height: 523.344px;"><colgroup><col style="width: 50.0596%;"></col><col style="width: 50.0596%;"></col></colgroup><tbody><tr style="height: 29.7969px;"><td style="height: 29.7969px;"><span class="_aupe copyable-text xkrh14z">vendor\_lead\_code</span></td><td style="height: 29.7969px;"><span class="_aupe copyable-text xkrh14z">1-20 characters</span></td></tr><tr style="height: 29.7969px;"><td style="height: 29.7969px;"><span class="_aupe copyable-text xkrh14z">source\_id</span></td><td style="height: 29.7969px;"><span class="_aupe copyable-text xkrh14z">1-50 characters</span></td></tr><tr style="height: 46.5938px;"><td style="height: 46.5938px;"><span class="_aupe copyable-text xkrh14z">gmt\_offset\_now</span></td><td style="height: 46.5938px;"><span class="_aupe copyable-text xkrh14z">overridden by auto-lookup of phone\_code and area\_code portion of phone number if applicable</span></td></tr><tr style="height: 29.7969px;"><td style="height: 29.7969px;"><span class="_aupe copyable-text xkrh14z">title </span></td><td style="height: 29.7969px;"><span class="_aupe copyable-text xkrh14z">1-4 characters</span></td></tr><tr style="height: 29.7969px;"><td style="height: 29.7969px;"><span class="_aupe copyable-text xkrh14z">first\_name</span></td><td style="height: 29.7969px;"><span class="_aupe copyable-text xkrh14z">1-30 characters</span></td></tr><tr style="height: 29.7969px;"><td style="height: 29.7969px;"><span class="_aupe copyable-text xkrh14z">middle\_initial</span></td><td style="height: 29.7969px;"><span class="_aupe copyable-text xkrh14z">1 character</span></td></tr><tr style="height: 29.7969px;"><td style="height: 29.7969px;"><span class="_aupe copyable-text xkrh14z">last\_name</span></td><td style="height: 29.7969px;"><span class="_aupe copyable-text xkrh14z">1-30 characters</span></td></tr><tr style="height: 29.7969px;"><td style="height: 29.7969px;"><span class="_aupe copyable-text xkrh14z">address1</span></td><td style="height: 29.7969px;"><span class="_aupe copyable-text xkrh14z">1-100 characters</span></td></tr><tr style="height: 29.7969px;"><td style="height: 29.7969px;"><span class="_aupe copyable-text xkrh14z">address2</span></td><td style="height: 29.7969px;"><span class="_aupe copyable-text xkrh14z">1-100 characters</span></td></tr><tr style="height: 29.7969px;"><td style="height: 29.7969px;"><span class="_aupe copyable-text xkrh14z">address3</span></td><td style="height: 29.7969px;"><span class="_aupe copyable-text xkrh14z">1-100 characters</span></td></tr><tr style="height: 29.7969px;"><td style="height: 29.7969px;"><span class="_aupe copyable-text xkrh14z">city</span></td><td style="height: 29.7969px;"><span class="_aupe copyable-text xkrh14z">1-50 characters</span></td></tr><tr style="height: 29.7969px;"><td style="height: 29.7969px;"><span class="_aupe copyable-text xkrh14z">state</span></td><td style="height: 29.7969px;"><span class="_aupe copyable-text xkrh14z">2 characters</span></td></tr><tr style="height: 29.7969px;"><td style="height: 29.7969px;"><span class="_aupe copyable-text xkrh14z">province</span></td><td style="height: 29.7969px;"><span class="_aupe copyable-text xkrh14z">1-50 characters</span></td></tr><tr style="height: 29.7969px;"><td style="height: 29.7969px;"><span class="_aupe copyable-text xkrh14z">postal\_code</span></td><td style="height: 29.7969px;"><span class="_aupe copyable-text xkrh14z">1-10 characters</span></td></tr><tr style="height: 29.7969px;"><td style="height: 29.7969px;"><span class="_aupe copyable-text xkrh14z">country\_code</span></td><td style="height: 29.7969px;"><span class="_aupe copyable-text xkrh14z">3 characters</span></td></tr><tr style="height: 29.7969px;"><td style="height: 29.7969px;"><span class="_aupe copyable-text xkrh14z">gender</span></td><td style="height: 29.7969px;"><span class="_aupe copyable-text xkrh14z">U, M, F (Undefined, Male, Female) - defaults to 'U'</span></td></tr><tr style="height: 29.7969px;"><td style="height: 29.7969px;"><span class="_aupe copyable-text xkrh14z">date\_of\_birth</span></td><td style="height: 29.7969px;"><span class="_aupe copyable-text xkrh14z">YYYY-MM-DD</span></td></tr><tr><td><span class="_aupe copyable-text xkrh14z">alt\_phone</span></td><td><span class="_aupe copyable-text xkrh14z">1-12 characters</span></td></tr><tr><td><span class="_aupe copyable-text xkrh14z">email</span></td><td><span class="_aupe copyable-text xkrh14z">1-70 characters</span></td></tr><tr><td><span class="_aupe copyable-text xkrh14z">security\_phrase</span></td><td><span class="_aupe copyable-text xkrh14z">1-100 characters</span></td></tr><tr><td><span class="_aupe copyable-text xkrh14z">comments</span></td><td><span class="_aupe copyable-text xkrh14z">1-255 characters</span></td></tr><tr><td><span class="_aupe copyable-text xkrh14z">multi\_alt\_phones</span></td><td><span class="_aupe copyable-text xkrh14z">5-1024 characters (see examples for more info)</span></td></tr><tr><td><span class="_aupe copyable-text xkrh14z">rank</span></td><td><span class="_aupe copyable-text xkrh14z">1-5 digits</span></td></tr><tr><td><span class="_aupe copyable-text xkrh14z">owner</span></td><td><span class="_aupe copyable-text xkrh14z">1-20 characters (user ID, Territory or user group)</span></td></tr><tr><td><span class="_aupe copyable-text xkrh14z">entry\_list\_id</span></td><td><span class="_aupe copyable-text xkrh14z">WARNING! ONLY USE IF YOU KNOW WHAT YOU ARE DOING, CAN BREAK CUSTOM FIELDS! (must be all numbers, 3-12 digits, will not work if custom\_fields is set to Y)</span></td></tr></tbody></table>


### **Settings Fields**

<table border="1" id="bkmrk-dnc_check-y%2C-n-or-ar" style="border-collapse: collapse; width: 100%; height: 292.563px;"><colgroup><col style="width: 50.0596%;"></col><col style="width: 50.0596%;"></col></colgroup><tbody><tr style="height: 29.7969px;"><td style="height: 29.7969px;"><span class="_aupe copyable-text xkrh14z">dnc\_check</span></td><td style="height: 29.7969px;"><span class="_aupe copyable-text xkrh14z">Y, N or AREACODE, default is N</span></td></tr><tr style="height: 29.7969px;"><td style="height: 29.7969px;"><span class="_aupe copyable-text xkrh14z">campaign\_dnc\_check</span></td><td style="height: 29.7969px;"><span class="_aupe copyable-text xkrh14z">Y, N or AREACODE, default is N</span></td></tr><tr style="height: 46.5938px;"><td style="height: 46.5938px;"><span class="_aupe copyable-text xkrh14z">campaign\_id</span></td><td style="height: 46.5938px;"><span class="_aupe copyable-text xkrh14z">2-8 Character campaign ID, required if using campaign\_dnc\_check or callbacks</span></td></tr><tr style="height: 29.7969px;"><td style="height: 29.7969px;"><span class="_aupe copyable-text xkrh14z">add\_to\_hopper</span></td><td style="height: 29.7969px;"><span class="_aupe copyable-text xkrh14z">Y or N, default is N</span></td></tr><tr style="height: 29.7969px;"><td style="height: 29.7969px;"><span class="_aupe copyable-text xkrh14z">hopper\_priority</span></td><td style="height: 29.7969px;"><span class="_aupe copyable-text xkrh14z">99 to -99, the higher number the higher priority, default is 0</span></td></tr><tr style="height: 46.5938px;"><td style="height: 46.5938px;"><span class="_aupe copyable-text xkrh14z">hopper\_local\_call\_time\_check</span></td><td style="height: 46.5938px;"><span class="_aupe copyable-text xkrh14z">Y or N, default is N. Validate the local call time and/or state call time before inserting lead in the hopper</span></td></tr><tr><td><span class="_aupe copyable-text xkrh14z">usacan\_prefix\_check</span></td><td><span class="_aupe copyable-text xkrh14z">Y or N, default is N. Check for a valid 4th digit for USA and Canada phone numbers (cannot be 0 or 1).</span></td></tr><tr><td><span class="_aupe copyable-text xkrh14z">usacan\_areacode\_check</span></td><td><span class="_aupe copyable-text xkrh14z">Y or N, default is N. Check for a valid areacode for USA and Canada phone numbers(also checks for 10-digit length).</span></td></tr><tr><td><span class="_aupe copyable-text xkrh14z">nanpa\_ac\_prefix\_check</span></td><td><span class="_aupe copyable-text xkrh14z">Y or N, default is N. Check for a valid NANPA areacode and prefix, if optional NANPA data is on the system.</span></td></tr><tr><td><span class="_aupe copyable-text xkrh14z">custom\_fields</span></td><td><span class="_aupe copyable-text xkrh14z">Y or N, default is N. Defines whether the API will accept custom field data when inserting leads into the vicidial\_list table</span>

<span class="_aupe copyable-text xkrh14z"> For custom fields to be inserted, just add the field label as a variable to the URL string</span>

<span class="_aupe copyable-text xkrh14z"> For example, if the field\_label is "favorite\_color" you would add "&amp;favorite\_color=blue".</span>

</td></tr><tr><td><span class="_aupe copyable-text xkrh14z">tz\_method</span></td><td><span class="_aupe copyable-text xkrh14z">&lt;empty&gt;, POSTAL, TZCODE or NANPA, default is &lt;empty&gt; which will use the country code and areacode for time zone lookups</span>

<span class="_aupe copyable-text xkrh14z"> POSTAL relies on the postal\_code field</span>

<span class="_aupe copyable-text xkrh14z"> TZCODE relies on the owner field being populated with a proper time zone code</span>

<span class="_aupe copyable-text xkrh14z"> NANPA relies on the optional NANPA areacode prefix data being loaded on your system.</span>

</td></tr><tr><td><span class="_aupe copyable-text xkrh14z">callback</span></td><td><span class="_aupe copyable-text xkrh14z">Y or N, default is N. Set this lead as a scheduled callback. campaign\_id field is REQUIRED for callbacks.</span></td></tr><tr><td><span class="_aupe copyable-text xkrh14z">callback\_status</span></td><td><span class="_aupe copyable-text xkrh14z">1-6 Character, callback status to use, default is CALLBK (vicidial\_list status will be set to CBHOLD to lock.</span></td></tr><tr><td><span class="_aupe copyable-text xkrh14z">callback\_datetime</span></td><td><span class="_aupe copyable-text xkrh14z">YYYY-MM-DD+HH:MM:SS, date and time of scheduled callback. REQUIRED if callback is set.</span>

<span class="_aupe copyable-text xkrh14z"> 'NOW' can be used for current datetime. 'xDAYS' can also be used where 'x' is replaced with a number of days in the future.</span>

</td></tr><tr><td><span class="_aupe copyable-text xkrh14z">callback\_type</span></td><td><span class="_aupe copyable-text xkrh14z">USERONLY or ANYONE, default is ANYONE.</span></td></tr><tr><td><span class="_aupe copyable-text xkrh14z">callback\_user</span></td><td><span class="_aupe copyable-text xkrh14z">User ID the USERONLY callback is assigned to.</span></td></tr><tr><td><span class="_aupe copyable-text xkrh14z">callback\_comments</span></td><td><span class="_aupe copyable-text xkrh14z">Optional comments to appear when the callback is called back.</span></td></tr><tr><td><span class="_aupe copyable-text xkrh14z">lookup\_state</span></td><td><span class="_aupe copyable-text xkrh14z">Y or N, default is N. Looks up state field from areacode list. Only works if the 'state' field is not populated.</span></td></tr><tr><td><span class="_aupe copyable-text xkrh14z">list\_exists\_check</span></td><td><span class="_aupe copyable-text xkrh14z">Y or N, default is N. If the list\_id is not a defined list in the system, it will ERROR and not insert the lead.</span></td></tr><tr style="height: 80.1875px;"><td style="height: 80.1875px;"><span class="_aupe copyable-text xkrh14z">duplicate\_check</span></td><td style="height: 80.1875px;"><span class="_aupe copyable-text xkrh14z">Check for duplicate records in the system, can select more than one (duplicate\_check=DUPLIST-DUPTITLEALTPHONELIST)</span>

<span class="_aupe copyable-text xkrh14z"> If duplicate is found, will return error, the duplicate data and lead\_id and list\_id of existing record</span>

</td></tr></tbody></table>


#### **<span class="_aupe copyable-text xkrh14z">Here are the duplicate\_check options:  
  
</span>**

- <span class="_aupe copyable-text xkrh14z">**DUPLIST** - check for duplicate phone\_number in same list</span>
- <span class="_aupe copyable-text xkrh14z"> **DUPCAMP** - check for duplicate phone\_number in all lists for this list's campaign</span>
- <span class="_aupe copyable-text xkrh14z"> **DUPSYS** - check for duplicate phone\_number in entire system</span>
- <span class="_aupe copyable-text xkrh14z"> **DUPPHONEALTLIST** - check for duplicate phone against phone\_number and alt\_phone in same list</span>
- <span class="_aupe copyable-text xkrh14z"> **DUPPHONEALTCAMP** - check for duplicate phone against phone\_number and alt\_phone in all lists for this list's campaign</span>
- <span class="_aupe copyable-text xkrh14z"> **DUPPHONEALTSYS** - check for duplicate phone against phone\_number and alt\_phone in entire system</span>
- <span class="_aupe copyable-text xkrh14z"> **DUPTITLEALTPHONELIST** - check for duplicate title and alt\_phone in same list</span>
- <span class="_aupe copyable-text xkrh14z"> **DUPTITLEALTPHONECAMP** - check for duplicate title and alt\_phone in all lists for this list's campaign</span>
- <span class="_aupe copyable-text xkrh14z"> **DUPTITLEALTPHONESYS** - check for duplicate title and alt\_phone in entire system</span>
- <span class="_aupe copyable-text xkrh14z"> **DUPNAMEPHONELIST** - check for duplicate first\_name, last\_name and phone\_number in same list</span>
- <span class="_aupe copyable-text xkrh14z"> **DUPNAMEPHONECAMP** - check for duplicate first\_name, last\_name and phone\_number in all lists for this list's campaign</span>
- <span class="_aupe copyable-text xkrh14z"> **DUPNAMEPHONESYS** - check for duplicate first\_name, last\_name and phone\_number in entire system</span>
- <span class="_aupe copyable-text xkrh14z">" **1/2/3/7/14/15/21/28/30/60/90/180/360DAY** - Added to one of the above duplicate checks(i.e. "DUPSYS90DAY"), only checks leads loaded in last 90 days</span>





### **Request Examples:**

#### **GET :**

```bash
curl -X GET "https://DOMAIN.croco-dial.net/API/lmapi.php?user=MyUser&pass=MyPass&function=add_lead&phone_number=number_client&source=MyUser

```

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

If you prefer to send the data as form parameters:

```bash
curl -X POST "https://DOMAIN.croco-dial.net/API/lmapi.php" \
  --data-urlencode "user=MyUser" \
  --data-urlencode "pass=MyPass" \
  --data-urlencode "function=add_lead" \
  --data-urlencode "phone_number=number_client" \
  --data-urlencode "source=MyUser"
```

####  **Example Response**

```
SUCCESS: add_lead LEAD HAS BEEN ADDED - 7275551111|6666|999|193715|-4
NOTICE: add_lead ADDED TO HOPPER - 7275551111|6666|193715|1677922
```

```
SUCCESS: add_lead LEAD HAS BEEN ADDED - 7275551111|6666|999|193716|-4
NOTICE: add_lead CUSTOM FIELDS VALUES ADDED - 7275551111|1234|101
NOTICE: add_lead CUSTOM FIELDS NOT ADDED, CUSTOM FIELDS DISABLED - 7275551111|Y|0
NOTICE: add_lead CUSTOM FIELDS NOT ADDED, NO CUSTOM FIELDS DEFINED FOR THIS LIST - 7275551111|1234|101
NOTICE: add_lead CUSTOM FIELDS NOT ADDED, NO FIELDS DEFINED - 7275551111|1234|101
NOTICE: add_lead MULTI-ALT-PHONE NUMBERS LOADED - 3|6666|193716
NOTICE: add_lead NOT ADDED TO HOPPER, OUTSIDE OF LOCAL TIME - 7275551111|6666|193716|-4|0
```

```
NOTICE: add_lead SCHEDULED CALLBACK ADDED - 1234|2011-09-29 12:00:01|TESTCAMP|6666|USERONLY|CALLBK
NOTICE: add_lead SCHEDULED CALLBACK NOT ADDED, USER NOT VALID - 1234|TESTCAMP|6|
NOTICE: add_lead SCHEDULED CALLBACK NOT ADDED, CAMPAIGN NOT VALID - 1234|XYZ
```

```
NOTICE: add_lead NANPA options disabled, NANPA prefix data not loaded - 0|6666
```

<p class="callout warning"> **Example Error**</p>

```
ERROR: add_lead INVALID PHONE NUMBER LENGTH - 72755|6666 
ERROR: add_lead INVALID PHONE NUMBER PREFIX - 72755|6666 
ERROR: add_lead INVALID PHONE NUMBER AREACODE - 72755|6666 
ERROR: add_lead INVALID PHONE NUMBER NANPA AREACODE PREFIX - 7275551212|6666
```

```
ERROR: add_lead USER DOES NOT HAVE PERMISSION TO ADD LEADS TO THE SYSTEM - 6666|0 
ERROR: add_lead NOT AN ALLOWED LIST ID - 7275551212|98762
ERROR: add_lead NOT A DEFINED LIST ID, LIST EXISTS CHECK ENABLED - 7275551212|12344
```

```
ERROR: NO FUNCTION SPECIFIED
```

```
ERROR: add_lead DUPLICATE PHONE NUMBER IN LIST - 7275551111|101|8765444
ERROR: add_lead DUPLICATE PHONE NUMBER IN CAMPAIGN LISTS - 7275551111|101|8765444|101
ERROR: add_lead DUPLICATE PHONE NUMBER IN SYSTEM - 7275551111|101|8765444|101
ERROR: add_lead DUPLICATE PHONE NUMBER IN LIST - 7275551111|101|8765444|PHONE
ERROR: add_lead DUPLICATE PHONE NUMBER IN CAMPAIGN LISTS - 7275551111|101|8765444|101|ALT
ERROR: add_lead DUPLICATE PHONE NUMBER IN SYSTEM - 7275551111|101|8765444|101|PHONE
ERROR: add_lead DUPLICATE TITLE ALT_PHONE IN LIST - 1234|7275551111|101|8765444
ERROR: add_lead DUPLICATE TITLE ALT_PHONE IN CAMPAIGN LISTS - 1234|7275551111|101|8765444|101
ERROR: add_lead DUPLICATE TITLE ALT_PHONE IN SYSTEM - 1234|7275551111|101|8765444|101
ERROR: add_lead DUPLICATE NAME PHONE IN LIST - Bob|Smith|7275551113|101|8765444|101
ERROR: add_lead DUPLICATE NAME PHONE IN CAMPAIGN LISTS - Bob|Smith|7275551113|101|8765444|101
ERROR: add_lead DUPLICATE NAME PHONE IN SYSTEM - Bob|Smith|7275551113|101|8765444|101
```