REST API
Auth
Generate keys in Settings → API Keys. Each key looks like ck_live_xxxxxxxx_… and is shown once at creation. Send it as the standard Authorization header on every request:
Authorization: Bearer ck_live_xxxxxxxx_…
Rate limit: 120 requests per minute, per key. Optionally restrict by IP allowlist in the key settings.
Base URL
https://rebaar.in/api/v1
Endpoints
Projects
| Method | Path | Description |
|---|---|---|
| GET | /projects | List projects (cursor-paged) |
| GET | /projects/{id} | Get one project + linked client |
| POST | /projects/create | Create a project (subject to plan limit) |
Invoices
| Method | Path | Description |
|---|---|---|
| GET | /invoices | List invoices, filterable by ?status= |
| GET | /invoices/{id} | Get one invoice + linked client + project |
| POST | /invoices/create | Create an invoice. Amounts in paise (₹ × 100) |
| PATCH | /invoices/{id} | Update status / amountPaid / paidAt / dueDate |
| DELETE | /invoices/{id} | Delete — only allowed when status is Draft or Cancelled (else 409) |
Vendors
| Method | Path | Description |
|---|---|---|
| GET | /vendors | List vendors |
| GET | /vendors/{id} | Get one vendor |
| POST | /vendors/create | Create a vendor |
| PATCH | /vendors/{id} | Update contact / classification fields |
| DELETE | /vendors/{id} | Delete vendor |
Clients
| Method | Path | Description |
|---|---|---|
| GET | /clients | List clients |
| GET | /clients/{id} | Get one client |
| POST | /clients/create | Create a client |
| PATCH | /clients/{id} | Update name / contact / GSTIN |
| DELETE | /clients/{id} | Delete — refuses with 409 if the client still has invoices, projects, or quotations |
Need an endpoint that isn't listed? Subscribe to the outbound webhooks for event notifications, or email [email protected].
Example
curl https://rebaar.in/api/v1/projects \ -H "Authorization: Bearer ck_live_xxxxxxxx_…"
Response (shortened):
{
"object": "list",
"data": [
{
"id": "casa-verde",
"name": "Casa Verde",
"type": "Residential",
"status": "On Track",
"value": 8750000, // value in paise (₹87,500)
"progress": 72,
"client": { "id": "marigold-estates", "name": "Marigold Estates" }
}
],
"hasMore": false
}Webhooks
Outbound webhooks fire on workspace events: invoice.created, invoice.paid, invoice.overdue, project.created, project.status_changed, lead.created, lead.won, quotation.approved, quotation.rejected.
Configure your endpoint URL in Settings → Webhooks. Every request is signed:
X-Rebaar-Event: invoice.paid X-Rebaar-Signature: <sha256 HMAC over body, hex> X-Rebaar-Delivery: <unique id; safe to use as idempotency key>
Verify with HMAC-SHA256 using your webhook's shared secret. We retry failed deliveries with exponential backoff up to 5 attempts; after that they enter the dead-letter queue.
Errors
401 Authorization header missing or invalid 402 Plan doesn't include this — currentPlan / requiredPlan in body 402 Plan limit reached — used / limit in body 402 Workspace access expired — trial / past_due / cancelled / suspended 404 Resource not found 429 Rate limited (120 req/min) — Retry-After header set 5xx Internal — retry with exponential backoff