API Reference
The Mellite API is organized around REST. Predictable resource-oriented URLs, form-encoded request bodies, JSON-encoded responses, standard HTTP response codes, and Bearer token authentication.
Base URL
https://api.mellite.io/apiAuthentication
Authenticate your account by including your secret API key in the Authorization header. All API requests must be made over HTTPS. API keys are managed in the Developer Dashboard.
curl -X POST https://api.mellite.io/api/projects \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Sapphire Heights",
"total_units": 120,
"erp_sync_enabled": true,
"timezone": "Asia/Kolkata"
}'Security: Never expose API keys in client-side code, mobile app binaries, or public repositories. Use environment variables for server-side applications.
Endpoints
| Method | Endpoint |
|---|---|
| GET | /api/projectsPaginated |
| POST | /api/projects |
| GET | /api/projects/{id} |
| PATCH | /api/projects/{id} |
| DELETE | /api/projects/{id} |
| GET | /api/unitsPaginated |
| POST | /api/units/{id}/lock |
| GET | /api/catalog/categories |
| POST | /api/sync/bom |
| GET | /api/webhooksPaginated |
Pagination
List endpoints return paginated results. Use the following query parameters to navigate through pages.
pageintegerPage number (default: 1)per_pageintegerResults per page (default: 25, max: 100)sortstringField to sort by (e.g. created_at)orderstringasc or desc (default: desc)Status Codes
200OK - Successful request201Created - Resource created400Bad Request - Invalid payload401Unauthorized - Missing/invalid API key404Not Found - Resource does not exist422Unprocessable - Validation error429Rate Limited - Too many requests500Server Error - Something went wrongRate Limiting
API requests are rate limited per API key. Exceed the limit and you'll receive a 429 Too Many Requests response. See your Developer Dashboard for current plan limits.
Webhooks
Mellite can push real-time events to your webhook endpoints. Events are sent with a signature header for verification.
selection.completedBuyer finalizes material selectionspayment.confirmedPayment successfully processedunit.lockedSelections locked for executionsnag.reportedBuyer reports a snagbom.syncedBOM sync completedSDKs & Libraries
Official client libraries for popular languages distributed via their respective package managers.
npm i mellite-sdknpm i mellite-pynpm i go-mellitenpm i mellite-phpAPI Versioning
We follow semantic versioning for our API. Breaking changes are announced via our changelog and developer newsletter in advance.