Loading…
Loading…
REST endpoints, runtime-protection SDKs, and CI/CD integrations for shipping faster without trading away security. Built for Indian SaaS startups, SMBs, and platform teams.
One curl call kicks off a full automated VAPT against a target you control.
curl -X POST https://www.bachao.ai/api/scans/book \
-H "Cookie: bachao-session=YOUR_SESSION" \
-H "Content-Type: application/json" \
-d '{"scanUrl":"https://staging.example.com","scanType":"pentest"}'
# Response:
# { "success": true, "scanId": "clx...", "status": "queued" }Your session cookie comes from the dashboard login. For unattended pipelines, generate a setup token (see API Authentication) and use it instead. The scan ID returned here is what you poll onGET /api/scansor receive via webhook when complete.
Add runtime protection to your Node.js app in under 2 minutes.
npm install @bachao/rasp-nodeimport express from "express";
import { bachaoRasp } from "@bachao/rasp-node";
const app = express();
app.use(bachaoRasp({
apiKey: process.env.BACHAO_RASP_KEY!,
appName: "my-api",
mode: "monitor", // start in monitor mode, switch to "block" from dashboard
}));
app.listen(3000);import Fastify from "fastify";
import { bachaoRaspFastify } from "@bachao/rasp-node/fastify";
const app = Fastify();
app.register(bachaoRaspFastify, {
apiKey: process.env.BACHAO_RASP_KEY!,
appName: "my-api",
});import { Module } from "@nestjs/common";
import { BachaoRaspModule } from "@bachao/rasp-node/nestjs";
@Module({
imports: [BachaoRaspModule.forRoot({
apiKey: process.env.BACHAO_RASP_KEY!,
appName: "my-api",
})],
})
export class AppModule {}How authentication works between the dashboard, SDK, and API.
POST /api/rasp/setup/generate-keyx-rasp-key header)x-rasp-key header# Generate setup token from dashboard
curl -X POST https://www.bachao.ai/api/rasp/setup/generate-key \
-H "Cookie: bachao-session=YOUR_SESSION" \
-H "Content-Type: application/json"
# Response:
# { "success": true, "setupToken": "eyJ..." }All public API endpoints available for integration.
| Method | Endpoint | Auth | Description |
|---|---|---|---|
| POST | /api/rasp/register | Setup token | Register new RASP agent |
| POST | /api/rasp/heartbeat | API key | Agent health check + rule sync |
| POST | /api/rasp/events | API key | Report security events (batch) |
| GET | /api/rasp/rules | API key | Fetch protection rules |
| POST | /api/rasp/rules | Session | Create protection rule |
| GET | /api/rasp/agents | Session | List registered agents |
| GET | /api/rasp/stats | Session | Dashboard statistics |
| POST | /api/scans/book | Session | Book a VAPT scan |
| GET | /api/scans | Session | List your scans |
| GET | /api/reports/{id} | Session | Fetch scan report |
Receive real-time notifications when events occur in your account.
{
"event": "scan.completed",
"scanId": "clx...",
"scanUrl": "https://example.com",
"scanType": "pentest",
"riskScore": 72,
"findingsCount": 23,
"criticalCount": 2,
"timestamp": "2026-03-23T10:00:00Z"
}Trigger security scans automatically from your deployment pipeline.
# .github/workflows/security-scan.yml
name: Bachao.AI Security Scan
on: [push]
jobs:
scan:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Trigger VAPT Scan
run: |
curl -X POST https://www.bachao.ai/api/scans/book \
-H "Cookie: bachao-session=${{secrets.BACHAO_SESSION}}" \
-H "Content-Type: application/json" \
-d '{"scanUrl":"https://staging.example.com","scanType":"pentest"}'Official client libraries and platform support.
Node.js RASP SDK
npmServer-side RASP agents
Coming SoonAvailable for all products
AvailableWhat our APIs return, how we throttle, and what to do when something breaks.
When throttled you'll get a 429 with aRetry-After header in seconds.
{
"success": false,
"error": "validation_failed",
"message": "scanUrl must be a valid URL",
"field": "scanUrl"
}| Status | Meaning | Action |
|---|---|---|
| 200 | OK | Success — response body is your data. |
| 201 | Created | Resource created (scan, agent, rule). |
| 400 | Bad request | Inspect error.field — fix payload, retry. |
| 401 | Unauthorized | Missing or expired session / API key. |
| 403 | Forbidden | Auth OK but role lacks permission. |
| 404 | Not found | Resource doesn't exist or isn't yours. |
| 409 | Conflict | Duplicate (e.g., agent already registered). |
| 429 | Rate limited | Honour Retry-After, back off, then retry. |
| 5xx | Server error | Retry with exponential backoff. Page us if persistent. |
Talk to our engineering team. We'll help you get set up in under 30 minutes.
Talk to Engineering