API reference

Curated reference for the most-used endpoints. The full OpenAPI schema is served at /docs on the backend host (Swagger UI in non-production environments).

Base URL

Production: https://api.indibaba.com. All endpoints below are versioned under /v1/.

Authentication

All routes outside /v1/public/* require a JWT bearer token in the Authorization header:

http
Authorization: Bearer <access_token>

Response envelope

Successful responses are wrapped in a data envelope:

json
{
  "data": { ... },
  "meta": { "request_id": "..." }
}

Errors return non-2xx with a structured body:

json
{
  "detail": {
    "error": {
      "code": "VALIDATION_FAILED",
      "message": "Slug is required."
    }
  }
}

Public endpoints

GET /v1/public/billing/subscription-plans

The 4 tier subscription plans. No auth required.

json
{
  "data": {
    "plans": [
      { "id": "starter_monthly", "tier": "starter", "period": "monthly", "price_inr": 999, "..." },
      { "id": "starter_annual",  "tier": "starter", "period": "annual",  "price_inr": 9990, "..." },
      { "id": "growth_monthly",  "tier": "growth",  "period": "monthly", "price_inr": 4999, "..." },
      { "id": "growth_annual",   "tier": "growth",  "period": "annual",  "price_inr": 49990, "..." }
    ]
  }
}

GET /v1/public/billing/recharge-packs

The 7 PAYG credit packs covering all metered services.

POST /v1/public/contact

Public contact form. Rate-limited to 5/hour/IP. Honeypot field honeypot silently drops bots that fill it.

json
// Request
{
  "name": "Alice",
  "email": "alice@example.com",
  "company": "Acme Co",
  "message": "Hi, I'd like a demo of the Growth Engine."
}

// Response
{
  "data": {
    "ok": true,
    "message": "Thanks — we'll be in touch within one business day."
  }
}

Seller — billing

GET /v1/seller/growth/billing/wallet

Returns the caller’s wallet detail + recent ledger. Auto-bootstraps the wallet on first call if the seller signed up before 6A.

POST /v1/seller/growth/billing/subscriptions/init

Start a new Starter or Growth subscription. Returns the Razorpay subscription id + auth URL the seller’s browser opens for the mandate flow.

json
// Request
{ "tier": "starter", "period": "monthly" }

// Response (excerpt)
{
  "data": {
    "subscription": { "id": 7, "status": "pending", "tier": "starter", "..." },
    "checkout": {
      "razorpay_subscription_id": "sub_AbC123",
      "short_url": "https://rzp.io/i/...",
      "mock": false
    }
  }
}

PATCH /v1/seller/growth/billing/auto-recharge

Configure threshold-triggered auto-recharge per service. Requires a saved Razorpay token from a prior subscription or PAYG purchase.

json
{
  "enabled": true,
  "threshold": {
    "campaign_sends": 500,
    "voice_call_seconds": 60
  },
  "amount": {
    "campaign_sends": 5000,
    "voice_call_seconds": 1800
  }
}

Seller — contacts + segments

POST /v1/seller/growth/contacts

Create a contact in your tenant pool. Per-tenant dedupe on (email) and (phone) — same address can live in admin’s pool AND yours independently.

json
{
  "email": "lead@example.com",
  "phone": "+919998887776",
  "full_name": "First Lead",
  "tags": ["from-api", "warm"],
  "attributes": {
    "lead_source": "trade_show_q2"
  },
  "source": "manual"
}

POST /v1/seller/growth/segments

Create a static or dynamic segment. Dynamic segments use a small DSL with 12 operators over the contact’s top-level fields + attributes.* JSONB paths.

json
{
  "slug": "vip-warm-mumbai",
  "name": "VIP warm leads (Mumbai)",
  "type": "dynamic",
  "filter_definition": {
    "all": [
      { "field": "tags", "op": "contains", "value": "warm" },
      { "field": "attributes.city", "op": "equals", "value": "Mumbai" }
    ]
  }
}

Seller — campaigns

POST /v1/seller/growth/campaigns

Compose a multi-channel campaign. Per-channel content lives in dedicated fields rather than a JSONB blob so each channel validates independently.

json
{
  "slug": "diwali-2026-buyers",
  "name": "Diwali 2026 — All buyers",
  "segment_id": 42,
  "channels": ["email", "sms"],
  "email_subject": "Special Diwali offers inside",
  "email_html": "<p>...</p>",
  "sms_body": "Diwali deals at indibaba.com/abc",
  "exclude_unsubscribed": true,
  "exclude_suppressed": true
}

POST /v1/seller/growth/campaigns/{id}/send-now

Fan out the campaign synchronously. Refuses upfront if the wallet can’t afford the audience × channels count. Skipped recipients still produce a delivery row for audit.


Seller — webhooks

POST /v1/seller/growth/webhooks

Register an outbound webhook endpoint. The HMAC secret is returned once in secret_plain — store it immediately.

json
{
  "name": "Zapier CRM sync",
  "url": "https://hooks.zapier.com/hooks/catch/123/abc",
  "subscribed_event_types": [
    "marketing.contact.created",
    "marketing.contact.subscribed",
    "orders.completed"
  ]
}

See webhook signatures for the full event catalog + signature verification samples.


Marketplace

GET /v1/suppliers

Browse the supplier directory. Supports filters by category, location, verification level, and free-text search.

POST /v1/rfqs

Post a buy requirement. Indibaba matches it to suppliers using the configured ai_search provider and notifies them per their preferences.

POST /v1/orders

Place an order against a product. Funds enter OrderShield escrow; releases on buyer confirmation or 14-day default.