How-to / Read a signal’s leads
Read a signal’s leads
You want the leads produced since a date, newest first, written to your CRM or your database.
Before you start
- An API key (see the quickstart).
- An active signal and its id.
- curl, or Python with the requests library.
1. Find the signal id
GET /api/v1/signals lists the account’s signals with their id, status and lead counters. Filter with status=active.
curl -G "https://api.rodz.io/api/v1/signals" \ --fail-with-body \ -H "Authorization: Bearer $RODZ_API_KEY" \ --data-urlencode "status=active"
import os import requests response = requests.get( "https://api.rodz.io/api/v1/signals", headers={"Authorization": "Bearer " + os.environ["RODZ_API_KEY"]}, params={"status": "active"}, ) response.raise_for_status() print(response.status_code, response.text) # expected status: 200
const url = new URL("https://api.rodz.io/api/v1/signals"); url.search = new URLSearchParams({ "status": "active" }).toString(); const res = await fetch(url, { method: 'GET', headers: { Authorization: `Bearer ${process.env.RODZ_API_KEY}`, }, }); if (!res.ok) throw new Error(`HTTP ${res.status}: ${await res.text()}`); console.log(res.status, await res.text()); // expected status: 200
const apiKey = process.env.RODZ_API_KEY; if (!apiKey) throw new Error("RODZ_API_KEY is not set"); const url = new URL("https://api.rodz.io/api/v1/signals"); url.search = new URLSearchParams({ "status": "active" }).toString(); const res = await fetch(url, { method: 'GET', headers: { Authorization: `Bearer ${apiKey}`, }, }); if (!res.ok) throw new Error(`HTTP ${res.status}: ${await res.text()}`); console.log(res.status, await res.text()); // expected status: 200
// Java 17 or later, no dependency import java.net.URI; import java.net.http.HttpClient; import java.net.http.HttpRequest; import java.net.http.HttpResponse; public class Main { public static void main(String[] args) throws Exception { HttpRequest request = HttpRequest.newBuilder() .uri(URI.create("https://api.rodz.io/api/v1/signals" + "?status=" + "active")) .header("Authorization", "Bearer " + System.getenv("RODZ_API_KEY")) .GET() .build(); HttpResponse<String> response = HttpClient.newHttpClient() .send(request, HttpResponse.BodyHandlers.ofString()); if (response.statusCode() >= 400) { throw new RuntimeException("HTTP " + response.statusCode() + ": " + response.body()); } System.out.println(response.statusCode() + " " + response.body()); // expected status: 200 } }
Route: GET /api/v1/signals
2. Read the leads produced since a date
GET /api/v1/signals/{signal_id}/leads returns leads newest first. The since parameter keeps the ones produced at or after that instant. The response gives total, limit, offset and hasMore: while hasMore is true, call again with offset + limit.
curl -G "https://api.rodz.io/api/v1/signals/$SIGNAL_ID/leads" \ --fail-with-body \ -H "Authorization: Bearer $RODZ_API_KEY" \ --data-urlencode "since=2026-10-07T00:00:00+00:00"
import os import requests response = requests.get( "https://api.rodz.io/api/v1/signals/" + os.environ["SIGNAL_ID"] + "/leads", headers={"Authorization": "Bearer " + os.environ["RODZ_API_KEY"]}, params={"since": "2026-10-07T00:00:00+00:00"}, ) response.raise_for_status() print(response.status_code, response.text) # expected status: 200
const url = new URL(`https://api.rodz.io/api/v1/signals/${process.env.SIGNAL_ID}/leads`); url.search = new URLSearchParams({ "since": "2026-10-07T00:00:00+00:00" }).toString(); const res = await fetch(url, { method: 'GET', headers: { Authorization: `Bearer ${process.env.RODZ_API_KEY}`, }, }); if (!res.ok) throw new Error(`HTTP ${res.status}: ${await res.text()}`); console.log(res.status, await res.text()); // expected status: 200
const apiKey = process.env.RODZ_API_KEY; if (!apiKey) throw new Error("RODZ_API_KEY is not set"); const signalId = process.env.SIGNAL_ID; if (!signalId) throw new Error("SIGNAL_ID is not set"); const url = new URL(`https://api.rodz.io/api/v1/signals/${signalId}/leads`); url.search = new URLSearchParams({ "since": "2026-10-07T00:00:00+00:00" }).toString(); const res = await fetch(url, { method: 'GET', headers: { Authorization: `Bearer ${apiKey}`, }, }); if (!res.ok) throw new Error(`HTTP ${res.status}: ${await res.text()}`); console.log(res.status, await res.text()); // expected status: 200
// Java 17 or later, no dependency import java.net.URI; import java.net.http.HttpClient; import java.net.http.HttpRequest; import java.net.http.HttpResponse; public class Main { public static void main(String[] args) throws Exception { HttpRequest request = HttpRequest.newBuilder() .uri(URI.create("https://api.rodz.io/api/v1/signals/" + System.getenv("SIGNAL_ID") + "/leads" + "?since=" + "2026-10-07T00%3A00%3A00%2B00%3A00")) .header("Authorization", "Bearer " + System.getenv("RODZ_API_KEY")) .GET() .build(); HttpResponse<String> response = HttpClient.newHttpClient() .send(request, HttpResponse.BodyHandlers.ofString()); if (response.statusCode() >= 400) { throw new RuntimeException("HTTP " + response.statusCode() + ": " + response.body()); } System.out.println(response.statusCode() + " " + response.body()); // expected status: 200 } }
Note. Leads that your filters removed are not returned: you only read what was delivered.
Next
To receive leads as they happen instead of reading them, use a webhook. Receive a webhook