Error Handling

The API uses standard HTTP status codes to indicate the success or failure of a request.

Common Error Responses

  • 400 Bad Request: The request was malformed or contained invalid parameters. The response body may include an errors field with more details.
    {
      "message": "Validation failed",
      "errors": { /* Zod error format or specific error messages */ }
    }
    
  • 401 Unauthorized: The API key is missing, invalid, or expired.
    {
      "message": "Unauthorized"
    }
    
  • 403 Forbidden: The authenticated user (via API key) does not have permission to perform the requested action.
    {
      "message": "Forbidden"
    }
    
  • 404 Not Found: The requested resource could not be found.
    {
      "message": "Resource not found"
    }
    
  • 409 Conflict: The request could not be completed due to a conflict with the current state of the target resource (e.g., trying to create a resource that already exists with a unique constraint).
    {
      "message": "Resource conflict (e.g., email already exists)"
    }
    
  • 500 Internal Server Error: An unexpected error occurred on the server.
    {
      "message": "Internal server error"
    }
    

Troubleshooting

  • Ensure your API key is correctly included in the Authorization header as a Bearer token.
  • Verify that your Content-Type header is application/json for POST and PUT requests with a JSON body.
  • Check that request bodies and parameters match the schemas defined in this documentation.
  • If you encounter persistent errors, check your Summit application logs for more details.

Was this page helpful?