Per-debtor workflow status and recent SMS
curl --request POST \
--url https://collectwiseapi.com/status/debtors \
--header 'Content-Type: application/json' \
--header 'collectwise_key: <api-key>' \
--data '
{
"workflowId": "<string>",
"debtorIds": [
"<string>"
],
"hours": 24,
"limit": 20
}
'import requests
url = "https://collectwiseapi.com/status/debtors"
payload = {
"workflowId": "<string>",
"debtorIds": ["<string>"],
"hours": 24,
"limit": 20
}
headers = {
"collectwise_key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {collectwise_key: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({workflowId: '<string>', debtorIds: ['<string>'], hours: 24, limit: 20})
};
fetch('https://collectwiseapi.com/status/debtors', 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://collectwiseapi.com/status/debtors",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'workflowId' => '<string>',
'debtorIds' => [
'<string>'
],
'hours' => 24,
'limit' => 20
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"collectwise_key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://collectwiseapi.com/status/debtors"
payload := strings.NewReader("{\n \"workflowId\": \"<string>\",\n \"debtorIds\": [\n \"<string>\"\n ],\n \"hours\": 24,\n \"limit\": 20\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("collectwise_key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://collectwiseapi.com/status/debtors")
.header("collectwise_key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"workflowId\": \"<string>\",\n \"debtorIds\": [\n \"<string>\"\n ],\n \"hours\": 24,\n \"limit\": 20\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://collectwiseapi.com/status/debtors")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["collectwise_key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"workflowId\": \"<string>\",\n \"debtorIds\": [\n \"<string>\"\n ],\n \"hours\": 24,\n \"limit\": 20\n}"
response = http.request(request)
puts response.read_body{}{
"code": 400,
"message": "Invalid input: debtorName is required"
}{
"code": 400,
"message": "Invalid input: debtorName is required"
}{
"code": 400,
"message": "Invalid input: debtorName is required"
}{
"code": 400,
"message": "Invalid input: debtorName is required"
}{
"code": 400,
"message": "Invalid input: debtorName is required"
}Workflow
Debtors Status in Workflow
Returns per-debtor status (paused, next stage/time), SMS counts, and recent SMS for provided debtorIds within a workflow.
POST
/
status
/
debtors
Per-debtor workflow status and recent SMS
curl --request POST \
--url https://collectwiseapi.com/status/debtors \
--header 'Content-Type: application/json' \
--header 'collectwise_key: <api-key>' \
--data '
{
"workflowId": "<string>",
"debtorIds": [
"<string>"
],
"hours": 24,
"limit": 20
}
'import requests
url = "https://collectwiseapi.com/status/debtors"
payload = {
"workflowId": "<string>",
"debtorIds": ["<string>"],
"hours": 24,
"limit": 20
}
headers = {
"collectwise_key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {collectwise_key: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({workflowId: '<string>', debtorIds: ['<string>'], hours: 24, limit: 20})
};
fetch('https://collectwiseapi.com/status/debtors', 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://collectwiseapi.com/status/debtors",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'workflowId' => '<string>',
'debtorIds' => [
'<string>'
],
'hours' => 24,
'limit' => 20
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"collectwise_key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://collectwiseapi.com/status/debtors"
payload := strings.NewReader("{\n \"workflowId\": \"<string>\",\n \"debtorIds\": [\n \"<string>\"\n ],\n \"hours\": 24,\n \"limit\": 20\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("collectwise_key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://collectwiseapi.com/status/debtors")
.header("collectwise_key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"workflowId\": \"<string>\",\n \"debtorIds\": [\n \"<string>\"\n ],\n \"hours\": 24,\n \"limit\": 20\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://collectwiseapi.com/status/debtors")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["collectwise_key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"workflowId\": \"<string>\",\n \"debtorIds\": [\n \"<string>\"\n ],\n \"hours\": 24,\n \"limit\": 20\n}"
response = http.request(request)
puts response.read_body{}{
"code": 400,
"message": "Invalid input: debtorName is required"
}{
"code": 400,
"message": "Invalid input: debtorName is required"
}{
"code": 400,
"message": "Invalid input: debtorName is required"
}{
"code": 400,
"message": "Invalid input: debtorName is required"
}{
"code": 400,
"message": "Invalid input: debtorName is required"
}Example Response
{
"windowHours": 24,
"limit": 20,
"debtors": [
{
"debtorId": "24555f289-899c-4b3b-ba4a-b71a3664c671",
"workflowId": "111c3300-bcd5-4c0b-a8ad-535b3abbdeb0",
"paused": false,
"nextExecutionDate": "2025-09-09T15:17:00.000Z",
"nextStageId": "5eec7688-6721-4c52-8f8d-4d301d796b3b",
"nextStageName": "SMS 2",
"smsCounts": { "Delivered": 1 },
"recentSms": [
{
"id": "msg_...",
"phone_number": "+15552150663",
"debtor_id": "24555f289-899c-4b3b-ba4a-b71a3664c671",
"content": "templateId:48 message:Hello {debtorName}...",
"created_at": "2025-09-08T20:11:03.676Z",
"status": "Delivered"
}
]
}
]
}
Authorizations
Body
application/json
Response
Per-debtor statuses returned
The response is of type object.
⌘I
