Documentation Index
Fetch the complete documentation index at: https://docs.moduluslabs.io/llms.txt
Use this file to discover all available pages before exploring further.
API Key Authentication
All requests require an API key passed in theX-API-Key header:
sk_ (secret key). Keep your key secure — do not expose it in client-side code, public repositories, or browser requests.
Entity Scoping
Every API key is associated with an entity level in the hierarchy: Partner, Merchant, or Branch. Data access is automatically restricted based on your key’s level.| Key Level | Transactions | Merchants | Branches |
|---|---|---|---|
| Partner | All merchants and branches | All merchants | All branches |
| Merchant | Own branches only | Own merchant only | Own branches only |
| Branch | Own transactions only | Parent merchant only | Own branch only |
Entity scoping is applied automatically — you don’t need to add any special filters. A merchant-level key will never see another merchant’s data, even if you try to filter by their
merchant_id.Error Responses
401 Unauthorized
Returned when the API key is missing, invalid, or expired:403 Forbidden
Returned when the API key is valid but doesn’t have permission for the requested resource:Security Best Practices
Keep keys server-side
Keep keys server-side
Never include API keys in frontend code, mobile apps, or public repositories. Make API calls from your backend server.
Use environment variables
Use environment variables
Store API keys in environment variables, not in source code:
Rotate keys regularly
Rotate keys regularly
Contact support@moduluslabs.io to rotate your API key if you suspect it has been compromised.
Use the minimum scope
Use the minimum scope
Request a merchant-level or branch-level key if you don’t need partner-wide access. Least privilege reduces the impact of key exposure.
What’s Next?
Quick Start
Make your first API call
Filtering & Sorting
Learn all available query parameters