Getting Started
Welcome to MYB.ai! This documentation will help you integrate our AI-powered billing and accounting platform into your application.
Base URL
All API requests should be made to:
https://api.manageyourbusiness.ai/api
Note: For development, use
http://localhost:5137/api
API Version
Current API version: v1
All endpoints are versioned and backward compatible.
Authentication
MYB.ai uses token-based authentication. Include your API token in the Authorization header:
Authorization: Bearer YOUR_API_TOKEN
Getting Your API Token
- Log in to your MYB.ai account
- Navigate to Settings > API Keys
- Generate a new API token
- Copy and store it securely (it won't be shown again)
Security: Never expose your API token in client-side code or public repositories.
API Endpoints
MYB.ai provides RESTful endpoints for all operations:
Resource Endpoints
GET /customers- List all customersPOST /customers- Create a new customerGET /Bills- List all billsPOST /Bills- Create a new billGET /payments- List all paymentsPOST /payments- Record a paymentGET /Reports- Generate reports
Customers API
List Customers
GET /api/customers?page=1&pageSize=20&action=tblData
Create Customer
POST /api/customers
Content-Type: application/json
{
"name": "ABC Traders",
"email": "contact@abctraders.com",
"phone": "+91 9876543210",
"address": "123 Main Street, Mumbai"
}
Bills API
List Bills
GET /api/Bills?page=1&pageSize=20
Create Bill
POST /api/Bills
Content-Type: application/json
{
"customerId": "CUST-001",
"items": [
{
"description": "Product A",
"quantity": 10,
"rate": 100,
"amount": 1000
}
],
"totalAmount": 1000
}
Payments API
Record Payment
POST /api/payments
Content-Type: application/json
{
"customerId": "CUST-001",
"billId": "BILL-001",
"amount": 1000,
"mode": "UPI",
"date": "2025-01-19"
}
Reports API
Generate Report
POST /api/Reports/generate
Content-Type: application/json
{
"type": "customer-statement",
"fromDate": "2025-01-01",
"toDate": "2025-01-31",
"format": "pdf"
}
Webhooks
MYB.ai supports webhooks for real-time event notifications. Configure webhooks in your account settings.
Supported Events
bill.created- When a bill is createdpayment.received- When a payment is recordedcustomer.created- When a customer is added
Error Handling
API errors follow a consistent format:
{
"status": false,
"message": "Error description",
"errors": ["Detailed error messages"]
}
HTTP Status Codes
200- Success400- Bad Request401- Unauthorized403- Forbidden404- Not Found500- Server Error