Overview
The Bonsai REST API provides endpoints for search, analytics tracking, and AI-generated landing content.Authentication
Include your API key in theX-API-Key header:
Keep API keys server-side only. Do not expose keys in browser client code.
Base URL
Endpoint Directory
Search v3
Enhanced search endpoint recommended for new integrations.
Search v2
Original search endpoint for product and context queries.
Hits
Track search and interaction events.
AI Landing Page
Retrieve AI-generated landing content for an organization.
Search Versions
Both search versions support the same core query pattern. Use v3 for new implementations.| Version | Path | Use case |
|---|---|---|
| v3 | /rest/search/v3/ | Recommended default for new integrations |
| v2 | /rest/search/v2/ | Existing integrations on the original search implementation |
Error Handling
REST endpoints return standard HTTP status codes with JSON error bodies:200 OK: Request succeeded400 Bad Request: Invalid parameters or malformed request401 Unauthorized: Missing or invalid API key404 Not Found: Resource not found429 Too Many Requests: Rate limit exceeded500 Internal Server Error: Server error
Rate Limiting
API requests are rate limited per organization. If you exceed your rate limit, you’ll receive a429 Too Many Requests response. Rate limits are configured per customer account. Contact your Customer Success Manager (CSM) for information about your account’s rate limits.