Skip to main content
Skip to main content

API Error Codes

This reference documents all error codes returned by the IronWiFi REST API, their meanings, and how to resolve them. Use this guide when your API integration encounters an error response.

Error Response Format

All API errors return a JSON response with a consistent structure:

FieldTypeDescription
error
booleanAlways
true
for error responses
message
stringDescription of what went wrong
code
integerHTTP status code matching the response status

Some error responses include additional fields for more context:

HTTP Status Codes

2xx Success

CodeMeaningWhen Returned
200 OK
Request succeededGET, PUT, DELETE operations
201 Created
Resource createdPOST operations that create new resources
204 No Content
Request succeeded, no response bodyDELETE operations

4xx Client Errors

CodeMeaningCommon Cause
400 Bad Request
Invalid request dataMissing required fields, invalid format
401 Unauthorized
Authentication failedMissing, invalid, or expired API key
403 Forbidden
Insufficient permissionsAPI key lacks access to the requested resource
404 Not Found
Resource does not existIncorrect resource ID or endpoint URL
405 Method Not Allowed
HTTP method not supportedUsing POST on a GET-only endpoint
409 Conflict
Resource conflictDuplicate username, conflicting update
422 Unprocessable Entity
Valid JSON but invalid contentBusiness logic validation failure
429 Too Many Requests
Rate limit exceededToo many requests in the current window

5xx Server Errors

CodeMeaningAction
500 Internal Server Error
Unexpected server errorRetry after a delay; contact support if persistent
502 Bad Gateway
Upstream service unavailableRetry after a delay
503 Service Unavailable
Service temporarily downRetry after a delay; check status.ironwifi.com
504 Gateway Timeout
Request timed outRetry with a simpler query or smaller payload

Detailed Error Reference

400 Bad Request

The request body is malformed or missing required fields.

Examples:

How to fix:

  • Verify all required fields are included in the request body
  • Check that field values match the expected format
  • Validate your JSON syntax before sending
  • Ensure
    Content-Type: application/json
    header is set

401 Unauthorized

Authentication failed. The API key is missing, invalid, or expired.

How to fix:

  • Verify the
    Authorization: Bearer YOUR_API_KEY
    header is present
  • Check that the API key is correct (no extra spaces or truncated characters)
  • Generate a new API key if the current one may be compromised
  • See API Authentication for key management

403 Forbidden

The API key is valid but does not have permission to access the requested resource.

How to fix:

  • Verify the API key has the required permissions
  • Check that you are accessing resources within your account scope
  • Contact your account administrator if you need elevated permissions

404 Not Found

The requested resource does not exist.

How to fix:

  • Verify the resource ID is correct
  • Check the endpoint URL for typos
  • Confirm the resource has not been deleted
  • List resources first to find the correct ID:

409 Conflict

The request conflicts with the current state of a resource.

How to fix:

  • For duplicate usernames: use a different username or update the existing user
  • For concurrent updates: fetch the current state and retry with the latest data
  • Check for existing resources before creating new ones

422 Unprocessable Entity

The request is syntactically valid JSON but fails business logic validation.

How to fix:

  • Review the
    details
    array for specific field-level errors
  • Check value ranges and constraints in the API Endpoints documentation
  • Ensure numerical values are positive integers where required
  • Verify RADIUS attribute names and operators are valid

429 Too Many Requests

You have exceeded the API rate limit.

The response includes a

Retry-After
header indicating how many seconds to wait:

Retry-After: 45

How to fix:

  • Wait for the duration specified in the
    Retry-After
    header
  • Implement exponential backoff in your client
  • Reduce request frequency
  • Use bulk operations where available
  • See Rate Limiting for limits and best practices

500 Internal Server Error

An unexpected error occurred on the server.

How to fix:

Error Handling Best Practices

Implement retry logic

For transient errors (429, 500, 502, 503, 504), implement automatic retries with exponential backoff:

Validate before sending

Reduce errors by validating data before making API calls:

Log errors for debugging

Always log API errors with enough context to diagnose issues:

RADIUS-Specific Error Codes

When working with RADIUS authentication via the API, you may encounter these RADIUS-specific reject reasons in reports and webhook payloads:

Reject ReasonMeaningResolution
Invalid credentials
Username or password incorrectVerify user credentials in the Console
User disabled
Account is deactivatedEnable the user account
Account expired
Valid-To date has passedUpdate the user's validity dates
Login time restriction
Outside allowed login hoursCheck Login-Time attribute
Max sessions exceeded
Simultaneous-Use limit reachedWait for existing session to end or increase limit
Unknown user
Username not foundCreate the user or check for typos

Was this page helpful?