# Ringba

> Track and route calls in Ringba: search the call log and tag calls, manage campaigns, publishers and targets, read buyers and tracking numbers, and block or unblock caller numbers.

App · 25 actions. Web page: https://docs.lodol.com/docs/integrations/ringba

## Actions

### Block caller number

Block calls from a number, from every number with a prefix, or from anonymous callers, in every campaign or one, for good or for some hours.

**Inputs**

- Number to block (`phone_number`, text, required): A number with its country code (+15556661234), a prefix ending in * (+1555* for an area code), or +anonymous.
- Campaign (`campaign_id`, text): The campaign to block it in; leave empty for every campaign. Pick one, or give its ID from an earlier step.
- For how many hours (`hours`, number): Leave empty to block it until it is unblocked. At least 1.

**Outputs**

- `blocked_number` (object): The block

**Example output**

```json
{
  "blocked_number": {
    "campaignId": "",
    "createdDate": "2026-11-30T21:55:50Z",
    "expiration": "2026-12-01T05:55:50Z",
    "id": "BL3c6bdb6a00644d9b86c3115375382a68",
    "phoneNumber": "+12135551223",
    "timeLimited": true
  }
}
```

### Create campaign

Create a campaign. Add its numbers, publishers and targets in Ringba or with the other steps.

**Inputs**

- Name (`name`, text, required): The campaign's name, as publishers see it.
- Country (`country_code`, text): The two-letter code of the country the campaign's numbers are in, such as US. A new campaign uses US unless another is given.
- Your campaign ID (`user_campaign_id`, text): An ID of your own to track the campaign by in reports.
- Record calls (`record_calls`, true/false): Record the campaign's calls.

**Outputs**

- `campaign` (object): The new campaign

**Example output**

```json
{
  "campaign": {
    "accountId": "RA432a55cf08d848b9aertac7402f3r5y6",
    "affiliates": [
      {
        "id": "AFbd21c4a3274c4382aa98919d5149baf3",
        "name": "You"
      }
    ],
    "countryCode": "US",
    "enabled": true,
    "id": "CA74c0b7f1f3824246b73e72a9238b4bfc",
    "name": "Home insurance",
    "recordSetting": {
      "record": true
    },
    "routes": [],
    "userCampaignId": "home-ins"
  }
}
```

### Create publisher

Add a publisher to the account. No user login is made for it; invite one in Ringba if they need to sign in.

**Inputs**

- Name (`name`, text, required): The publisher's name.
- Can create numbers (`create_numbers`, true/false): Let the publisher create new numbers, rather than only use the account's existing ones.
- Sub ID (`sub_id`, text): A sub ID to track the publisher by.
- Can hear recordings (`access_to_recordings`, true/false): Let the publisher play call recordings. Left empty, the account's setting applies.
- Block calls once capped (`block_calls_if_capped`, true/false): Block the publisher's calls once its payout cap is reached. Left empty, the account's setting applies.

**Outputs**

- `publisher` (object): The new publisher

**Example output**

```json
{
  "publisher": {
    "accessToRecordings": true,
    "createNumbers": false,
    "enabled": true,
    "id": "AF8df87f01adff4a35a1835394493dbcfe",
    "isSelf": false,
    "name": "Lead Partners",
    "subId": "lp"
  }
}
```

### Create target

Create a target that calls are routed to at a phone number. Caps and hours are left open; set them in Ringba.

**Inputs**

- Name (`name`, text, required): The target's name.
- Phone number (`phone_number`, text, required): The number calls go to, with the country code, like +15555555555.
- Time zone (`time_zone`, text, required): The time zone the target's hours and caps follow. One of: `Eastern Standard Time` (US Eastern), `Central Standard Time` (US Central), `Mountain Standard Time` (US Mountain), `US Mountain Standard Time` (US Mountain, Arizona (no daylight saving)), `Pacific Standard Time` (US Pacific), `Alaskan Standard Time` (Alaska), `Hawaiian Standard Time` (Hawaii), `Atlantic Standard Time` (Atlantic (Canada)), `UTC`, `GMT Standard Time` (London), and 4 more.
- Ring time (seconds) (`connection_timeout`, number): How long to ring the target before routing the call elsewhere. 0 uses Ringba's default. From 0 to 600.
- Sub ID (`sub_id`, text): A sub ID to track the target by.
- Buyer (`buyer_id`, text): The buyer the target belongs to. Pick one, or give its ID from an earlier step.
- Count a call toward caps (`call_increment`, text): When a call counts toward the target's caps. One of: `onConnect` (When the call connects), `onConvert` (When the call converts), `onRevenue` (When the call earns revenue).

