Documentation Index
Fetch the complete documentation index at: https://docs.leadx.com/llms.txt
Use this file to discover all available pages before exploring further.
Default Validation Errors
If input validation fails, the API may return the default422 Unprocessable Entity error:
422 - Unprocessable Entity
loc), the error message (msg), and the type of validation issue (type).
Most endpoints return errors in this standardized format with the following fields.
- Fields
- Example
| Field | Description |
|---|---|
success | Always false for errors |
error.code | High-level classification (e.g., VALIDATION_ERROR, ERROR) |
error.message | Human-readable description of what went wrong |
error.field | The specific input field that failed validation, if applicable |
error.status | HTTP status code |
error.request_id | Unique identifier for debugging and support |
error.timestamp | When the error occurred |
Common Error Codes
400 Bad Request
Returned when parameters are malformed or logically invalid.400 - Bad Request
401 Unauthorized
Occurs when authentication is missing or incorrect.-
Ensure you are using the correct HTTP method (e.g., sending
GETinstead ofPOSTmay trigger401). - Verify your API key is included in the request headers. See the Authentication section for details on how to obtain an API key.
401 - Unauthorized
404 Not Found
Returned when the requested resource or endpoint does not exist. Check if you entered the full and correct endpoint path.404 - Not Found
422 Unprocessable Entity
Returned when request validation fails. Common causes:- Invalid JSON body
- Empty request body
- Supplying fields that are not allowed
- Missing required fields
422 - Unprocessable Entity
500 Internal Server Error
Indicates an unexpected issue on the server side. If this persists, contact LeadX support and provide therequest_id from the error response.
500 - Internal Server Error
Troubleshooting Tips
Use HTTPS
Use HTTPS
Always start your request URL with
https:// (not http://).Check HTTP Method
Check HTTP Method
Check that you are using the correct HTTP method (
GET vs. POST).Verify Endpoint URL
Verify Endpoint URL
Remove extra spaces or trailing slashes at the end of the endpoint.
Verify Authentication
Verify Authentication
Ensure you have a valid and correct API key.
Include Required Parameters
Include Required Parameters
Some endpoints need specific parameters. Ensure you’ve included all required parameters.
Validate Request Body Format
Validate Request Body Format
If the endpoint expects JSON in the body of the request, validate that your request body follows the proper JSON schema. An improper schema will result in a
422 error (i.e., "message": "JSON decode error").