API Response Codes
Understand what different HTTP responses mean in Helpjuice API
Helpjuice API uses standard HTTP status codes to indicate the outcome of a request. Knowing what each code means helps you handle errors properly and build more robust integrations.
In this article, you’ll learn:
- Common HTTP response codes used by the Helpjuice API
- What each response code indicates
- How to troubleshoot or handle errors
Status Code | Meaning | When It Happens |
---|---|---|
401 - Unauthorized | Authentication is required but missing | Occurs when you try to access the API without including a valid API key or token |
403 - Forbidden | Authenticated user does not have access | Happens when your credentials are valid but you don’t have permission to access the requested data |
404 - Not Found | Requested data does not exist | Returned when the resource (question, article, or category) does not exist in your knowledge base |
422 - Unprocessable Entity | Submitted data is invalid | Happens when the request payload is malformed or missing required fields |
How to Handle API Response Codes
- 401 Unauthorized:
- Check that your API key or token is correct.
- Ensure it’s included in the request header or query parameter.
- 403 Forbidden:
- Verify that your account has sufficient permissions.
- Make sure the endpoint you are calling is allowed for your role.
- 404 Not Found:
- Confirm that the ID or URL in the request is correct.
- Check whether the resource has been deleted or moved.
- 422 Unprocessable Entity:
- Validate that all required fields are included and formatted correctly.
- Review API documentation for expected payload structure.
Best Practices
- Always check response codes after making an API request.
- Implement error handling in your integration to manage 4xx and 5xx responses.