**Outputs**

- `target` (object): The new target

**Example output**

```json
{
  "target": {
    "enabled": true,
    "id": "TA2f6961e921ef4b92b7304dd76db8336f",
    "instructions": {
      "callType": "number",
      "connectionTimeOut": 0,
      "number": "+16317918378"
    },
    "name": "Sales desk",
    "schedule": {
      "concurrencyCap": -1,
      "dailyCap": -1,
      "timeZoneId": "Eastern Standard Time"
    },
    "subId": "",
    "targetCallIncrement": "onConvert"
  }
}
```

### Delete campaign

Delete a campaign from the account.

**Inputs**

- Campaign (`campaign_id`, text, required): The campaign. Pick one, or give its ID from an earlier step.

**Outputs**

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

**Example output**

```json
{
  "campaign_id": "CA74c0b7f1f3824246b73e72a9238b4bfc",
  "deleted": true
}
```

### Delete publisher

Remove a publisher from the account. Its numbers stay in the account.

**Inputs**

- Publisher (`publisher_id`, text, required): The publisher. Pick one, or give its ID from an earlier step.

**Outputs**

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

**Example output**

```json
{
  "deleted": true,
  "publisher_id": "AF8df87f01adff4a35a1835394493dbcfe"
}
```

### Delete target

Delete a target so no more calls are routed to it.

**Inputs**

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

**Outputs**

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

**Example output**

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

### Get call details

Get calls in full by their call IDs, with every routing event Ringba recorded for each.

**Inputs**

- Call IDs (`call_ids`, list, required): One or more call IDs (inboundCallId) from 'Search calls'.

**Outputs**

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

**Example output**

```json
{
  "calls": [
    {
      "callDt": 1764500427115,
      "callLengthInSeconds": 95,
      "campaignId": "CA74c0b7f1f3824246b73e72a9238b4bfc",
      "campaignName": "Home insurance",
      "conversionAmount": 25,
      "events": [
        {
          "name": "CallPlanDetail"
        }
      ],
      "hasConnected": true,
      "hasConverted": true,
      "inboundCallId": "v2cd7lW_KVB95pJnSeRSRBMHuL_MOzcMTn5A8qL5_Hc178aRgTZhj-JA",
      "inboundPhoneNumber": "+17813364178",
      "isLive": false,
      "number": "+18885852294",
      "payoutAmount": 10,
      "profitNet": 14.96,
      "publisherId": "AFbd21c4a3274c4382aa98919d5149baf3",
      "publisherName": "You",
      "recordingUrl": "https://media.ringba.com/recording-public?v=v1&k=abc",
      "targetId": "TA2f6961e921ef4b92b7304dd76db8336f",
      "targetName": "Sales desk"
    }
  ],
  "count": 1
}
```

### Get campaign

Get one campaign with its publishers, routing and recording settings.

**Inputs**

- Campaign (`campaign_id`, text, required): The campaign. Pick one, or give its ID from an earlier step.

**Outputs**

- `campaign` (object): The campaign

**Example output**

```json
{
  "campaign": {
    "accountId": "RA432a55cf08d848b9aertac7402f3r5y6",
    "affiliates": [
      {
        "id": "AFbd21c4a3274c4382aa98919d5149baf3",
        "name": "You"
      }
    ],
    "countryCode": "US",
    "enabled": true,
    "id": "CA74c0b7f1f3824246b73e72a9238b4bfc",
    "name": "Home insurance",
    "recordSetting": {
      "record": true
    },
    "routes": [],
    "userCampaignId": "home-ins"
  }
}
```

### Get number

Get one tracking number with its campaign and publisher.

