MokEats API allows programmatic access to menu data, orders, and restaurant settings. The API is available on the Full Stack plan ($129/branch/mo). All endpoints use tRPC for type-safe, RPC-style communication with automatic serialization and type inference.
The MokEats API uses session-based authentication via NextAuth. For public endpoints (menu access, order placement), no authentication is required. For tenant-specific operations (dashboard, management), you must be logged in with a valid session cookie.
All API requests are made to your MokEats instance. The tRPC endpoint is:
https://your-instance.mokeats.com/api/trpcThese endpoints are accessible without authentication and power the customer-facing experience.
publicMenu.getMenuBySlugqueryFetch a restaurant's full public menu with categories, items, variants, addons, and active bundles.
Input
{
"tenantSlug": "string",
"branchSlug": "string"
}Output
Full menu object with tenant info, branch info, theme settings, categories, items, variants, addons, and bundles.
publicMenu.getMenuByHostqueryFetch a restaurant's menu using the hostname (for custom domain or subdomain-based routing).
Input
{
"host": "string (max 253 chars)"
}Output
Same as getMenuBySlug — resolves the tenant/branch from the host header.
menu.getPublicMenuqueryFetch a restaurant's menu by tenant slug and branch slug (alias from the dashboard router).
Input
{
"tenantSlug": "string",
"branchSlug": "string"
}Output
Complete public menu data structure.
order.createmutationPlace a new order with cart items, customer details, and optional coupon.
Input
{
"tenantId": "uuid",
"branchId": "uuid",
"channel": "web | qr",
"type": "delivery | pickup | dine_in",
"customerName": "string",
"customerPhone": "string",
"items": [{
"menuItemId": "uuid",
"quantity": "number",
"variantId?: "uuid",
"addonIds?": ["uuid"],
"notes?": "string",
"bundleId?": "uuid",
"bundlePrice?": "number"
}],
"couponCode?": "string",
"deliveryAddress?": "string",
"tableNumber?": "string",
"tableId?": "uuid",
"paymentMethod?": "string",
"notes?": "string",
"locale?": "en | ar"
}Output
Created order object with orderNumber, status, items, totals.
reservations.getAvailableSlotsqueryCheck available reservation time slots for a given date, branch, and party size.
Input
{
"branchId": "uuid",
"date": "YYYY-MM-DD",
"partySize": "number (1-100)"
}Output
{ "slots": [{ "time": "HH:mm", "available": boolean, "remaining": number, "availableTables": [...] }] }
reservations.createReservationmutationCreate a new table reservation for a customer.
Input
{
"branchId": "uuid",
"partySize": "number",
"reservationDate": "ISO datetime string",
"customerName": "string",
"customerPhone": "string",
"customerEmail?": "string (email)",
"notes?": "string (max 500)",
"tableId?": "uuid"
}Output
{ "reservationNumber": "string", "reservationDate": "Date", "partySize": "number", "status": "string" }
MokEats exposes webhook endpoints for receiving external service updates.
/api/webhooks/paymobReceives payment status updates from Paymob. Used to update order payment status and trigger post-payment actions.
Payload: Paymob transaction callback payload (JSON).
/api/webhooks/metaReceives WhatsApp message status updates from Meta / 360Dialog. Used to track message delivery, read receipts, and incoming customer messages.
Payload: Meta/360Dialog webhook payload (JSON).
/api/webhooks/telegramReceives Telegram bot updates. Used for restaurant notification delivery and bot commands.
Payload: Telegram Update object (JSON).
Rate limits apply to protect the platform. Current limits are not publicly documented; contact support if you anticipate high-volume usage.
Here's how to fetch a restaurant's menu and place an order using cURL:
curl -X POST "https://your-instance.mokeats.com/api/trpc/publicMenu.getMenuBySlug" \
-H "Content-Type: application/json" \
-d '{
"0": {
"tenantSlug": "my-restaurant",
"branchSlug": "main"
}
}'curl -X POST "https://your-instance.mokeats.com/api/trpc/order.create" \
-H "Content-Type: application/json" \
-d '{
"0": {
"tenantId": "your-tenant-uuid",
"branchId": "your-branch-uuid",
"channel": "web",
"type": "delivery",
"customerName": "Ahmed",
"customerPhone": "+201234567890",
"items": [
{
"menuItemId": "item-uuid",
"quantity": 2
}
]
}
}'For API support, contact us at api@themok.company