1. πŸ”Œ Developer API
  2. πŸ”Œ API Reference Overview
MudraHQ AppAdmin ConsoleGitHub
  • πŸ”Œ API Reference Overview
  • 🧾 Invoices API
  • βš–οΈ Statutory Privacy API

πŸ”Œ API Reference Overview

Architecture, base URLs, authentication tokens, rate limits, and response standards for the MudraHQ REST API.

Loading documentation…

🧾 Invoices APINext >

Powered by heyo-docs

On this page

🌐 Base URL & EndpointsπŸ” Authentication⚑ Rate Limiting & Security SafeguardsπŸ“¦ Standard API Response Envelope

The MudraHQ REST API provides programmatic access to your business invoicing, products, customer ledgers, and tax compliance data.


🌐 Base URL & Endpoints

EnvironmentBase URLPurpose
Productionhttps://mudrahq.tech/apiLive production cloud cluster
Local Developmenthttp://localhost:3000/apiLocal development environment

πŸ” Authentication

All private endpoints require a JSON Web Token (JWT) transmitted via the standard Authorization HTTP header:

http
Authorization: Bearer <your_jwt_token>

Tokens are obtained by authenticating against POST /api/auth/login or POST /api/auth/google. Tokens are valid for 7 days.


⚑ Rate Limiting & Security Safeguards

To protect against credential stuffing and brute force attempts:

  • /api/auth/login is guarded by a sliding-window rate limiter allowing up to 5 failed attempts per IP per 15-minute window.
  • All endpoints enforce a strict 1MB request body limit (HTTP 413 Payload Too Large on violation).
  • Cross-Origin Resource Sharing (CORS) is strictly restricted to trusted platform domains (*.mudrahq.tech).

πŸ“¦ Standard API Response Envelope

Successful requests return standard JSON envelopes:

json
{  "success": true,  "data": { ... },  "message": "Operation completed successfully"}

Errors return clear HTTP status codes and diagnostic error messages:

json
{  "error": "Invalid credentials",  "statusCode": 401}