Skip to main content

API Reference

The Renchi AI API is organized around REST principles. All endpoints are built as Next.js API routes and handle specific functionality for the platform.

Endpoint Categories

Integrations

OAuth flows for third-party service connections

Webhooks

Event handlers for Twilio and ElevenLabs

Cron Jobs

Scheduled background tasks

Admin

Setup and debugging endpoints

Integrations

OAuth-based connections to third-party services. Supported providers: Google Calendar, HubSpot, Salesforce, Microsoft Teams.

Authentication

Requires authenticated user session with team admin/owner role.

Supported Providers

  • google_calendar - Google Calendar sync
  • hubspot - HubSpot CRM integration
  • salesforce - Salesforce CRM integration
  • microsoft_teams - Microsoft Teams notifications

Webhooks

Event handlers for voice call processing. These endpoints receive callbacks from Twilio and ElevenLabs.

Twilio Webhooks

Authentication: Twilio signature validation via X-Twilio-Signature header.

ElevenLabs Webhooks

Authentication:
  • Main webhook: ElevenLabs-Signature header validation
  • Personalize: x-webhook-secret or Authorization: Bearer token

Event Types (ElevenLabs)

Sent after call completion with full transcript, AI analysis, and metadata.

Cron Jobs

Scheduled background tasks executed by Vercel Cron. Authentication: Authorization: Bearer {CRON_SECRET} header.

Admin

Setup and debugging endpoints.
These endpoints should be removed or heavily protected in production.

Error Handling

All endpoints return errors in a consistent format:

Common Error Codes


Rate Limiting

  • Webhook endpoints: No rate limiting (event-driven)
  • Cron endpoints: Protected by Vercel Cron scheduling
  • Integration endpoints: Standard API rate limits apply

CORS

All API endpoints support CORS for same-origin requests. Cross-origin requests require proper authentication.