Get Followups by Debt
curl --request GET \
--url https://getbill.io/external-api/v1/followups/debt/{debtId} \
--header 'Authorization: <authorization>'import requests
url = "https://getbill.io/external-api/v1/followups/debt/{debtId}"
headers = {"Authorization": "<authorization>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<authorization>'}};
fetch('https://getbill.io/external-api/v1/followups/debt/{debtId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://getbill.io/external-api/v1/followups/debt/{debtId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://getbill.io/external-api/v1/followups/debt/{debtId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<authorization>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://getbill.io/external-api/v1/followups/debt/{debtId}")
.header("Authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://getbill.io/external-api/v1/followups/debt/{debtId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<authorization>'
response = http.request(request)
puts response.read_body{
"error": false,
"data": [
{
"id": "abc123def456",
"debt_id": "xyz789ghi012",
"status": "deal_found",
"type": "call",
"call_date": "2024-01-22T10:30:00+00:00",
"scheduled_at": "2024-01-22T10:00:00+00:00",
"summary": "Initial contact attempt - successful",
"notes": "Customer answered, discussed payment options",
"call_id": "call_789456",
"audio_url": "https://s3.amazonaws.com/bucket/recordings/call_789456.mp3?X-Amz-Signature=...",
"pdf_url": null,
"duration_ms": 180000,
"disconnection_reason": "completed_successfully",
"direction": "outbound",
"phone_number_used": "+33800123456",
"is_retry": false,
"processed_at": "2024-01-22T10:35:00+00:00",
"triggered_payment": true,
"email_opened": false,
"email_open_count": 0,
"email_first_opened_at": null,
"email_clicked": false,
"email_click_count": 0,
"media_urls_expire_at": "2024-01-22T11:35:00+00:00"
},
{
"id": "def456ghi789",
"debt_id": "xyz789ghi012",
"status": "delivered",
"type": "email",
"call_date": "2024-01-20T14:15:00+00:00",
"scheduled_at": "2024-01-20T14:00:00+00:00",
"summary": "Payment reminder sent",
"notes": "Automated reminder email with payment instructions",
"call_id": null,
"audio_url": null,
"pdf_url": null,
"duration_ms": null,
"disconnection_reason": null,
"direction": null,
"phone_number_used": null,
"is_retry": false,
"processed_at": "2024-01-20T14:15:00+00:00",
"triggered_payment": false,
"email_opened": true,
"email_open_count": 3,
"email_first_opened_at": "2024-01-20T15:30:00+00:00",
"email_clicked": true,
"email_click_count": 1
}
],
"pagination": {
"total": 5,
"page": 1,
"limit": 50,
"pages": 1
}
}
Followups API
Get Followups by Debt
Retrieve all followups for a specific debt
GET
/
external-api
/
v1
/
followups
/
debt
/
{debtId}
Get Followups by Debt
curl --request GET \
--url https://getbill.io/external-api/v1/followups/debt/{debtId} \
--header 'Authorization: <authorization>'import requests
url = "https://getbill.io/external-api/v1/followups/debt/{debtId}"
headers = {"Authorization": "<authorization>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<authorization>'}};
fetch('https://getbill.io/external-api/v1/followups/debt/{debtId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://getbill.io/external-api/v1/followups/debt/{debtId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://getbill.io/external-api/v1/followups/debt/{debtId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<authorization>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://getbill.io/external-api/v1/followups/debt/{debtId}")
.header("Authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://getbill.io/external-api/v1/followups/debt/{debtId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<authorization>'
response = http.request(request)
puts response.read_body{
"error": false,
"data": [
{
"id": "abc123def456",
"debt_id": "xyz789ghi012",
"status": "deal_found",
"type": "call",
"call_date": "2024-01-22T10:30:00+00:00",
"scheduled_at": "2024-01-22T10:00:00+00:00",
"summary": "Initial contact attempt - successful",
"notes": "Customer answered, discussed payment options",
"call_id": "call_789456",
"audio_url": "https://s3.amazonaws.com/bucket/recordings/call_789456.mp3?X-Amz-Signature=...",
"pdf_url": null,
"duration_ms": 180000,
"disconnection_reason": "completed_successfully",
"direction": "outbound",
"phone_number_used": "+33800123456",
"is_retry": false,
"processed_at": "2024-01-22T10:35:00+00:00",
"triggered_payment": true,
"email_opened": false,
"email_open_count": 0,
"email_first_opened_at": null,
"email_clicked": false,
"email_click_count": 0,
"media_urls_expire_at": "2024-01-22T11:35:00+00:00"
},
{
"id": "def456ghi789",
"debt_id": "xyz789ghi012",
"status": "delivered",
"type": "email",
"call_date": "2024-01-20T14:15:00+00:00",
"scheduled_at": "2024-01-20T14:00:00+00:00",
"summary": "Payment reminder sent",
"notes": "Automated reminder email with payment instructions",
"call_id": null,
"audio_url": null,
"pdf_url": null,
"duration_ms": null,
"disconnection_reason": null,
"direction": null,
"phone_number_used": null,
"is_retry": false,
"processed_at": "2024-01-20T14:15:00+00:00",
"triggered_payment": false,
"email_opened": true,
"email_open_count": 3,
"email_first_opened_at": "2024-01-20T15:30:00+00:00",
"email_clicked": true,
"email_click_count": 1
}
],
"pagination": {
"total": 5,
"page": 1,
"limit": 50,
"pages": 1
}
}
Overview
This endpoint returns a paginated list of all followup activities associated with a specific debt. This is useful for getting the complete communication history for a particular debtor.Authentication
Requires a valid OAuth 2.0 access token with thefollowups:read scope.
Request
string
required
Bearer token for authentication
string
required
The encrypted ID of the debt to get followups for
Query Parameters
integer
default:"1"
Page number for pagination
integer
default:"20"
Number of items per page (maximum 100)
Example Request
curl -X GET "/external-api/v1/followups/debt/xyz789ghi012?limit=50" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"
const debtId = 'xyz789ghi012';
const response = await fetch(`/external-api/v1/followups/debt/${debtId}?limit=50`, {
headers: {
'Authorization': 'Bearer YOUR_ACCESS_TOKEN'
}
});
const followups = await response.json();
Response
boolean
Always
false for successful requestsarray
Array of followup objects for the specified debt
Show followup object
Show followup object
string
Encrypted followup identifier
string
Encrypted debt identifier (matches the requested debtId)
string
Followup status:
on_hold, scheduled, in_progress, sent, delivered, deal_found, no_answer, deal_not_found, bad_behavior, failed, cancelledstring
Type of followup:
call, email, sms, whatsapp, voicemail, manual_call, physical, postmailstring
When the followup was executed (ISO 8601 format)
string
When the followup was scheduled (ISO 8601 format)
string
Brief summary of the followup
string
Detailed notes about the followup
string
External call ID from the provider
string
Pre-signed URL to the call recording (expires after 1 hour)
string
Pre-signed URL to any associated PDF document (expires after 1 hour)
integer
Duration in milliseconds (for calls)
string
Reason for call disconnection
string
Call direction:
inbound or outboundstring
Phone number used for the followup
boolean
Whether this is a retry attempt
string
Processing timestamp (ISO 8601 format)
boolean
Whether this followup directly triggered a successful payment
boolean
Whether the email was opened (for email followups)
integer
Number of times the email was opened
string
Timestamp of first email open (ISO 8601 format)
boolean
Whether a link in the email was clicked
integer
Number of times links in the email were clicked
string
When the pre-signed media URLs expire (ISO 8601 format). Only present if
audio_url or pdf_url are provided.object
Success Response
{
"error": false,
"data": [
{
"id": "abc123def456",
"debt_id": "xyz789ghi012",
"status": "deal_found",
"type": "call",
"call_date": "2024-01-22T10:30:00+00:00",
"scheduled_at": "2024-01-22T10:00:00+00:00",
"summary": "Initial contact attempt - successful",
"notes": "Customer answered, discussed payment options",
"call_id": "call_789456",
"audio_url": "https://s3.amazonaws.com/bucket/recordings/call_789456.mp3?X-Amz-Signature=...",
"pdf_url": null,
"duration_ms": 180000,
"disconnection_reason": "completed_successfully",
"direction": "outbound",
"phone_number_used": "+33800123456",
"is_retry": false,
"processed_at": "2024-01-22T10:35:00+00:00",
"triggered_payment": true,
"email_opened": false,
"email_open_count": 0,
"email_first_opened_at": null,
"email_clicked": false,
"email_click_count": 0,
"media_urls_expire_at": "2024-01-22T11:35:00+00:00"
},
{
"id": "def456ghi789",
"debt_id": "xyz789ghi012",
"status": "delivered",
"type": "email",
"call_date": "2024-01-20T14:15:00+00:00",
"scheduled_at": "2024-01-20T14:00:00+00:00",
"summary": "Payment reminder sent",
"notes": "Automated reminder email with payment instructions",
"call_id": null,
"audio_url": null,
"pdf_url": null,
"duration_ms": null,
"disconnection_reason": null,
"direction": null,
"phone_number_used": null,
"is_retry": false,
"processed_at": "2024-01-20T14:15:00+00:00",
"triggered_payment": false,
"email_opened": true,
"email_open_count": 3,
"email_first_opened_at": "2024-01-20T15:30:00+00:00",
"email_clicked": true,
"email_click_count": 1
}
],
"pagination": {
"total": 5,
"page": 1,
"limit": 50,
"pages": 1
}
}
Use Cases
This endpoint is particularly useful for:- Complete Communication History: Get all interactions with a specific debtor
- Timeline Analysis: Understand the progression of collection efforts
- Performance Tracking: Analyze success rates for different followup types
- Compliance: Maintain complete records of collection activities
Error Responses
{
"error": true,
"message": "Access denied to this debt",
"code": 403
}
{
"error": true,
"message": "Debt not found or invalid ID",
"code": 404
}
Related Endpoints
- List Followups - Get all followups
- Get Followup - Get specific followup details
- Get Debt - Get the associated debt information