Skip to main content

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 default 422 Unprocessable Entity error:
422 - Unprocessable Entity
{
  "detail": [
    {
      "loc": ["string", 0],
      "msg": "string",
      "type": "string"
    }
  ]
}
This format shows where the validation failed (loc), the error message (msg), and the type of validation issue (type). Most endpoints return errors in this standardized format with the following fields.
FieldDescription
successAlways false for errors
error.codeHigh-level classification (e.g., VALIDATION_ERROR, ERROR)
error.messageHuman-readable description of what went wrong
error.fieldThe specific input field that failed validation, if applicable
error.statusHTTP status code
error.request_idUnique identifier for debugging and support
error.timestampWhen the error occurred

Common Error Codes

400 Bad Request

Returned when parameters are malformed or logically invalid.
400 - Bad Request
{
  "success": false,
  "error": {
    "code": "ERROR",
    "message": "modified_date may not be in the future.",
    "status": 400,
    "request_id": "a1e41ec1-64d8-4916-b69d-7082723ece2e",
    "timestamp": "2025-09-16T02:13:11+00:00"
  }
}

401 Unauthorized

Occurs when authentication is missing or incorrect.
  • Ensure you are using the correct HTTP method (e.g., sending GET instead of POST may trigger 401).
  • 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
{
    "success": false,
    "error": {
        "code": "UNAUTHORIZED",
        "message": "Not authenticated",
        "status": 401,
        "request_id": "b4fa29c3-b968-4bc7-bab2-6edb5044e3da",
        "timestamp": "2025-09-16T02:46:24+00:00"
    }
}

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
{
  "detail": "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
{
  "success": false,
  "error": {
    "code": "VALIDATION_ERROR",
    "message": "Field required",
    "field": "email",
    "status": 422,
    "request_id": "xxxx-xxxx",
    "timestamp": "2025-09-13T15:58:47+00:00"
  }
}

500 Internal Server Error

Indicates an unexpected issue on the server side. If this persists, contact LeadX support and provide the request_id from the error response.
500 - Internal Server Error
internal server error

Troubleshooting Tips

Always start your request URL with https:// (not http://).
Check that you are using the correct HTTP method (GET vs. POST).
Remove extra spaces or trailing slashes at the end of the endpoint.
Ensure you have a valid and correct API key.
Some endpoints need specific parameters. Ensure you’ve included all required parameters.
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").
Last modified on March 23, 2026