Getting started
API overview
Build and deploy web applications programmatically with the Macaly API
The Macaly API enables external applications to create chat sessions, build web applications with AI, and deploy them to production programmatically.
Base URL
https://www.macaly.comQuick Start
- Get an API Key - See Authentication
- Create a Chat - Send a prompt to start building
- Poll for Completion - Wait for the AI to finish
- Deploy - Publish your app to production
Available Endpoints
| Method | Endpoint | Description |
|---|---|---|
| POST | /api/chat | Create a new chat and start building |
| POST | /api/chat/{chatId}/publish | Send a message to an existing chat |
| POST | /api/client-app/assets/upload | Upload a file and get a permanent CDN URL |
| GET | /api/chat/{chatId}/status | Poll workflow status |
| GET | /api/chat/{chatId}/subscribe | Subscribe to real-time stream |
| POST | /api/chat/{chatId}/deploy | Deploy chat to production |
| GET | /api/chat/{chatId}/deployment | Get deployment status |
Rate Limits and Credits
- API requests consume credits from your team’s balance
- Each chat creation costs the same as using the web interface
- Failed API key attempts are rate limited (5 per minute per IP)
- Monitor your usage in Settings → Usage & Limits
Error Handling
All errors return JSON with an error field:
{
"error": "Error message here"
}HTTP Status Codes
| Status | Description |
|---|---|
| 400 | Bad Request - Invalid request body |
| 401 | Unauthorized - Invalid or missing API key |
| 402 | Payment Required - Insufficient credits |
| 403 | Forbidden - No permission or wrong team |
| 404 | Not Found - Resource not found |
| 422 | Unprocessable Entity - Validation error |
| 429 | Too Many Requests - Rate limited |
| 500 | Internal Server Error - Server-side error |
| 503 | Service Unavailable - Server is busy, try again later |