# Retreaver

> Track and route calls in Retreaver: read the call log, manage campaigns, targets and affiliates, read tracking numbers, and block or unblock callers.

App · 24 actions. Web page: https://docs.lodol.com/docs/integrations/retreaver

## Actions

### Block caller

Add a caller's number to the company's suppressed numbers, so their calls are not connected.

**Inputs**

- Phone number (`phone_number`, text, required): The caller's number with its country code, like +15555555555.
- Caller can unblock (`can_resubscribe`, true/false): Let the caller unblock themselves by pressing 7 when a campaign offers it. Defaults to on.

**Outputs**

- `suppressed_number` (object): The blocked number

**Example output**

```json
{
  "suppressed_number": {
    "can_resubscribe": true,
    "created_at": "2026-11-30T21:09:54Z",
    "id": 18996945,
    "number": "+13213749611"
  }
}
```

### Create affiliate

Add an affiliate (publisher). Give a name or a company name.

**Inputs**

- AFID (`afid`, text): Your own ID for the affiliate. Retreaver makes one if left empty.
- First name (`first_name`, text): The affiliate's first name.
- Last name (`last_name`, text): The affiliate's last name.
- Company (`company_name`, text): The affiliate's company name.
- Paused (`paused`, true/false): Paused affiliates are left out of routing.

**Outputs**

- `affiliate` (object): The new affiliate

**Example output**

```json
{
  "affiliate": {
    "afid": "0002",
    "company_name": "Acme",
    "created_at": "2026-11-03T15:56:01Z",
    "first_name": "Nancy",
    "id": 1,
    "last_name": "Drew"
  }
}
```

### Create campaign

Create a campaign, optionally sending its callers to a phone number. Add timers and further menu options in Retreaver.

**Inputs**

- Name (`name`, text, required): A label for the campaign.
- Send calls to (`route_to_number`, text): The phone number callers are connected to, with its country code. Leave empty to set routing up in Retreaver.
- Your campaign ID (CID) (`campaign_cid`, text): Your own ID for it. Retreaver makes one if left empty.
- Record calls (`record_calls`, true/false): Record the campaign's calls.
- Repeat-caller window (seconds) (`dedupe_seconds`, number): Within this many seconds a repeat caller doesn't fire timers again. 0 turns it off. At least 0.
- Greeting (`greeting`, text): Words read to callers before they are connected.
- Greeting voice (`voice`, text): The voice that reads the greeting. One of: `Female`, `Male`.

**Outputs**

- `campaign` (object): The new campaign

**Example output**

```json
{
  "campaign": {
    "cid": "0044",
    "created_at": "2026-11-01T13:50:21Z",
    "dedupe_seconds": 86400,
    "greeting": {
      "message": "Press one to continue.",
      "voice_gender": "Female"
    },
    "id": 9872,
    "menu_options": [
      {
        "menu_option": {
          "option": "1",
          "target_number": "+18987748833"
        }
      }
    ],
    "name": "Main - Sales",
    "paused": false,
    "record_calls": true,
    "timers": []
  }
}
```

### Create target

Create a target that calls can be sent to, at a phone number or SIP address. It is open around the clock until hours are set in Retreaver.

**Inputs**

- Number (`number`, text, required): A phone number with its country code (+15555555555) or a SIP address (sip:user@example.com).
- Name (`name`, text): A label for the target.
- Your target ID (`target_tid`, text): Your own ID for the target (its TID).
- Priority (`priority`, number): Lower numbers get calls first. Defaults to 1. At least 0.
- Weight (`weight`, number): Shares calls among targets of equal priority. Defaults to 1. At least 0.
- Ring time (seconds) (`timeout_seconds`, number): How long to ring before moving on, 5 to 999. Defaults to 30. From 5 to 999.
- Most calls at once (`concurrency_cap`, number): The most calls it takes at the same time. Leave empty for no limit. At least 1.
- Time zone (`time_zone`, text): The time zone its business hours follow. Defaults to UTC. One of: `Eastern Time (US & Canada)` (US Eastern), `Central Time (US & Canada)` (US Central), `Mountain Time (US & Canada)` (US Mountain), `Arizona`, `Pacific Time (US & Canada)` (US Pacific), `Alaska`, `Hawaii`, `Atlantic Time (Canada)` (Atlantic (Canada)), `UTC`, `London`, and 3 more.
- Paused (`paused`, true/false): Paused targets are skipped when calls are routed.

