Base URL
The Highway API is accessible at your deployed server endpoint:Authentication
The Highway backend uses Twilio credentials for making outbound calls. Authentication is handled server-side using:TWILIO_ACCOUNT_SIDTWILIO_AUTH_TOKENTWILIO_PHONE_NUMBER
Request Format
All API requests should be sent withContent-Type: application/json header. Request bodies must be valid JSON.
Response Format
All API responses are returned in JSON format or as plain text messages depending on the endpoint. Success Response Example:Error Handling
The API uses standard HTTP status codes:| Status Code | Description |
|---|---|
| 200 | Success |
| 400 | Bad Request - Validation error |
| 500 | Internal Server Error |
Error Messages
Validation errors return descriptive messages indicating which fields are missing or invalid:"to" is required- Phone number parameter missing"verification" is required- Verification ID parameter missingFailed to initiate call: {error message}- Server error when calling Twilio
CORS Configuration
The API includes CORS middleware to handle cross-origin requests. Configure CORS settings based on your deployment needs.Rate Limiting
Rate limiting is determined by your Twilio account limits and plan. Check your Twilio dashboard for current limits on concurrent calls and API requests.
Database Integration
The API uses Supabase for storing call records. Each call is tracked with:verification- Verification IDstatus- Call status (e.g., “in_progress”)id- Auto-generated call record ID