← Errors and troubleshooting

HTTP 403 · PLAN_REQUIRED

PLAN_REQUIRED: this endpoint needs a higher plan

Endpoints are grouped into plan tiers. Your key is valid, but the endpoint you called belongs to a tier above your plan. The response names both, so your app can show the right upgrade prompt instead of a generic error.

Updated · every example recorded from a real API call

HTTP status
403 Forbidden
Retry?
Only after the plan changes. Repeating the call returns the same 403.
Counts toward your monthly quota?
No. It is logged in your usage history, but only successful calls are billed.
Checked before
Rate limit and monthly quota. You get PLAN_REQUIRED, not a 429, even on a full quota.

Reading the response

A Free key calling POST /v1/dosha/kaal-sarp:

json
{
  "request_id": "req_01M8RK47ECFSZYBZ224WPHGBH4",
  "error": {
    "code": "PLAN_REQUIRED",
    "message": "/v1/dosha/kaal-sarp requires the hobby+ plan; current plan is free.",
    "details": {
      "required_tier": "hobby",
      "current_plan": "free",
      "endpoint": "/v1/dosha/kaal-sarp",
      "upgrade_url": "/dashboard/billing/plans"
    }
  }
}
  • required_tier is the lowest plan that unlocks the endpoint - hobby+ means Hobby, Starter or Pro all work. Tiers only go up: a Hobby key calling POST /v1/compatibility/batch gets "required_tier": "starter", "current_plan": "hobby".
  • endpoint is the route pattern (/v1/reports/:id, not the id you sent), so it is safe to log and to group by.
  • upgrade_url is a path in the AstroNode dashboard, not on your site. Prefix it with the dashboard origin if you surface it to a developer; do not show it to your own end users.

Which plan the API thinks you are on

current_plan is your account's effective plan, worked out on every request, not just the plan stamped on the key:

  • An active or past_due subscription gives you its plan.
  • A checkout you opened but never completed (incomplete) is ignored - you stay on the key's plan.
  • An expired or cancelled subscription drops you to free, even for keys created while you were paying.
  • Per-account quota or rate overrides granted by support never unlock a tier: they relieve limits, they are not an entitlement.

So if you upgraded and still see "current_plan": "free", check the subscription status in the dashboard before suspecting the key.

Handle it in your app

Switch on error.code === "PLAN_REQUIRED", not on the 403 status alone. Treat it as a product state rather than a failure: hide or badge the feature for your plan, or route the request to an endpoint your plan includes. The response's required_tier is the authoritative answer for an endpoint; pricing compares the plans.

FORBIDDEN is defined in the API's error list but no API-key request returns it today. A 403 from AstroNode is PLAN_REQUIRED.

Questions

Does a PLAN_REQUIRED response use up my quota?
No. The 403 appears in your usage history, but only answered calls (status below 400) consume quota, and the plan check runs before the per-minute limiter, so it takes no window slot either. It will fail identically every time, though - stop on the first PLAN_REQUIRED instead of retrying.
Why do I get VALIDATION_ERROR instead of PLAN_REQUIRED?
The request body is validated before the plan is checked. Send a valid body and the 403 will appear.