Skip to main content

Overview

The Bonsai REST API provides endpoints for search, analytics tracking, and AI-generated landing content.

Authentication

Include your API key in the X-API-Key header:
X-API-Key: YOUR_API_KEY_HERE
Keep API keys server-side only. Do not expose keys in browser client code.
For the API playground “Try it” input, enter your API key in the bearer token field.

Base URL

https://api.hibonsai.com/rest/

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.
VersionPathUse 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:
{
  "error": "Error message",
  "details": {}
}
Common HTTP status codes:
  • 200 OK: Request succeeded
  • 400 Bad Request: Invalid parameters or malformed request
  • 401 Unauthorized: Missing or invalid API key
  • 404 Not Found: Resource not found
  • 429 Too Many Requests: Rate limit exceeded
  • 500 Internal Server Error: Server error

Rate Limiting

API requests are rate limited per organization. If you exceed your rate limit, you’ll receive a 429 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.

Support

For API support, integration assistance, or feature requests, contact your Customer Success Manager.