**Outputs**

- `target` (object): The new target

**Example output**

```json
{
  "target": {
    "calls_in_progress": 0,
    "caps": [
      {
        "cap": null,
        "filled": 0,
        "id": 707898,
        "type": "Hard"
      }
    ],
    "concurrency_cap": 5,
    "id": 22592,
    "name": "Sales desk",
    "number": "+18668987878",
    "paused": false,
    "priority": 1,
    "tid": "sales",
    "time_zone": "Eastern Time (US & Canada)",
    "timeout_seconds": 30,
    "weight": 1
  }
}
```

### Delete affiliate

Delete an affiliate.

**Inputs**

- Affiliate (`affiliate_id`, text, required): The affiliate. Pick one, or give its Retreaver ID (not its AFID).

**Outputs**

- `affiliate_id` (text): The affiliate deleted
- `deleted` (true/false): True once it is gone

**Example output**

```json
{
  "affiliate_id": "1",
  "deleted": true
}
```

### Delete campaign

Delete a campaign.

**Inputs**

- Campaign (`campaign_cid`, text, required): The campaign. Pick one, or give its CID.

**Outputs**

- `campaign_cid` (text): The campaign's CID deleted
- `deleted` (true/false): True once it is gone

**Example output**

```json
{
  "campaign_cid": "0044",
  "deleted": true
}
```

### Delete target

Delete a target. Remove it from its campaigns and numbers first.

**Inputs**

- Target (`target_id`, text, required): The target. Pick one, or give its ID.

**Outputs**

- `deleted` (true/false): True once it is gone
- `target_id` (text): The target deleted

**Example output**

```json
{
  "deleted": true,
  "target_id": "22592"
}
```

### Get affiliate

Get one affiliate (publisher).

**Inputs**

- Affiliate (`affiliate_id`, text, required): The affiliate. Pick one, or give its Retreaver ID (not its AFID).

**Outputs**

- `affiliate` (object): The affiliate

**Example output**

```json
{
  "affiliate": {
    "afid": "0002",
    "company_name": "Acme",
    "created_at": "2026-11-03T15:56:01Z",
    "first_name": "Nancy",
    "id": 1,
    "last_name": "Drew"
  }
}
```

### Get call

Get one call by its UUID, with what happened during it (menu choices, routing, timers).

**Inputs**

- Call UUID (`call_uuid`, text, required): The call's UUID, from 'List calls'.

**Outputs**

- `call` (object): The call

**Example output**

```json
{
  "call": {
    "affiliate_name": "Nancy Drew",
    "afid": "0002",
    "call_flow_events": [],
    "caller": "+13015236555",
    "caller_city": "Rockingham",
    "caller_state": "NC",
    "campaign": {
      "id": 9872,
      "name": "Main - Sales"
    },
    "cid": "0044",
    "connected": true,
    "converted": true,
    "created_at": "2026-11-30T16:52:18Z",
    "dialed_call_duration": 2,
    "dialed_number": "+12263399112",
    "end_time": "2026-11-30T16:52:32Z",
    "payout": 5.0,
    "recording_url": "https://example.com/recording.mp3",
    "revenue": 5.0,
    "start_time": "2026-11-30T16:52:18Z",
    "status": "finished",
    "tags": {
      "geo": "301,us"
    },
    "target_id": 22592,
    "target_name": "Sales desk",
    "total_duration": 14,
    "updated_at": "2026-11-30T16:53:00Z",
    "uuid": "f1abfb78-ab8a-4146-9946-8169fbcc6d6c"
  }
}
```

### Get campaign

Get one campaign by its CID, with its greeting, menu and timers.

**Inputs**

- Campaign (`campaign_cid`, text, required): The campaign. Pick one, or give its CID.

**Outputs**

- `campaign` (object): The campaign

**Example output**

