Error Response Format
All Kintsugi API errors follow a consistent JSON format:HTTP Status Codes
Client Errors (4xx)
Client Errors (4xx)
| Status Code | Error Type | Description | Common Causes |
|---|---|---|---|
400 | Bad Request | Invalid request data or parameters | Missing required fields, invalid data types, business logic violations |
401 | Unauthorized | Invalid or missing authentication | Missing API key, invalid API key, expired token |
403 | Forbidden | Insufficient permissions | User lacks access to organization, admin-only endpoint |
404 | Not Found | Resource does not exist | Invalid ID, deleted resource, wrong organization |
409 | Conflict | Resource conflict | Duplicate creation, state conflicts, concurrent modifications |
422 | Unprocessable Entity | Validation errors | Invalid field values, constraint violations, business rules |
429 | Too Many Requests | Rate limit exceeded | Exceeding 10,000 requests per minute limit |
Server Errors (5xx)
Server Errors (5xx)
| Status Code | Error Type | Description | Common Causes |
|---|---|---|---|
500 | Internal Server Error | Unexpected server error | Database errors, unhandled exceptions, system failures |
503 | Service Unavailable | External service unavailable | Third-party API failures, maintenance windows |
Common Error Messages
Authentication Errors
Missing API Key
Missing API Key
- Error Response
- Solution
Invalid API Key
Invalid API Key
- Error Response
- Solution
Organization Access Denied
Organization Access Denied
- Error Response
- Solution
Admin Access Required
Admin Access Required
- Error Response
- Solution
Validation Errors
Missing Required Fields
Missing Required Fields
Invalid Field Values
Invalid Field Values
Business Logic Violations
Business Logic Violations
Error Handling Best Practices
Implement Proper HTTP Status Code Handling
Check the response status code and handle each type appropriately:
Implement Exponential Backoff
For rate limiting and temporary errors, implement exponential backoff:
Troubleshooting Common Issues
Authentication Issues
Authentication Issues
- Missing API Key
- Invalid API Key
Error:
API key is missing or empty.Solution: Ensure you’re including both the x-api-key and x-organization-id headers in your requests:Kintsugi uses API key authentication via headers (not bearer token). Both headers are required.
Validation Issues
Validation Issues
- Missing Required Fields
- Invalid Data Types
Error:
Field requiredSolution: Check the API documentation for required fields and ensure all are included in your request body.Resource Issues
Resource Issues
- Resource Not Found
- Access Denied
Error:
Resource not foundSolution:- Verify the resource ID is correct
- Check if the resource belongs to your organization
- Ensure the resource hasn’t been deleted