Error Types
This page serves as a dictionary for all specific error types returned by our API.
invalid_api_key
- Title:
Invalid API Key - Status Code:
401 Unauthorized
Description
This error occurs when the API key provided in the Authorization header does not exist in our system or has been deactivated. Authentication failed because the credential is not valid.
How to Resolve
- Check the Key: Confirm that the API key you are sending is exactly the same as the one generated in the Niara dashboard. Be careful with typos or accidentally copied characters.
- Confirm Key Status: Check in the dashboard if the API key you are using is still active.
- Generate a New Key: If in doubt, generate a new API key and update your application with the correct credential.
unauthorized
- Title:
Authentication Required - Status Code:
401 Unauthorized
Description
This error indicates that the request did not include the necessary authentication credentials. Usually, this means the Authorization header is missing or your API key is invalid.
How to Resolve
- Include the
AuthorizationHeader: Ensure that all your requests to protected endpoints include theAuthorizationheader with your valid API key.
forbidden
- Title:
Access Denied - Status Code:
403 Forbidden
Description
This error occurs when your API key is valid (you have been successfully authenticated), but you do not have the necessary permissions to perform the action or access the requested resource.
How to Resolve
- Check Your Plan: Some actions may be restricted to specific subscription plans. Verify if your current plan allows this type of operation.
- Contact Support: If you believe you should have access, please contact our support team.
internal_error
- Title:
Internal Server Error - Status Code:
500 Internal Server Error
Description
This error indicates that something went wrong on our servers. It is not an issue with your request or your data, but rather an unexpected failure on our end.
How to Resolve
- Wait and Try Again: The problem is usually temporary. You can try resending the request after a few moments. We recommend using an exponential backoff strategy for retries.
- Contact Support: If the problem persists, contact support and provide as much detail as possible about the failed request.
too_many_requests
- Title:
Too Many Requests - Status Code:
429 Too Many Requests
Description
This error occurs when your application exceeds the allowed number of requests in a given period (rate limit).
How to Resolve
- Reduce Frequency: Slow down the rate at which your application makes calls to the API.
- Implement Exponential Backoff: Upon receiving this error, your application should wait before trying again, increasing the wait time with each failed attempt.
- Check the
Retry-AfterHeader: The429error response may include aRetry-Afterheader, which tells you how many seconds you should wait before making the next request.
invalid_subscription
- Title:
Invalid Subscription - Status Code:
403 Forbidden
Description
This error occurs when the API key used belongs to an account that does not have an active subscription, or the current subscription plan does not grant permission to access the requested resource.
For example, trying to access an endpoint available only on the "Pro" plan while the account is on the "Free" plan.
How to Resolve
- Check Subscription Status: Access the billing panel in the Niara App to confirm if your subscription is active.
- Check Plan Permissions: Consult our pricing page to ensure your current plan includes access to this endpoint.
- Upgrade Your Account: If necessary, upgrade your plan to gain access to the resource.
validation_error
- Title:
Validation Error - Status Code:
400 Bad Request
Description
This error indicates that one or more fields sent in the request body or query parameters failed the server's validation rules.
The errors field in the error response will provide specific information about which field failed and why.
How to Resolve
- Analyze the
errorsField: The error message will tell you exactly what the problem is (e.g., "The 'email' field is not a valid email address."). - Correct the Request Data: Adjust the value of the problematic field and send the request again.
- Consult the Endpoint Documentation: Check the "Parameters" section in the documentation for the specific endpoint to confirm the data types, formats, and constraints for each field.