Reference

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_...

2. Agent Scrape API

POST /v1/scrape
FieldTypeReqNotes
urlstringYesTarget HTTP/HTTPS URL
only_main_contentboolNoStrip 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/completions

Pass X-Groq-Key: gsk_... for ₹0 BYOK routing, or omit for Managed tier.

FieldTypeReqNotes
modelstringYese.g. llama-3.3-70b-versatile
messagesarrayYesOpenAI-compatible role/content pairs
temperaturefloatNoSampling 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
FieldTypeReqNotes
image_urlstringNo*Public URL of GST invoice / bill (*or file_base64)
file_base64stringNo*Base64-encoded PNG/JPEG/PDF
document_typestringNogst_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
FieldTypeReqNotes
cinstringNo*21-char MCA Corporate Identity Number
gstinstringNo*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
FieldTypeReqNotes
document_numberstringYesUnique invoice identifier
sellerobjectYes{ name, gstin?, address? }
itemsarrayYesLine 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
FieldTypeReqNotes
emailstringYesRecipient email address to inspect
check_smtpboolNoPerform 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.

FieldTypeReqNotes
urlstringYes (register)HTTPS callback destination URL
max_retriesintNo (register)Delivery retry count (default 5)
endpoint_idstringYes (emit)Target endpoint ID (e.g. wh_ep_123)
event_typestringYes (emit)Event name (e.g. invoice.paid)
payloadobjectYes (emit)JSON payload (max 256KB)
idempotency_keystringNo (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
ParamTypeReqNotes
ipstringNoTarget 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

HTTPErrorResolution
400Bad RequestMissing required fields or malformed JSON payload.
401UnauthorizedInvalid, revoked, or missing Bearer API key.
402Insufficient CreditsAccount credit balance is 0. Top up in Console or pass BYOK key.
429Rate LimitedExceeded per-second burst limit. Retry with exponential backoff.
502Upstream ErrorTarget scrape/webhook or upstream provider returned an invalid response.