Build on Sambandh
REST API, outbound webhooks, and embeddable widgets. Everything you need to integrate Sambandh CRM into your product and workflows.
REST API
Full CRUD access to contacts, deals, tasks, activities, and pipelines. JSON-based, versioned, and authenticated with API keys.
See endpointsWebhooks
Real-time event notifications via HTTP. HMAC-SHA256 signed payloads with automatic retries and delivery logs.
View eventsEmbeddable Widgets
Drop-in booking forms and contact widgets for any website. Lightweight vanilla JS, no framework dependencies.
Get embed codeAuthentication
All API requests require authentication via a Bearer token. Generate API keys from your Developer settings.
How to authenticate
- Go to Settings → API Keys in your Sambandh dashboard.
- Click Create API Key and give it a descriptive name.
- Copy the key (it starts with
sb_live_). You will only see it once. - Pass it in the
Authorizationheader of every request.
To rotate a key, create a new one in Settings → API Keys, update your integration, then delete the old key. Both keys work simultaneously during rotation.
curl -X GET https://sambandh.io/api/v1/contacts \
-H "Authorization: Bearer sb_live_your_api_key" \
-H "Content-Type: application/json"const response = await fetch("https://sambandh.io/api/v1/contacts", {
headers: {
"Authorization": "Bearer sb_live_your_api_key",
"Content-Type": "application/json",
},
});
const data = await response.json();import requests
response = requests.get(
"https://sambandh.io/api/v1/contacts",
headers={
"Authorization": "Bearer sb_live_your_api_key",
"Content-Type": "application/json",
},
)
data = response.json()API Reference
All endpoints are prefixed with /api/v1. Responses are JSON. Pagination uses ?page=1&limit=50.
| Method | Path | Description |
|---|---|---|
| GET | /api/v1/contacts | List all contacts with pagination and filtering |
| POST | /api/v1/contacts | Create a new contact |
| GET | /api/v1/contacts/:id | Get a single contact by ID |
| PATCH | /api/v1/contacts/:id | Update a contact |
| DELETE | /api/v1/contacts/:id | Delete a contact |
| GET | /api/v1/deals | List all deals |
| POST | /api/v1/deals | Create a new deal |
| PATCH | /api/v1/deals/:id | Update a deal |
| GET | /api/v1/tasks | List all tasks |
| POST | /api/v1/tasks | Create a new task |
| GET | /api/v1/activities | List activities / timeline |
| POST | /api/v1/activities | Log a new activity |
| GET | /api/v1/pipelines | List pipelines and stages |
| POST | /api/v1/notes | Create a note on a contact |
| GET | /api/v1/tags | List all tags |
Example: Create a Contact
curl -X POST https://sambandh.io/api/v1/contacts \
-H "Authorization: Bearer sb_live_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"name": "Jane Doe",
"email": "jane@example.com",
"phone": "+1-555-0100",
"tags": ["lead", "enterprise"]
}'const response = await fetch("https://sambandh.io/api/v1/contacts", {
method: "POST",
headers: {
"Authorization": "Bearer sb_live_your_api_key",
"Content-Type": "application/json",
},
body: JSON.stringify({
name: "Jane Doe",
email: "jane@example.com",
phone: "+1-555-0100",
tags: ["lead", "enterprise"],
}),
});
const contact = await response.json();import requests
response = requests.post(
"https://sambandh.io/api/v1/contacts",
headers={
"Authorization": "Bearer sb_live_your_api_key",
"Content-Type": "application/json",
},
json={
"name": "Jane Doe",
"email": "jane@example.com",
"phone": "+1-555-0100",
"tags": ["lead", "enterprise"],
},
)
contact = response.json()Rate Limits
API requests are rate-limited to ensure fair usage and platform stability.
Limits by plan
| Plan | Requests / minute | Scopes |
|---|---|---|
| Free | 10 | Read-only |
| Pro | 200 | Read + Write (full CRUD) |
| Teams | 300 | Read + Write + Admin, Webhooks |
- 1Rate limits are applied per API key based on your organization's plan.
- 2Rate limit headers included in every response:
X-RateLimit-Limit,X-RateLimit-Remaining,X-RateLimit-Reset - 3Exceeding the limit returns
HTTP 429 Too Many Requests.
X-RateLimit-Limit: 100
X-RateLimit-Remaining: 87
X-RateLimit-Reset: 1712234400Error Codes
Standard HTTP status codes with structured error responses.
| Status | Title | Description |
|---|---|---|
400 | Bad Request | Invalid request body or parameters |
401 | Unauthorized | Missing or invalid API key |
403 | Forbidden | Insufficient permissions for this resource |
404 | Not Found | Resource does not exist |
409 | Conflict | Resource already exists or version conflict |
422 | Unprocessable Entity | Validation failed |
429 | Too Many Requests | Rate limit exceeded |
500 | Internal Server Error | Unexpected server error |
Error Response Format
All errors return a JSON body with a consistent structure.
{
"error": {
"code": "validation_failed",
"message": "Email is required",
"details": [
{
"field": "email",
"message": "This field is required"
}
]
}
}API Versioning: API v1 is stable. We provide at least 6 months notice before deprecating any endpoint.
Webhook Events
Sambandh sends POST requests to your configured endpoints whenever key events occur. All payloads are signed with HMAC-SHA256 using your endpoint's signing secret.
Signature Verification
const crypto = require("crypto");
function verifySignature(payload, signature, secret) {
const expected = crypto
.createHmac("sha256", secret)
.update(payload)
.digest("hex");
return crypto.timingSafeEqual(
Buffer.from(signature),
Buffer.from(expected)
);
}
// In your webhook handler:
const isValid = verifySignature(
rawBody,
req.headers["x-webhook-signature"],
"whsec_your_signing_secret"
);Delivery & Retries
Failed deliveries are retried up to 5 times with exponential backoff (1 min, 5 min, 30 min, 2 hr, 24 hr). Check delivery status in Settings → Integrations.
Events Catalog
contact.createdA new contact is added to the CRM{
"event": "contact.created",
"timestamp": "2026-04-04T12:00:00Z",
"data": {
"id": "c_abc123",
"name": "Jane Doe",
"email": "jane@example.com",
"source": "manual",
"created_at": "2026-04-04T12:00:00Z"
}
}contact.updatedA contact record is modified{
"event": "contact.updated",
"timestamp": "2026-04-04T12:30:00Z",
"data": {
"id": "c_abc123",
"changes": { "phone": "+1-555-0100" }
}
}contact.importedContacts are imported via CSV or integration{
"event": "contact.imported",
"timestamp": "2026-04-04T13:00:00Z",
"data": {
"count": 150,
"source": "csv",
"imported_by": "user_xyz"
}
}deal.createdA new deal is added to a pipeline{
"event": "deal.created",
"timestamp": "2026-04-04T14:00:00Z",
"data": {
"id": "d_def456",
"title": "Enterprise Plan",
"value": 12000,
"stage": "Qualified",
"contact_id": "c_abc123"
}
}deal.stage_changedA deal moves to a different pipeline stage{
"event": "deal.stage_changed",
"timestamp": "2026-04-04T15:00:00Z",
"data": {
"id": "d_def456",
"previous_stage": "Qualified",
"new_stage": "Proposal",
"value": 12000
}
}deal.wonA deal is marked as won{
"event": "deal.won",
"timestamp": "2026-04-04T16:00:00Z",
"data": {
"id": "d_def456",
"title": "Enterprise Plan",
"value": 12000,
"won_at": "2026-04-04T16:00:00Z"
}
}deal.lostA deal is marked as lost{
"event": "deal.lost",
"timestamp": "2026-04-04T16:30:00Z",
"data": {
"id": "d_def789",
"title": "Starter Plan",
"reason": "Went with competitor"
}
}task.completedA task is marked complete{
"event": "task.completed",
"timestamp": "2026-04-04T17:00:00Z",
"data": {
"id": "t_ghi012",
"title": "Follow up with Jane",
"completed_by": "user_xyz"
}
}activity.createdA new activity is logged (call, email, meeting){
"event": "activity.created",
"timestamp": "2026-04-04T18:00:00Z",
"data": {
"id": "a_jkl345",
"type": "call",
"contact_id": "c_abc123",
"summary": "Discussed pricing options"
}
}booking.createdA new booking is made via the scheduling page{
"event": "booking.created",
"timestamp": "2026-04-04T19:00:00Z",
"data": {
"id": "bk_mno678",
"event_type": "30-min-call",
"guest_email": "lead@example.com",
"start_time": "2026-04-07T14:00:00Z"
}
}booking.cancelledA booking is cancelled by guest or host{
"event": "booking.cancelled",
"timestamp": "2026-04-04T19:30:00Z",
"data": {
"id": "bk_mno678",
"cancelled_by": "guest",
"reason": "Schedule conflict"
}
}campaign.completedAn email campaign finishes sending{
"event": "campaign.completed",
"timestamp": "2026-04-04T20:00:00Z",
"data": {
"id": "camp_pqr901",
"name": "April Newsletter",
"sent": 1240,
"failed": 3
}
}Request Headers
Content-Type: application/jsonX-Webhook-Signature— HMAC-SHA256 hex digestX-Webhook-Event— Event name (e.g.deal.won)X-Webhook-Timestamp— ISO 8601 timestampUser-Agent: Sambandh-CRM-Webhook/1.0
Embeddable Widgets
Add Sambandh-powered booking forms and contact forms to any website with a single script tag. No build step, no framework dependencies.
Widgets load from cdn.sambandh.io and work on any domain — no CORS configuration needed.
Booking Widget
Embed a scheduling button that opens a modal with your Sambandh booking page. Under 5KB, no dependencies.
<script
src="https://sambandh.io/widget/book.js"
data-username="anurag"
data-event="30-min-call"
></script><script src="https://sambandh.io/widget/book.js"></script>
<script>
SambandhBooking.open({
username: "anurag",
eventType: "30-min-call",
});
</script>window.addEventListener("sambandh:booking", (e) => {
console.log("Booking confirmed:", e.detail);
// { eventType, hostName, guestName, guestEmail, startTime, duration }
});Contact Form Widget
Embed a styled contact form that submits directly to your Sambandh CRM. Supports light and dark themes.
<script
src="https://sambandh.io/widget/form.js"
data-key="sb_live_your_api_key"
data-theme="light"
></script><script src="https://sambandh.io/widget/form.js"></script>
<div id="contact-form"></div>
<script>
SambandhForm.render("#contact-form", {
apiKey: "sb_live_your_api_key",
theme: "dark",
title: "Contact Sales",
subtitle: "We will get back to you within 24 hours.",
});
</script>Ready to integrate?
Get your API key and start building in minutes.