Dunning Campaigns
List Dunning Campaigns
Retrieve all dunning campaigns configured for your account.
GET
/
v1
/
dunning-campaigns
List dunning campaigns
curl --request GET \
--url https://billing.example.com/v1/dunning-campaigns \
--header 'Authorization: Bearer <token>'import requests
url = "https://billing.example.com/v1/dunning-campaigns"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://billing.example.com/v1/dunning-campaigns', 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://billing.example.com/v1/dunning-campaigns",
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: Bearer <token>"
],
]);
$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://billing.example.com/v1/dunning-campaigns"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://billing.example.com/v1/dunning-campaigns")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://billing.example.com/v1/dunning-campaigns")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body[
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"tenant_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"is_active": true,
"trigger_event": "payment_failed",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"steps": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"campaign_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"step_order": 123,
"channel": "email",
"delay_hours": 123,
"template_name": "<string>",
"subject": "<string>",
"body": "<string>",
"is_payment_wall": true,
"created_at": "2023-11-07T05:31:56Z"
}
]
}
]{
"error": {
"code": "BAD_REQUEST",
"message": "<string>"
}
}Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
limit | integer | No | Maximum number of campaigns to return. Default 20, max 100. |
offset | integer | No | Number of records to skip for pagination. Default 0. |
is_default | boolean | No | Filter by default or non-default campaigns. |
Example Request
curl -X GET "https://api.recurso.io/v1/dunning-campaigns?limit=10" \
-H "Authorization: Bearer rsk_live_9f8a7b6c5d4e3f2a1b0c" \
-H "Content-Type: application/json"
Response
{
"data": [
{
"id": "dc_8mKp3vRn2wXq",
"object": "dunning_campaign",
"name": "Standard Recovery",
"description": "Default dunning campaign with email reminders and payment wall",
"is_default": true,
"payment_wall_enabled": true,
"payment_wall_grace_days": 5,
"steps_count": 4,
"active_subscriptions": 237,
"created_at": "2026-03-15T08:00:00Z",
"updated_at": "2026-05-22T14:10:00Z"
},
{
"id": "dc_2nLq7wTs4xYr",
"object": "dunning_campaign",
"name": "Enterprise Recovery",
"description": "Gentler dunning flow for enterprise accounts with longer grace period",
"is_default": false,
"payment_wall_enabled": false,
"payment_wall_grace_days": 14,
"steps_count": 6,
"active_subscriptions": 42,
"created_at": "2026-04-01T12:00:00Z",
"updated_at": "2026-06-10T09:45:00Z"
}
],
"total": 2,
"limit": 10,
"offset": 0
}
Authorizations
Tenant API key obtained from POST /auth/register or POST /v1/developer/keys.
⌘I
List dunning campaigns
curl --request GET \
--url https://billing.example.com/v1/dunning-campaigns \
--header 'Authorization: Bearer <token>'import requests
url = "https://billing.example.com/v1/dunning-campaigns"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://billing.example.com/v1/dunning-campaigns', 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://billing.example.com/v1/dunning-campaigns",
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: Bearer <token>"
],
]);
$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://billing.example.com/v1/dunning-campaigns"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://billing.example.com/v1/dunning-campaigns")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://billing.example.com/v1/dunning-campaigns")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body[
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"tenant_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"is_active": true,
"trigger_event": "payment_failed",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"steps": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"campaign_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"step_order": 123,
"channel": "email",
"delay_hours": 123,
"template_name": "<string>",
"subject": "<string>",
"body": "<string>",
"is_payment_wall": true,
"created_at": "2023-11-07T05:31:56Z"
}
]
}
]{
"error": {
"code": "BAD_REQUEST",
"message": "<string>"
}
}