**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": {
    "affiliate": {
      "id": "AFbd21c4a3274c4382aa98919d5149baf3",
      "name": "You"
    },
    "campaignId": "CA74c0b7f1f3824246b73e72a9238b4bfc",
    "displayNumber": "+18885852294",
    "id": "PNZFWQO0",
    "isTollFree": true,
    "phoneNumber": "+18885852294"
  }
}
```

### Get publisher

Get one publisher with its settings.

**Inputs**

- Publisher (`publisher_id`, text, required): The publisher. Pick one, or give its ID from an earlier step.

**Outputs**

- `publisher` (object): The publisher

**Example output**

```json
{
  "publisher": {
    "accessToRecordings": true,
    "createNumbers": false,
    "enabled": true,
    "id": "AF8df87f01adff4a35a1835394493dbcfe",
    "isSelf": false,
    "name": "Lead Partners",
    "subId": "lp"
  }
}
```

### Get target

Get one target with its phone number, time zone and caps.

**Inputs**

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

**Outputs**

- `target` (object): The target

**Example output**

```json
{
  "target": {
    "enabled": true,
    "id": "TA2f6961e921ef4b92b7304dd76db8336f",
    "instructions": {
      "callType": "number",
      "connectionTimeOut": 0,
      "number": "+16317918378"
    },
    "name": "Sales desk",
    "schedule": {
      "concurrencyCap": -1,
      "dailyCap": -1,
      "timeZoneId": "Eastern Standard Time"
    },
    "subId": "",
    "targetCallIncrement": "onConvert"
  }
}
```

### List accounts

List the Ringba accounts the connected token can reach, with their IDs and time zones.

**Inputs**: None.

**Outputs**

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

**Example output**

```json
{
  "accounts": [
    {
      "accountId": "RA432a55cf08d848b9aertac7402f3r5y6",
      "enabled": true,
      "id": "RA432a55cf08d848b9aertac7402f3r5y6",
      "name": "Acme Calls",
      "timeZoneId": "Eastern Standard Time"
    }
  ],
  "count": 1
}
```

### List blocked numbers

List the caller numbers and prefixes the account blocks, with the campaign and expiry of each.

**Inputs**: None.

**Outputs**

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

**Example output**

```json
{
  "blocked_numbers": [
    {
      "campaignId": "",
      "createdDate": "2026-11-30T21:55:50Z",
      "expiration": "2026-12-01T05:55:50Z",
      "id": "BL3c6bdb6a00644d9b86c3115375382a68",
      "phoneNumber": "+12135551223",
      "timeLimited": true
    }
  ],
  "count": 1
}
```

### List buyers

List the account's buyers (who targets' calls are sold to).

**Inputs**: None.

**Outputs**

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

**Example output**

```json
{
  "buyers": [
    {
      "email": "",
      "enabled": true,
      "id": "BU0db0aea8954049468ed3d2893d0b00e9",
      "name": "Acme Call Buyers"
    }
  ],
  "count": 1
}
```

### List campaigns

List the account's campaigns (deleted ones are left out).

**Inputs**

- Include call counts (`include_stats`, true/false): Also return each one's call counts.

**Outputs**

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

**Example output**

```json
{
  "campaigns": [
    {
      "accountId": "RA432a55cf08d848b9aertac7402f3r5y6",
      "affiliates": [
        {
          "id": "AFbd21c4a3274c4382aa98919d5149baf3",
          "name": "You"
        }
      ],
      "countryCode": "US",
      "enabled": true,
      "id": "CA74c0b7f1f3824246b73e72a9238b4bfc",
      "name": "Home insurance",
      "recordSetting": {
        "record": true
      },
      "routes": [],
      "userCampaignId": "home-ins"
    }
  ],
  "count": 1
}
```

### List numbers

List the account's tracking numbers with their campaigns and publishers.

**Inputs**: None.

**Outputs**

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

**Example output**

```json
{
  "count": 1,
  "numbers": [
    {
      "affiliate": {
        "id": "AFbd21c4a3274c4382aa98919d5149baf3",
        "name": "You"
      },
      "campaignId": "CA74c0b7f1f3824246b73e72a9238b4bfc",
      "displayNumber": "+18885852294",
      "id": "PNZFWQO0",
      "isTollFree": true,
      "phoneNumber": "+18885852294"
    }
  ]
}
```

### List publishers

List the account's publishers (the sources sending calls).

**Inputs**: None.

**Outputs**

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

**Example output**

```json
{
  "count": 1,
  "publishers": [
    {
      "accessToRecordings": true,
      "createNumbers": false,
      "enabled": true,
      "id": "AF8df87f01adff4a35a1835394493dbcfe",
      "isSelf": false,
      "name": "Lead Partners",
      "subId": "lp"
    }
  ]
}
```

### List targets

List the account's targets (where calls are routed).

**Inputs**

- Include call counts (`include_stats`, true/false): Also return each one's call counts.

**Outputs**

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

**Example output**

```json
{
  "count": 1,
  "targets": [
    {
      "enabled": true,
      "id": "TA2f6961e921ef4b92b7304dd76db8336f",
      "instructions": {
        "callType": "number",
        "connectionTimeOut": 0,
        "number": "+16317918378"
      },
      "name": "Sales desk",
      "schedule": {
        "concurrencyCap": -1,
        "dailyCap": -1,
        "timeZoneId": "Eastern Standard Time"
      },
      "subId": "",
      "targetCallIncrement": "onConvert"
    }
  ]
}
```

### Search calls

List calls from the call log in a time range, newest first, with their caller, campaign, target, length, conversion and revenue. Gets one page; to see more, run it again with the next offset it gives.

**Inputs**

- From (`start`, date and time): Calls on or after this time. Defaults to 24 hours before the end.
- Until (`end`, date and time): Calls before this time. Defaults to now.
- Campaign (`campaign_id`, text): The campaign to search; leave empty for all. Pick one, or give its ID from an earlier step.
- Connected calls only (`connected_only`, true/false): Leave out calls that never connected.
- Page size (`size`, number): How many calls to return, 1 to 1,000. Defaults to 100. From 1 to 1000.
- Skip (`offset`, number): How many calls to skip, such as the next offset from an earlier page. At least 0.

**Outputs**

- `calls` (list): The calls
- `count` (number): How many were returned
- `next_offset` (number): The Skip value for the next page, or 0 if this was the last
- `partial_result` (true/false): True if Ringba could only read part of the range

**Example output**

```json
{
  "calls": [
    {
      "callDt": 1764500427115,
      "callLengthInSeconds": 95,
      "campaignId": "CA74c0b7f1f3824246b73e72a9238b4bfc",
      "campaignName": "Home insurance",
      "conversionAmount": 25,
      "hasConnected": true,
      "hasConverted": true,
      "inboundCallId": "v2cd7lW_KVB95pJnSeRSRBMHuL_MOzcMTn5A8qL5_Hc178aRgTZhj-JA",
      "inboundPhoneNumber": "+17813364178",
      "isLive": false,
      "number": "+18885852294",
      "payoutAmount": 10,
      "profitNet": 14.96,
      "publisherId": "AFbd21c4a3274c4382aa98919d5149baf3",
      "publisherName": "You",
      "recordingUrl": "https://media.ringba.com/recording-public?v=v1&k=abc",
      "targetId": "TA2f6961e921ef4b92b7304dd76db8336f",
      "targetName": "Sales desk"
    }
  ],
  "count": 1,
  "next_offset": 0,
  "partial_result": false
}
```

### Tag call

Add a named note (an annotation tag) to a call, so it can be found and filtered by in the call log.

**Inputs**

- Call ID (`call_id`, text, required): The call's ID (inboundCallId) from 'Search calls'.
- Tag name (`tag_name`, text, required): The tag's name, such as Outcome.
- Tag value (`tag_value`, text, required): The tag's value, such as Sale.

**Outputs**

- `annotated` (true/false): True once tagged
- `call_id` (text): The call tagged
- `tag` (object): Tag

**Example output**

```json
{
  "annotated": true,
  "call_id": "v2cd7lW_KVB95pJnSeRSRBMHuL_MOzcMTn5A8qL5_Hc178aRgTZhj-JA",
  "tag": {
    "tagName": "Outcome",
    "tagType": "Annotations",
    "tagValue": "Sale"
  }
}
```

### Unblock caller number

Remove a block, so calls from that number are taken again.

**Inputs**

- Block ID (`blocked_number_id`, text, required): The block's ID (it starts with BL), from 'List blocked numbers' or 'Block caller number'.

**Outputs**

- `blocked_number_id` (text): The block removed
- `unblocked` (true/false): True once removed

**Example output**

```json
{
  "blocked_number_id": "BL3c6bdb6a00644d9b86c3115375382a68",
  "unblocked": true
}
```

### Update campaign

Rename a campaign or change its country, your own ID for it or call recording. Only the fields given change.

**Inputs**

- Campaign (`campaign_id`, text, required): The campaign. Pick one, or give its ID from an earlier step.
- Name (`name`, text): A new name. Leave empty to keep it.
- Country (`country_code`, text): The two-letter code of the country the campaign's numbers are in, such as US. A new campaign uses US unless another is given.
- Your campaign ID (`user_campaign_id`, text): An ID of your own to track the campaign by in reports.
- Record calls (`record_calls`, true/false): Record the campaign's calls.

**Outputs**

- `campaign` (object): The campaign

**Example output**

```json
{
  "campaign": {
    "accountId": "RA432a55cf08d848b9aertac7402f3r5y6",
    "affiliates": [
      {
        "id": "AFbd21c4a3274c4382aa98919d5149baf3",
        "name": "You"
      }
    ],
    "countryCode": "US",
    "enabled": true,
    "id": "CA74c0b7f1f3824246b73e72a9238b4bfc",
    "name": "Home insurance (US)",
    "recordSetting": {
      "record": true
    },
    "routes": [],
    "userCampaignId": "home-ins"
  }
}
```

### Update publisher

Rename a publisher, turn it on or off, or change its settings. Only the fields given change.

**Inputs**

- Publisher (`publisher_id`, text, required): The publisher. Pick one, or give its ID from an earlier step.
- Name (`name`, text): A new name. Leave empty to keep it.
- On (`enabled`, true/false): On lets the publisher send calls; off stops them.
- Can create numbers (`create_numbers`, true/false): Let the publisher create new numbers, rather than only use the account's existing ones.
- Sub ID (`sub_id`, text): A sub ID to track the publisher by.
- Can hear recordings (`access_to_recordings`, true/false): Let the publisher play call recordings. Left empty, the account's setting applies.
- Block calls once capped (`block_calls_if_capped`, true/false): Block the publisher's calls once its payout cap is reached. Left empty, the account's setting applies.

**Outputs**

- `publisher` (object): The publisher

**Example output**

```json
{
  "publisher": {
    "accessToRecordings": true,
    "createNumbers": false,
    "enabled": true,
    "id": "AF8df87f01adff4a35a1835394493dbcfe",
    "isSelf": false,
    "name": "Lead Partners LLC",
    "subId": "lp"
  }
}
```

### Update target

Change a target's name, phone number, time zone, ring time, sub ID or when calls count toward its caps. Only the fields given change.

**Inputs**

- Target (`target_id`, text, required): The target. Pick one, or give its ID from an earlier step.
- Name (`name`, text): A new name. Leave empty to keep it.
- Phone number (`phone_number`, text): A new number, with the country code. Leave empty to keep it.
- Time zone (`time_zone`, text): A new time zone. Leave empty to keep it. One of: `Eastern Standard Time` (US Eastern), `Central Standard Time` (US Central), `Mountain Standard Time` (US Mountain), `US Mountain Standard Time` (US Mountain, Arizona (no daylight saving)), `Pacific Standard Time` (US Pacific), `Alaskan Standard Time` (Alaska), `Hawaiian Standard Time` (Hawaii), `Atlantic Standard Time` (Atlantic (Canada)), `UTC`, `GMT Standard Time` (London), and 4 more.
- Ring time (seconds) (`connection_timeout`, number): How long to ring the target before routing the call elsewhere. 0 uses Ringba's default. From 0 to 600.
- Sub ID (`sub_id`, text): A new sub ID. Leave empty to keep it.
- Count a call toward caps (`call_increment`, text): When a call counts toward the target's caps. One of: `onConnect` (When the call connects), `onConvert` (When the call converts), `onRevenue` (When the call earns revenue).

**Outputs**

- `target` (object): The target

**Example output**

```json
{
  "target": {
    "enabled": true,
    "id": "TA2f6961e921ef4b92b7304dd76db8336f",
    "instructions": {
      "callType": "number",
      "connectionTimeOut": 0,
      "number": "+16317918378"
    },
    "name": "Sales desk (East)",
    "schedule": {
      "concurrencyCap": -1,
      "dailyCap": -1,
      "timeZoneId": "Eastern Standard Time"
    },
    "subId": "",
    "targetCallIncrement": "onConvert"
  }
}
```
