Skip to main content

API Error Reference

QRForge uses a consistent, structured error format across all API endpoints.
Every error response includes an error code, a human‑readable message, and a unique request_id you can reference when contacting support.


Error Response Format​

All error responses follow the same envelope:

{
"ok": false,
"version": "2025-11-14-v1",
"request_id": "5e7c1cfa-e2c2-4b4f-b2b4-8aa25531c9ef",
"code": "invalid_request",
"message": "Missing required field: redirect_url"
}

Fields​

FieldDescription
okAlways false for errors
versionAPI version string
request_idUnique ID for tracking/debugging
codeMachine-readable error code
messageHuman-readable description of what went wrong

Global Error Codes

Below is the full catalog of error codes used by the QRForge API v1.


Authentication & Authorization Errors​

CodeMeaning
unauthorizedAPI key is missing, invalid, or revoked

Note: a request for a QR code or project you don't own returns 404 not_found, not a distinct "forbidden" code — this is deliberate, so a caller can't distinguish "doesn't exist" from "exists but isn't yours" by probing IDs.

Example​

{
"ok": false,
"code": "unauthorized",
"message": "Invalid or missing API key."
}

Request Structure & Validation Errors​

CodeMeaning
invalid_requestMalformed, missing, or invalid parameters
invalid_payloadJSON body is missing required fields or contains invalid values
method_not_allowedUnsupported HTTP method
not_foundThe requested resource does not exist (or isn't yours — see above)
unsafe_urlThe redirect_url (or a redirect rule's URL) was flagged unsafe by an automated safety check (HTTP 422 Unprocessable Entity)

Example​

{
"ok": false,
"code": "invalid_request",
"message": "Missing QR id (id or qr_id)."
}

Access & Entitlement Errors​

CodeMeaning
api_access_disabledAPI access is not enabled for your account
feature_disabledThe requested action isn't included in your current plan

Example​

{
"ok": false,
"code": "feature_disabled",
"message": "QR code creation is not included in your current plan."
}

Quota & Rate Limiting Errors​

CodeMeaning
rate_limitedGeneral per-key rate limit exceeded (applies to most read/write endpoints)
rate_limit_minuteQR-code creation: too many requests in the current minute window
rate_limit_dayQR-code creation: daily quota exceeded
quota_exceeded_qrYour plan's QR-code creation limit has been reached (HTTP 402 Payment Required — an unusual but real status choice for this code)

Requests throttled by rate_limited include a Retry-After header (seconds).

Example​

{
"ok": false,
"code": "rate_limit_minute",
"message": "Too many requests this minute."
}

Project & Resource Access Errors​

CodeMeaning
project_not_foundProject does not exist or does not belong to the API key owner

Example​

{
"ok": false,
"code": "project_not_found",
"message": "Project not found."
}

Internal Errors​

These indicate unexpected platform issues — retry with backoff, and contact support with the request_id if they persist.

CodeMeaning
internal_errorA backend or infrastructure error occurred
config_errorThe API key is misconfigured or its owning account could not be resolved. Contact support. (HTTP 500)

Example​

{
"ok": false,
"code": "internal_error",
"message": "Failed to validate API key."
}

config_error is returned when an API key's owner_uid doesn't resolve to a real user document — a data-integrity edge case such as an orphaned or misconfigured key:

{
"ok": false,
"code": "config_error",
"message": "Owner user not found for API key."
}

Troubleshooting Guide

1. Verify your API key​

  • Ensure you're using the correct x-api-key.
  • Confirm the key is active in the QRForge dashboard.

2. Validate request data​

  • Check required fields.
  • Verify field formats (URLs must be http:// or https://).
  • Ensure JSON is syntactically valid.

3. Respect rate limits​

  • Use retries with backoff on rate_limited, rate_limit_minute, and rate_limit_day — check for a Retry-After header where present.
  • Do not exceed your daily quota.

4. Confirm project ownership​

  • Ensure the project_id belongs to your account.

Contact Support

If you encounter an error that is not documented here, please reach out with:

  • request_id
  • Endpoint you called
  • Timestamp (UTC)
  • Full response body

support@qrforge.link