Overview
The Ambient AI Scribe API uses standard HTTP status codes to indicate success or failure. All error responses include a JSON body with error details to help you understand and resolve issues.HTTP Status Codes
The API uses the following HTTP status codes:Success Codes
200 OK- Request succeeded201 Created- Resource created successfully204 No Content- Request succeeded with no response body
Client Error Codes
400 Bad Request- Invalid request parameters or body401 Unauthorized- Missing or invalid authentication token403 Forbidden- Insufficient permissions404 Not Found- Resource not found409 Conflict- Resource conflict (e.g., duplicate creation)422 Unprocessable Entity- Validation error429 Too Many Requests- Rate limit exceeded
Server Error Codes
500 Internal Server Error- Unexpected server error502 Bad Gateway- Gateway error503 Service Unavailable- Service temporarily unavailable504 Gateway Timeout- Request timeout
Error Response Format
Error responses follow a consistent format:Common Error Scenarios
Authentication Errors
Validation Errors
Not Found
404 Not Found
Rate Limiting
429 Too Many Requests
Error Handling Best Practices
1. Check Status Codes
Always check the HTTP status code before processing the response:- JavaScript
- Python
2. Handle Specific Error Codes
Implement specific handling for different error types:3. Implement Retry Logic
For transient errors (5xx status codes), implement retry logic with exponential backoff:4. Log Errors Appropriately
Log errors with sufficient context for debugging:5. Handle Rate Limits
When receiving a 429 response, wait until the rate limit resets:Testing Error Handling
Test your error handling by:- Invalid credentials - Test with wrong username/password
- Expired tokens - Test with expired or invalid tokens
- Invalid parameters - Test with missing or invalid request data
- Rate limiting - Test by making rapid requests
- Network errors - Test with network interruptions
Getting Help
If you encounter errors that aren’t covered in this guide:- Check the error message and details in the response
- Verify your request format matches the API specification
- Review the authentication guide
- Contact support with:
- Error code and message
- Request details (endpoint, parameters, headers)
- Response body
- Timestamp of the error

