Error Handling


When a request fails, the API returns an error response with details about what went wrong.

Error Response Format

{
  "actionOk": false,
  "error": ["error-code-here"],
  "message": "Human-readable description of the error"
}

The error array contains one or more error codes. The message field provides a human-readable description.

Error Codes

HTTP StatusError CodeDescriptionResolution
400bad-requestInvalid request body or missing required fieldsCheck your request JSON structure
401unauthorizedMissing Authorization headerInclude your Bearer token
401invalid-tokenBearer token is malformed, expired, or revokedUse the token provided at account approval
403ForbiddenInvalid or missing API keyCheck your x-api-key header
403no-privilegeYour token lacks permission for the requested dataRequest only data within your authorized scope
403no-districtleaRequested district LEA is not in your access scopeContact admin to expand access if needed
404not-foundThe requested resource does not existVerify your endpoint URL and parameters
429too-many-requestsRate limit or daily quota exceededWait and retry, or upgrade your plan
500internal-errorServer-side errorRetry the request; contact support if persistent

Troubleshooting

Getting 403 Forbidden?

  • Verify your API key is correct and the x-api-key header is included
  • Ensure your account is active (not suspended or disabled)

Getting 401 Unauthorized?

  • Include the Authorization: Bearer {token} header
  • Verify the token hasn't been regenerated (happens when your access scope changes)
  • Ensure the token is the complete string with no truncation

Getting no-districtlea?

  • You can only query districts/schools in your authorized scope
  • Check your approval email for the list of authorized LEA codes
  • Contact your administrator to request access to additional districts