Error Codes
NisaStack API error responses and status codes.
Error Response Format
When an error occurs, the API returns a JSON response with the following structure:
{
"success": false,
"message": "Human-readable error message",
"errors": {
"field_name": ["Validation error message"]
}
}
The HTTP status code indicates the type of error that occurred.
HTTP Status Codes
OK
The request was successful.
{
"success": true,
"data": {
"result": "Success data here"
},
"metadata": {
"actions_consumed": 1
}
}
Unauthorized
Authentication failed. Your API token is missing or invalid.
Common Causes:
- Missing
Authorizationheader - Invalid or expired API token
- Incorrect token format (should be
Bearer YOUR_TOKEN)
Solution:
Verify your API token is correct and included in the Authorization header. Create a new token if needed.
{
"success": false,
"message": "Unauthenticated."
}
Payment Required
Your organization has insufficient actions remaining in the monthly pool.
Common Causes:
- Monthly action pool depleted
- Plan downgraded mid-month
- High usage spike
Solution:
Upgrade your plan or wait until your monthly pool resets. Check your usage dashboard for details.
{
"success": false,
"message": "Insufficient actions remaining. You have 0 actions left."
}
Not Found
The requested tool or resource does not exist.
Common Causes:
- Incorrect tool type in URL
- Typo in endpoint path
- Tool has been deprecated or removed
Solution:
Check the API Reference for the correct tool type and endpoint.
{
"success": false,
"message": "Tool not found."
}
Unprocessable Entity
The request data failed validation.
Common Causes:
- Missing required parameters
- Invalid parameter types or formats
- Parameter values out of acceptable range
Solution:
Review the errors object in the response to see which fields failed validation and why.
{
"success": false,
"message": "The given data was invalid.",
"errors": {
"url": ["The url field is required."],
"method": ["The selected method is invalid."]
}
}
Too Many Requests
You've exceeded the rate limit for your plan.
Common Causes:
- Sending requests too quickly
- Parallel requests exceeding limit
- No delay between retry attempts
Solution:
Check the Retry-After header in the response to know when you can retry. Implement exponential backoff for retries.
{
"success": false,
"message": "Too Many Requests"
}
Internal Server Error
An unexpected error occurred on our servers.
What to Do:
- Retry the request after a short delay
- If the error persists, contact support
- Include the request details and timestamp when reporting
{
"success": false,
"message": "Server Error"
}
Next Steps
Now that you understand error handling, explore the available tools:
Browse API Reference