```json
{
  "campaign": {
    "cid": "0044",
    "created_at": "2026-11-01T13:50:21Z",
    "dedupe_seconds": 86400,
    "greeting": {
      "message": "Press one to continue.",
      "voice_gender": "Female"
    },
    "id": 9872,
    "menu_options": [
      {
        "menu_option": {
          "option": "1",
          "target_number": "+18987748833"
        }
      }
    ],
    "name": "Main - Sales",
    "paused": false,
    "record_calls": true,
    "timers": []
  }
}
```

### Get company

Get the connected Retreaver company: its name, ID and balance.

**Inputs**: None.

**Outputs**

- `company` (object): The company

**Example output**

```json
{
  "company": {
    "balance": "100.0",
    "created_at": "2026-01-17T22:58:17Z",
    "id": 1,
    "name": "Acme"
  }
}
```

### Get number

Get one tracking number with its campaign, affiliate and greeting.

**Inputs**

- Number ID (`number_id`, text, required): The number's ID (not the phone number), from 'List numbers'.

**Outputs**

- `number` (object): The number

**Example output**

```json
{
  "number": {
    "afid": "0002",
    "campaign_name": "Main - Sales",
    "cid": "0044",
    "id": 5,
    "name": "Publisher Joe",
    "number": "+16479311232",
    "sid": "joe",
    "toll_free": false
  }
}
```

### Get target

Get one target with its number, routing settings and caps.

**Inputs**

- Target (`target_id`, text, required): The target. Pick one, or give its ID.

**Outputs**

- `target` (object): The target

**Example output**

```json
{
  "target": {
    "calls_in_progress": 0,
    "caps": [
      {
        "cap": null,
        "filled": 0,
        "id": 707898,
        "type": "Hard"
      }
    ],
    "concurrency_cap": 5,
    "id": 22592,
    "name": "Sales desk",
    "number": "+18668987878",
    "paused": false,
    "priority": 1,
    "tid": "sales",
    "time_zone": "Eastern Time (US & Canada)",
    "timeout_seconds": 30,
    "weight": 1
  }
}
```

### List affiliates

List the company's affiliates (publishers) with their AFIDs.

**Inputs**: None.

**Outputs**

- `affiliates` (list): The affiliates
- `count` (number): How many were returned

**Example output**

```json
{
  "affiliates": [
    {
      "afid": "0002",
      "company_name": "Acme",
      "created_at": "2026-11-03T15:56:01Z",
      "first_name": "Nancy",
      "id": 1,
      "last_name": "Drew"
    }
  ],
  "count": 1
}
```

### List blocked callers

List the caller numbers the company blocks (its suppressed numbers).

**Inputs**: None.

**Outputs**

- `count` (number): How many were returned
- `suppressed_numbers` (list): The blocked numbers

**Example output**

```json
{
  "count": 1,
  "suppressed_numbers": [
    {
      "can_resubscribe": true,
      "created_at": "2026-11-30T21:09:54Z",
      "id": 18996945,
      "number": "+13213749611"
    }
  ]
}
```

### List calls

List calls from the call log, newest first unless chosen otherwise, with caller, campaign, affiliate, target, duration, conversion and revenue. Gets one page; to see more, run it again with the next page.

**Inputs**

- From (`created_after`, date and time): Only calls that came in on or after this time.
- Until (`created_before`, date and time): Only calls that came in on or before this time.
- Sort by (`sort_by`, text): What to sort by. One of: `created_at` (When the call came in (default)), `updated_at` (When the call last changed (newest first)).
- Order (`order`, text): Newest or oldest first. Sorting by last change is always newest first. One of: `desc` (Newest first (default)), `asc` (Oldest first).
- Caller (`caller`, text): Only calls from this number, with its country code.
- Campaign (`campaign_cid`, text): Only calls on this campaign. Leave empty for all.
- Affiliate AFID (`affiliate_afid`, text): Only calls from the affiliate with this AFID.
- Target TID (`target_tid`, text): Only calls to the target with this TID.
- Sub ID (`sub_id`, text): Only calls with this affiliate sub ID.
- Page (`page`, number): Which page of results, from 1. At least 1.
- Page size (`per_page`, number): How many per page, 1 to 100. Defaults to 25. From 1 to 100.

**Outputs**

- `calls` (list): The calls
- `count` (number): How many were returned
- `page` (number): The page returned

