Complete reference with interactive examples
Authentication and base URL information
https://api.salesos.comInclude your API key in the request header:
X-API-Key: your-api-keyRate limits vary by plan. Check response headers for your current usage:
X-RateLimit-Remaining - Requests remainingX-RateLimit-Reset - Reset timestamp/api/leadsRetrieve all leads with optional filtering
| Name | Type | Description |
|---|---|---|
| industry | string | Filter by industry |
| limit | number | Number of results (default: 50) |
| offset | number | Pagination offset |
{
"data": [
{
"id": "uuid",
"contact_name": "John Doe",
"company_name": "Acme Inc",
"contact_email": "john@acme.com",
"industry": "Technology",
"icp_score": 85
}
],
"count": 1
}// GET Request
const response = await fetch('https://api.salesos.com/api/leads', {
method: 'GET',
headers: {
'X-API-Key': 'your-api-key',
'Content-Type': 'application/json',
},
});
const data = await response.json();
console.log(data);/api/leadsCreate a new lead
{
"contact_name": "John Doe",
"company_name": "Acme Inc",
"contact_email": "john@acme.com",
"industry": "Technology"
}{
"id": "uuid",
"contact_name": "John Doe",
"company_name": "Acme Inc",
"created_at": "2025-01-11T10:30:00Z"
}// POST Request
const response = await fetch('https://api.salesos.com/api/leads', {
method: 'POST',
headers: {
'X-API-Key': 'your-api-key',
'Content-Type': 'application/json',
},
body: JSON.stringify({
"contact_name": "John Doe",
"company_name": "Acme Inc",
"contact_email": "john@acme.com",
"industry": "Technology"
}),
});
const data = await response.json();
console.log(data);/api/dealsRetrieve deals with filtering options
| Name | Type | Description |
|---|---|---|
| stage | string | Filter by deal stage |
| minValue | number | Minimum deal value |
{
"data": [
{
"id": "uuid",
"title": "Enterprise Deal",
"value": 50000,
"stage": "negotiation",
"probability": 75
}
]
}// GET Request
const response = await fetch('https://api.salesos.com/api/deals', {
method: 'GET',
headers: {
'X-API-Key': 'your-api-key',
'Content-Type': 'application/json',
},
});
const data = await response.json();
console.log(data);Securely verify webhook deliveries from SalesOS
Every webhook delivery includes a signature in the X-Webhook-Signature header. Use your webhook secret to verify the signature using HMAC-SHA256.
const crypto = require('crypto');
function verifyWebhookSignature(payload, signature, secret) {
const hmac = crypto.createHmac('sha256', secret);
const calculatedSignature = hmac.update(JSON.stringify(payload)).digest('hex');
return crypto.timingSafeEqual(
Buffer.from(signature),
Buffer.from(calculatedSignature)
);
}
// Express.js example
app.post('/webhooks', (req, res) => {
const signature = req.headers['x-webhook-signature'];
const secret = process.env.WEBHOOK_SECRET;
if (!verifyWebhookSignature(req.body, signature, secret)) {
return res.status(401).send('Invalid signature');
}
// Process webhook
console.log('Webhook verified:', req.body);
res.status(200).send('OK');
});Visit our Help Center for guides and troubleshooting
Check our API Status Page for real-time system status
Contact support at support@bdotindustries.com
Explore more SalesOS resources