API Overview
Hiro CRM provides a REST API for managing reservations, customers, loyalty programs, and AI-powered operations. All endpoints use JSON for request and response payloads.Base URL
API Sections
Admin
Administrative endpoints for debugging, importing data, and seeding locations
AI Chat
OpenAI-powered conversational AI assistant for restaurant operations
Automations
Execute marketing automations manually or via scheduled cron jobs
Loyalty
Manage loyalty tiers, rules, and benefits configuration
Organization
Retrieve active organization context for multi-tenant operations
Sync
Synchronize reservations with external PMS systems
Cron Jobs
Scheduled tasks for syncing, notifications, and automations
Authentication
All API endpoints require authentication using Supabase Auth. See Authentication for details.Common Response Formats
Success Response
Error Response
Rate Limits
API rate limits depend on your hosting configuration. The following endpoints have extended timeouts:/api/cron/*endpoints: 60-300 seconds/api/ai/chat: Standard timeout/api/automations/*/run: 300 seconds (5 minutes)
HTTP Status Codes
| Status Code | Description |
|---|---|
| 200 | Request successful |
| 400 | Bad request - invalid parameters |
| 401 | Unauthorized - authentication required |
| 403 | Forbidden - insufficient permissions |
| 500 | Internal server error |
