LOOMAL
SDK / API Reference

Errors

API error codes and responses

All errors follow a consistent format:

{
  "error": "error_code",
  "message": "Human-readable description",
  "status": 400
}

Error Codes

StatusError CodeDescription
400bad_requestMissing or invalid request body
401unauthorizedMissing, invalid, or expired API key
403forbiddenAPI key lacks required scope
404not_foundResource not found or not accessible
410expiredCredential has expired
413payload_too_largeRequest body exceeds 2MB limit
429rate_limitedToo many requests (200/min per identity, 60/min per IP)
429quota_exceededDaily send limit reached (50 emails/day)
500internal_errorServer error

Common Scenarios

Missing required field

{
  "error": "bad_request",
  "message": "to, subject, and text are required",
  "status": 400
}

Message not found

{
  "error": "not_found",
  "message": "Message not found",
  "status": 404
}

This also occurs when trying to access a message that belongs to a different identity.

Scope violation

{
  "error": "forbidden",
  "message": "Missing required scope: mail:send",
  "status": 403
}

Rate limited

{
  "error": "rate_limited",
  "message": "Too many requests",
  "status": 429
}

Daily send quota exceeded

{
  "error": "quota_exceeded",
  "message": "Daily send limit reached (50/day). Resets at midnight UTC.",
  "status": 429
}

Expired credential

{
  "error": "expired",
  "message": "Credential \"my-api-key\" has expired (2026-01-01T00:00:00.000Z)",
  "status": 410
}

On this page