**Example output**

```json
{
  "calls": [
    {
      "affiliate_name": "Nancy Drew",
      "afid": "0002",
      "caller": "+13015236555",
      "caller_city": "Rockingham",
      "caller_state": "NC",
      "campaign": {
        "id": 9872,
        "name": "Main - Sales"
      },
      "cid": "0044",
      "connected": true,
      "converted": true,
      "created_at": "2026-11-30T16:52:18Z",
      "dialed_call_duration": 2,
      "dialed_number": "+12263399112",
      "end_time": "2026-11-30T16:52:32Z",
      "payout": 5.0,
      "recording_url": "https://example.com/recording.mp3",
      "revenue": 5.0,
      "start_time": "2026-11-30T16:52:18Z",
      "status": "finished",
      "tags": {
        "geo": "301,us"
      },
      "target_id": 22592,
      "target_name": "Sales desk",
      "total_duration": 14,
      "updated_at": "2026-11-30T16:53:00Z",
      "uuid": "f1abfb78-ab8a-4146-9946-8169fbcc6d6c"
    }
  ],
  "count": 1,
  "page": 1
}
```

### List campaigns

List the company's campaigns with their CIDs and settings.

**Inputs**: None.

**Outputs**

- `campaigns` (list): The campaigns
- `count` (number): How many were returned

**Example output**

```json
{
  "campaigns": [
    {
      "cid": "0044",
      "created_at": "2026-11-01T13:50:21Z",
      "dedupe_seconds": 86400,
      "greeting": {
        "message": "Press one to continue.",
        "voice_gender": "Female"
      },
      "id": 9872,
      "menu_options": [
        {
          "menu_option": {
            "option": "1",
            "target_number": "+18987748833"
          }
        }
      ],
      "name": "Main - Sales",
      "paused": false,
      "record_calls": true,
      "timers": []
    }
  ],
  "count": 1
}
```

### List numbers

List the company's tracking numbers, optionally for one campaign, affiliate or sub ID.

**Inputs**

- Campaign (`campaign_cid`, text): Only this campaign's numbers.
- Affiliate AFID (`affiliate_afid`, text): Only this affiliate's numbers.
- Sub ID (`sub_id`, text): Only numbers with this sub ID.
- Page (`page`, number): Which page of results, from 1. At least 1.
- Page size (`per_page`, number): How many per page, 1 to 100. Defaults to 25. From 1 to 100.

**Outputs**

- `count` (number): How many were returned
- `numbers` (list): The numbers

**Example output**

```json
{
  "count": 1,
  "numbers": [
    {
      "afid": "0002",
      "campaign_name": "Main - Sales",
      "cid": "0044",
      "id": 5,
      "name": "Publisher Joe",
      "number": "+16479311232",
      "sid": "joe",
      "toll_free": false
    }
  ]
}
```

### List targets

List the company's targets (where calls are sent) with their caps and calls in progress.

**Inputs**: None.

**Outputs**

- `count` (number): How many were returned
- `targets` (list): The targets

**Example output**

```json
{
  "count": 1,
  "targets": [
    {
      "calls_in_progress": 0,
      "caps": [
        {
          "cap": null,
          "filled": 0,
          "id": 707898,
          "type": "Hard"
        }
      ],
      "concurrency_cap": 5,
      "id": 22592,
      "name": "Sales desk",
      "number": "+18668987878",
      "paused": false,
      "priority": 1,
      "tid": "sales",
      "time_zone": "Eastern Time (US & Canada)",
      "timeout_seconds": 30,
      "weight": 1
    }
  ]
}
```

### Reset target's hard cap

Clear the calls counted toward a target's hard cap, so it takes calls again before its usual reset.

**Inputs**

- Target (`target_id`, text, required): The target. Pick one, or give its ID.

**Outputs**

- `reset` (true/false): True once reset
- `target_id` (text): The target

**Example output**

```json
{
  "reset": true,
  "target_id": "22592"
}
```

### Unblock caller

Remove a caller's number from the company's suppressed numbers.

**Inputs**

- Phone number (`phone_number`, text, required): The caller's number with its country code, like +15555555555.

**Outputs**

- `phone_number` (text): The number unblocked
- `unsuppressed` (true/false): True once removed

