Developer Portal
Build integrations against the Hair Industry Network public API. Every future product — HairCRM, mobile apps, partners — talks to the platform through /api/public/v1.
Get an API key
Create, rotate, and revoke keys with fine-grained scopes.
Register webhooks
Receive HMAC-signed events for businesses, products, jobs, and more.
API reference
Interactive OpenAPI 3.1 explorer powered by Swagger UI.
Quick start
- Create an API key at Account → API Keys.
- Copy the key immediately — the full secret is shown only once.
- Send requests to
https://hairindustrynetwork.in/api/public/v1.
cURL
curl -H "Authorization: Bearer $HIN_API_KEY" \
https://hairindustrynetwork.in/api/public/v1/businesses?limit=10TypeScript / fetch
const res = await fetch(
"https://hairindustrynetwork.in/api/public/v1/hair-products?limit=20",
{ headers: { "X-API-Key": process.env.HIN_API_KEY! } }
);
const { data, pagination } = await res.json();Authentication
Every request must include your API key in one of these headers:
Authorization: Bearer <key>X-API-Key: <key>
Scopes: read, write, admin. A write key can read; admin can do everything.
Rate limits
Each key has a per-minute request budget (default 120/min). Exceeded requests return HTTP 429 with a Retry-After: 60 header.
Error codes
| Status | Code | Meaning |
|---|---|---|
| 400 | invalid_input | Request body or query is malformed. |
| 401 | missing_api_key | No API key supplied. |
| 401 | invalid_api_key | Key not recognized. |
| 403 | insufficient_scope | Key lacks the required scope. |
| 403 | api_key_disabled | Key is disabled or revoked. |
| 404 | not_found | Resource does not exist. |
| 429 | rate_limited | Per-minute quota exceeded. |
| 500 | internal_error | Something went wrong on our side. |
Webhooks
Register endpoints in Account → Webhooks. Each delivery is signed with your endpoint secret using HMAC-SHA256. Verify:
import { createHmac, timingSafeEqual } from "crypto";
app.post("/hin-webhook", (req, res) => {
const sig = (req.headers["x-hin-signature"] as string).replace("sha256=", "");
const expected = createHmac("sha256", process.env.HIN_WEBHOOK_SECRET!)
.update(req.rawBody).digest("hex");
if (!timingSafeEqual(Buffer.from(sig), Buffer.from(expected)))
return res.status(401).send("bad signature");
console.log("event", req.body.event, req.body.data);
res.send("ok");
});OpenAPI
The machine-readable OpenAPI 3.1 spec is served at /api/public/v1/openapi.json.
SDK foundation
Official SDKs will wrap this API. The endpoint contract, scopes and error codes are stable — SDK targets:
- TypeScript / Node
- Flutter
- Kotlin (Android)
- Swift (iOS)