Strelve API
V1 · REST · JSON
API overview
Connect Strelveto your tools.
The Strelve API lets you connect enquiry details with the tools your team already uses. Use it to retrieve lead details, update an enquiry's status, or notify another system when a new enquiry comes in. API access is available on the Professional plan.
Access
API authentication
All API requests require an API key sent via the Authorization header. Generate keys from Dashboard → Settings → API.
Authorization: Bearer sk_live_YourApiKeyHereAPI use
Rate limits
The API allows 1,000 requests per hour per API key. Rate limit headers are included on every response:
X-RateLimit-Limit: 1000
X-RateLimit-Remaining: 998
X-RateLimit-Reset: 1719849600000Troubleshooting
Error responses
API errors are JSON. The string error field remains available for existing integrations; code is stable for branching, and resolution suggests what to do next.
{
"error": "Invalid API key.",
"code": "invalid_api_key",
"message": "Invalid API key.",
"resolution": "Check the key value or create a replacement in Dashboard → Settings → API."
}REST API
API endpoints
/api/v1/leadsList leads with optional filters. Returns a paginated response.
Query parameters
status- Filter by status (new,contacted,proposal,won,lost)from- ISO date, leads created on or afterto- ISO date, leads created on or beforelimit- Results per page (1–100, default 50)offset- Skip N results (default 0)
const res = await fetch("https://www.strelve.com.au/api/v1/leads?status=new&limit=10", {
headers: {
"Authorization": "Bearer sk_live_YourApiKeyHere",
// Try it now with the live demo key:
// "Authorization": "Bearer sk_demo_roofing001",
},
});
const { data, total, limit, offset } = await res.json();
console.log(`Found ${total} leads`);{
"data": [
{
"id": "abc-123",
"firstName": "James",
"lastName": "Wilson",
"email": "james@example.com",
"phone": "021 123 4567",
"status": "new",
"categoryName": "Solar Installation",
"priceMin": 15000,
"unsubscribed": false,
"unsubscribedAt": null,
"unsubscribeReason": null,
"unsubscribeReasonLabel": null,
"unsubscribeStage": null,
"createdAt": "2026-03-28T09:15:00.000Z"
}
],
"total": 1,
"limit": 10,
"offset": 0
}/api/v1/leads/:idRetrieve a single lead by its ID.
const res = await fetch("https://www.strelve.com.au/api/v1/leads/abc-123", {
headers: {
"Authorization": "Bearer sk_live_YourApiKeyHere",
},
});
const { data } = await res.json();/api/v1/leads/:idUpdate a lead’s status. Only the status field can be changed via the API.
const res = await fetch("https://www.strelve.com.au/api/v1/leads/abc-123", {
method: "PATCH",
headers: {
"Authorization": "Bearer sk_live_YourApiKeyHere",
"Content-Type": "application/json",
},
body: JSON.stringify({ status: "contacted" }),
});
const { data } = await res.json();Event notifications
Outbound webhooks
Register webhook endpoints from Dashboard → Settings → API to receive real-time notifications when leads are created or their status changes.
Available events
lead.created- A new lead has been submittedlead.status_changed- A lead’s status was updated
Each webhook delivery includes an X-Strelve-Signature header containing an HMAC-SHA256 signature of the request body, signed with your endpoint’s signing secret.
import crypto from "crypto";
function verifyWebhook(body, signature, secret) {
const expected = crypto
.createHmac("sha256", secret)
.update(body)
.digest("hex");
return signature === `sha256=${expected}`;
}
// In your handler:
const rawBody = await request.text();
const sig = request.headers.get("X-Strelve-Signature");
if (!verifyWebhook(rawBody, sig, YOUR_SIGNING_SECRET)) {
return new Response("Invalid signature", { status: 401 });
}
const event = JSON.parse(rawBody);
console.log(event.event); // "lead.created"
console.log(event.data); // { leadId: "...", ... }
console.log(event.timestamp); // "2026-03-28T09:15:00.000Z"Reference
OpenAPI specification
The full OpenAPI 3.0 specification is available at /openapi.json. The same document is available at /api/v1/openapi.json. Import either URL into Postman, Insomnia, or another OpenAPI-compatible tool.
Need help with the API?