BandhanNova Cloud API
REST endpoints served from Cloudflare Edge + Go cores. Consistent JSON schemas across all 10 services.
Authentication
Base URL: https://api.bandhannova.cloud/v1
Authorization: Bearer YOUR_API_KEY
Optional BYOK AI Header: X-Groq-Key: gsk_...
1. Web Search API
GET /v1/search| Param | Type | Req | Notes |
|---|---|---|---|
| q | string | Yes | Search query string |
| limit | int | No | Default 5 (max 50) |
| page | int | No | Page offset (default 1) |
curl -X GET "https://api.bandhannova.cloud/v1/search?q=golang+concurrency&limit=3" \ -H "Authorization: Bearer YOUR_API_KEY"Sample 200 JSON Response
{ "status": "success", "query": "golang concurrency", "results": [ { "title": "Go Concurrency Patterns", "url": "https://go.dev/blog/pipelines", "snippet": "..." } ]}2. Agent Scrape API
POST /v1/scrape| Field | Type | Req | Notes |
|---|---|---|---|
| url | string | Yes | Target HTTP/HTTPS URL |
| only_main_content | bool | No | Strip ads and navigation (default true) |
curl -X POST "https://api.bandhannova.cloud/v1/scrape" \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{"url":"https://go.dev","only_main_content":true}'Sample 200 JSON Response
{ "status": "success", "title": "The Go Programming Language", "markdown": "# Build simple, secure, scalable systems with Go...", "tokens_saved": "88%"}3. AI Smart Router
POST /v1/chat/completionsPass X-Groq-Key: gsk_... for ₹0 BYOK routing, or omit for Managed tier.
| Field | Type | Req | Notes |
|---|---|---|---|
| model | string | Yes | e.g. llama-3.3-70b-versatile |
| messages | array | Yes | OpenAI-compatible role/content pairs |
| temperature | float | No | Sampling temperature (0.0 – 1.0) |
curl -X POST "https://api.bandhannova.cloud/v1/chat/completions" \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "X-Groq-Key: gsk_YOUR_GROQ_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"llama-3.3-70b-versatile","messages":[{"role":"user","content":"Summarize GST rules"}]}'Sample 200 JSON Response
{ "id": "chatcmpl_91ab", "model": "llama-3.3-70b-versatile", "routing_mode": "BYOK", "choices": [ { "index": 0, "message": { "role": "assistant", "content": "GST is an indirect tax..." } } ]}4. Bharat OCR API
VELVETPOST /v1/ocr/extract
| Field | Type | Req | Notes |
|---|---|---|---|
| image_url | string | No* | Public URL of GST invoice / bill (*or file_base64) |
| file_base64 | string | No* | Base64-encoded PNG/JPEG/PDF |
| document_type | string | No | gst_invoice | receipt | eway_bill |
curl -X POST "https://api.bandhannova.cloud/v1/doc/bharat-ocr" \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{"image_url":"https://cdn.example.com/inv-102.png","document_type":"gst_invoice"}'Sample 200 JSON Response
{ "status": "success", "invoice_no": "INV-2026-102", "seller_gstin": "27AAPFU0939F1ZV", "checksum_valid": true, "total_inr": 11800}5. Bharat Utilities
GET /v1/bharat/{type}/{value}GET /v1/bharat/gstin/:gstin
Mod-36 checksum + state code
GET /v1/bharat/ifsc/:ifsc
RBI bank branch + NEFT/RTGS/IMPS
GET /v1/bharat/pan/:pan
Format check + entity category
GET /v1/bharat/upi/:vpa
VPA syntax + PSP handle lookup
curl -X GET "https://api.bandhannova.cloud/v1/bharat/gstin/27AAPFU0939F1ZV" \ -H "Authorization: Bearer YOUR_API_KEY"Sample 200 JSON Response
{ "valid": true, "gstin": "27AAPFU0939F1ZV", "state_code": "27", "state_name": "Maharashtra", "pan": "AAPFU0939F"}6. Business KYB Suite
POST /v1/kyb/company/verify| Field | Type | Req | Notes |
|---|---|---|---|
| cin | string | No* | 21-char MCA Corporate Identity Number |
| gstin | string | No* | 15-char GSTIN (*provide cin or gstin) |
curl -X POST "https://api.bandhannova.cloud/v1/kyb/company/verify" \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{"cin":"L17110MH1973PLC019786","gstin":"27AAPFU0939F1ZV"}'Sample 200 JSON Response
{ "status": "verified", "cin_valid": true, "company_type": "Listed Public Company", "incorporation_year": 1973, "gstin_state": "Maharashtra"}7. GST PDF Engine
POST /v1/pdf/invoice| Field | Type | Req | Notes |
|---|---|---|---|
| document_number | string | Yes | Unique invoice identifier |
| seller | object | Yes | { name, gstin?, address? } |
| items | array | Yes | Line items with description, quantity, unit_price, gst_rate_pct |
curl -X POST "https://api.bandhannova.cloud/v1/pdf/invoice" \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{"document_number":"INV-101","seller":{"name":"Acme Pvt Ltd"},"items":[{"description":"Credits","quantity":1,"unit_price":299,"gst_rate_pct":18}]}'Sample 200 JSON Response
{ "status": "generated", "document_number": "INV-101", "subtotal_inr": 299, "gst_total_inr": 53.82, "grand_total_inr": 352.82, "pdf_base64": "JVBERi0xLjQK..."}8. Email MX Guard
POST /v1/email/verify| Field | Type | Req | Notes |
|---|---|---|---|
| string | Yes | Recipient email address to inspect | |
| check_smtp | bool | No | Perform live MX/SMTP check (default false) |
curl -X POST "https://api.bandhannova.cloud/v1/email/verify" \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{"email":"support@gmial.com","check_smtp":false}'Sample 200 JSON Response
{ "email": "support@gmial.com", "syntax_valid": true, "disposable": false, "did_you_mean": "support@gmail.com", "mx_valid": false}9. Webhook Delivery Engine
POST /v1/webhooks/endpointsPOST /v1/webhooks/events
First register a destination URL via POST /v1/webhooks/endpoints to obtain an endpoint_id and signing secret, then dispatch signed events via POST /v1/webhooks/events.
| Field | Type | Req | Notes |
|---|---|---|---|
| url | string | Yes (register) | HTTPS callback destination URL |
| max_retries | int | No (register) | Delivery retry count (default 5) |
| endpoint_id | string | Yes (emit) | Target endpoint ID (e.g. wh_ep_123) |
| event_type | string | Yes (emit) | Event name (e.g. invoice.paid) |
| payload | object | Yes (emit) | JSON payload (max 256KB) |
| idempotency_key | string | No (emit) | Optional deduplication key |
# 1) Register Endpointcurl -X POST "https://api.bandhannova.cloud/v1/webhooks/endpoints" \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{"url":"https://api.yourapp.com/webhooks","max_retries":5,"timeout_ms":5000}'# 2) Emit Signed Eventcurl -X POST "https://api.bandhannova.cloud/v1/webhooks/events" \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{"endpoint_id":"wh_ep_123","event_type":"invoice.paid","payload":{"amount":299},"idempotency_key":"ord_901"}'Sample 200 JSON Response
{ "status": "accepted", "delivery_semantics": "at_least_once", "event": { "id": "wh_evt_abc123", "status": "pending", "attempts": 0 }}Webhook HMAC-SHA256 Verification
Every outgoing webhook includes X-BNC-Signature (HMAC-SHA256 hex digest of the raw request body using your endpoint secret). Always verify signatures with constant-time comparison.
import crypto from "node:crypto"; export function verifyWebhookSignature(rawBody, signatureHeader, endpointSecret) { const expected = crypto .createHmac("sha256", endpointSecret) .update(rawBody, "utf8") .digest("hex"); return crypto.timingSafeEqual( Buffer.from(signatureHeader || "", "utf8"), Buffer.from(expected, "utf8") );}10. IP Geolocation & Risk Signals
GET /v1/ip/lookup| Param | Type | Req | Notes |
|---|---|---|---|
| ip | string | No | Target IPv4/IPv6 (omit or use /v1/ip/me for caller IP) |
curl -X GET "https://api.bandhannova.cloud/v1/ip/lookup?ip=8.8.8.8" \ -H "Authorization: Bearer YOUR_API_KEY"Sample 200 JSON Response
{ "status": "success", "data": { "ip": "8.8.8.8", "ip_version": 4, "country_code": "US", "asn": 15169, "as_org": "GOOGLE, US", "signals": { "is_hosting_datacenter": true, "is_tor_exit_node": false } }}Standard Error Codes
| HTTP | Error | Resolution |
|---|---|---|
| 400 | Bad Request | Missing required fields or malformed JSON payload. |
| 401 | Unauthorized | Invalid, revoked, or missing Bearer API key. |
| 402 | Insufficient Credits | Account credit balance is 0. Top up in Console or pass BYOK key. |
| 429 | Rate Limited | Exceeded per-second burst limit. Retry with exponential backoff. |
| 502 | Upstream Error | Target scrape/webhook or upstream provider returned an invalid response. |