**Example output**

```json
{
  "phone_number": "+13213749611",
  "unsuppressed": true
}
```

### Update affiliate

Change an affiliate's name or company, or pause it. Only the fields given change.

**Inputs**

- Affiliate (`affiliate_id`, text, required): The affiliate. Pick one, or give its Retreaver ID (not its AFID).
- First name (`first_name`, text): The affiliate's first name.
- Last name (`last_name`, text): The affiliate's last name.
- Company (`company_name`, text): The affiliate's company name.
- Paused (`paused`, true/false): Paused affiliates are left out of routing.

**Outputs**

- `affiliate` (object): The affiliate

**Example output**

```json
{
  "affiliate": {
    "afid": "0002",
    "company_name": "Acme Media",
    "created_at": "2026-11-03T15:56:01Z",
    "first_name": "Nancy",
    "id": 1,
    "last_name": "Drew"
  }
}
```

### Update campaign

Rename a campaign or change its recording, repeat-caller window or greeting. Only the fields given change.

**Inputs**

- Campaign (`campaign_cid`, text, required): The campaign. Pick one, or give its CID.
- Name (`name`, text): A new name. Leave empty to keep it.
- Record calls (`record_calls`, true/false): Record the campaign's calls.
- Repeat-caller window (seconds) (`dedupe_seconds`, number): Within this many seconds a repeat caller doesn't fire timers again. 0 turns it off. At least 0.
- Greeting (`greeting`, text): Words read to callers before they are connected.
- Greeting voice (`voice`, text): The voice that reads the greeting. One of: `Female`, `Male`.

**Outputs**

- `campaign` (object): The campaign

**Example output**

```json
{
  "campaign": {
    "cid": "0044",
    "created_at": "2026-11-01T13:50:21Z",
    "dedupe_seconds": 86400,
    "greeting": {
      "message": "Press one to continue.",
      "voice_gender": "Female"
    },
    "id": 9872,
    "menu_options": [
      {
        "menu_option": {
          "option": "1",
          "target_number": "+18987748833"
        }
      }
    ],
    "name": "Main - Sales (US)",
    "paused": false,
    "record_calls": true,
    "timers": []
  }
}
```

### Update target

Change a target's number, name, routing order, ring time, call limit or time zone, or pause it. Only the fields given change.

**Inputs**

- Target (`target_id`, text, required): The target. Pick one, or give its ID.
- Number (`number`, text): A new number or SIP address. Leave empty to keep it.
- Name (`name`, text): A label for the target.
- Your target ID (`target_tid`, text): Your own ID for the target (its TID).
- Priority (`priority`, number): Lower numbers get calls first. Defaults to 1. At least 0.
- Weight (`weight`, number): Shares calls among targets of equal priority. Defaults to 1. At least 0.
- Ring time (seconds) (`timeout_seconds`, number): How long to ring before moving on, 5 to 999. Defaults to 30. From 5 to 999.
- Most calls at once (`concurrency_cap`, number): The most calls it takes at the same time. Leave empty for no limit. At least 1.
- Time zone (`time_zone`, text): The time zone its business hours follow. Defaults to UTC. One of: `Eastern Time (US & Canada)` (US Eastern), `Central Time (US & Canada)` (US Central), `Mountain Time (US & Canada)` (US Mountain), `Arizona`, `Pacific Time (US & Canada)` (US Pacific), `Alaska`, `Hawaii`, `Atlantic Time (Canada)` (Atlantic (Canada)), `UTC`, `London`, and 3 more.
- Paused (`paused`, true/false): Paused targets are skipped when calls are routed.

**Outputs**

- `target` (object): The target

**Example output**

```json
{
  "target": {
    "calls_in_progress": 0,
    "caps": [
      {
        "cap": null,
        "filled": 0,
        "id": 707898,
        "type": "Hard"
      }
    ],
    "concurrency_cap": 5,
    "id": 22592,
    "name": "Sales desk",
    "number": "+18668987878",
    "paused": true,
    "priority": 1,
    "tid": "sales",
    "time_zone": "Eastern Time (US & Canada)",
    "timeout_seconds": 30,
    "weight": 1
  }
}
```
