MindaBy Linda Agency
Minda API
Read your menu, change prices and availability, and receive orders in your own systems.
Authentication
Create a key in API & Webhooks and send it with every request (or as X-Api-Key). Keys carry permissions and can be limited to IP addresses.
Authorization: Bearer mnd_live_…Answers are JSON: { "data": … } on success, and errors look like this:
{ "error": { "code": "LIMIT_REACHED", "message": "…", "details": {} } }Endpoints
Verifying webhooks
Each webhook is a POST with X-Minda-Event, X-Minda-Delivery, X-Minda-Timestamp and X-Minda-Signature = sha256 HMAC of "timestamp.body" with your webhook secret. Reject old timestamps. Failed deliveries are retried after 1 min, 5 min, 30 min, 2 h and 6 h.
// Node.js
import { createHmac, timingSafeEqual } from "node:crypto";
const timestamp = req.headers["x-minda-timestamp"];
const expected = "sha256=" + createHmac("sha256", process.env.MINDA_WEBHOOK_SECRET)
.update(timestamp + "." + rawBody).digest("hex");
const ok = timingSafeEqual(Buffer.from(expected), Buffer.from(req.headers["x-minda-signature"]))
&& Math.abs(Date.now() / 1000 - Number(timestamp)) < 300;
// PHP
$expected = 'sha256='.hash_hmac('sha256', $timestamp.'.'.$rawBody, $secret);
$ok = hash_equals($expected, $signature) && abs(time() - (int) $timestamp) < 300;