# Errors in Xpansiv Data API The Xpansiv Data API uses the following error codes: | Error Code | Meaning | | --- | --- | | 400 | Bad Request -- The request you sent is incorrect. | | 401 | Unauthorized -- Your API key is wrong. | | 403 | Forbidden -- The requested resource is hidden and may be accessed by the administrators only. | | 404 | Not Found -- The specified resource could not be found. | | 405 | Method Not Allowed -- You tried to access a resource with an invalid method. | | 406 | Not Acceptable -- You requested a format that isn't json. | | 410 | Gone -- The resource requested has been removed from our servers. | | 418 | I'm a teapot. | | 429 | Too Many Requests -- You're requesting too many times! Slow down! | | 500 | Internal Server Error -- We had a problem with our server. Try again later. | | 503 | Service Unavailable -- We're temporarily offline for maintenance. Please try again later. | ## Common User Errors While the above codes represent API-level errors, users may also encounter issues caused by incorrect usage. These are not API errors but can prevent successful requests. ### Examples of Common User Errors: - **Incorrect curl formatting**: Placing multiple curl commands on the same line without proper separation can lead to terminal errors. - **Missing headers**: Forgetting to include required headers such as `Authorization: Bearer `. - **Improper JSON body formatting**: Using single quotes or missing commas in JSON payloads. - **Not URL-encoding query parameters**: For example, spaces in `groupName` must be encoded as `%20`. ### Tips to Avoid User Errors: - Always validate JSON payloads before sending. - Use single-line curl commands for clarity. - Double-check required headers and authentication tokens. - Encode special characters in query parameters.