PrecisionDocs

Errors & Rate Limits - Developer Docs

The error envelope, common error types, per-route limits, and the 202-then-poll pattern.

What does an error response look like?

Errors rendered by the app's exception handlers are one RFC 9457 problem document, Content-Type: application/problem+json, whether from a route, the scope check, request validation, the operation limiter or an unknown path:

{
  "type": "https://precisiondocs.ai/developers/errors#bootstrap_not_ready",
  "title": "Conflict",
  "status": 409,
  "code": "bootstrap_not_ready",
  "detail": "The requested map layer is still being collected.",
  "request_id": "5d0c1c9e-7f1b-4f5e-9a57-2f6d3c1b8e44",
  "retry_after_seconds": 15,
  "poll": "/v1/projects/{project_id}"
}

Branch on code. detail is human copy, request_id matches the X-Request-ID response header (quote it to support), and recovery.action (with recovery.url where there is one) says what to do next when the error has a known recovery. The context of each error rides beside them: required_scope, required_credits and available_credits, period and credit_cap, gaps, and for a request the schema refused, errors[] with each bad field, its code and a message.

A 429 from the per-route rate limiter is the same shape with code: "rate_limited", retry_after_seconds and a Retry-After header. It is always transient - wait the named seconds and retry the same call. The per-address default limit refuses before routing with application/json, a detail message and Retry-After; it carries neither the problem envelope nor deprecation headers.

Common error codes (each with its HTTP status):

  • not_found (404): unknown resource, or a project outside your organization.
  • insufficient_scope (403): the key lacks the scope for this endpoint.
  • bootstrap_not_ready (409): the requested map has no usable source data yet while collection runs; unrelated reads remain available.
  • goal_version_conflict (409): the project goal moved since the user_goal_revision / user_goal_hash you read. Re-read GET /v1/projects/{id}, confirm the wording with the user, and send again.
  • goal_version_required (428): PATCH /v1/projects/{id} was sent without expected_goal_revision or expected_goal_hash; a goal is replaced whole, never overwritten blind.
  • invalid_interview_answer (400): one or more interview answers were rejected; nothing was recorded, and errors names each bad field.
  • site_plan_studio_not_enabled (403): site planning is not on this workspace's plan (it comes with every paid plan); the compile writes are refused while every read still works.
  • planning_session_conflict (409): the planning_session_id is no longer the active session, or the state_version is stale. Re-read and retry.
  • program_incomplete (409): the program still has required gaps; gaps names them per zone.
  • invalid_program (422): the program cannot be approved as it stands, such as a staged parking draft that could not be confirmed.
  • program_not_approved (409): a concept was proposed before the program was approved.
  • concept_proposal_rejected (409): the proposal could not be built as asked: an unknown zone_id, a zone with no sketched boundary, or no existing concept for a zone_id regeneration to start from.
  • home_placement_required (409): use the single-home prepare, review, edit and confirm placement flow instead of generic program/proposal writes.
  • home_placement_refused (400, 409 or 503): placement could not be prepared, edited, confirmed or queued; resolve the returned block or message, then re-read the current draft before retrying.
  • home_placement_not_supported (409): placement requires one single-family home on an existing lot.
  • typology_not_supported_via_api (409): subdivision and single-family programs outside the custom-home workflow cannot be compiled through this lane. To divide a parcel into lots, use POST /v1/projects/{id}/parcels/split (precisiondocs_split_parcel).
  • proposal_override_reason_required (422): the proposal carries conflicts; approving it needs the user's written reason.
  • proposal_expired (409): the program or plan changed since the proposal was made. Propose again.
  • proposal_blocked (409): a prerequisite the compile needs is missing (block says which); the proposal stays retryable.
  • proposal_failed (409): the compile was refused on a domain rule (repair gate, conflict); the proposal is marked failed.
  • proposal_decided (409): the proposal was already approved, rejected or expired.
  • proposal_execution_failed (500): the compile faulted rather than refusing; the proposal is left retryable, so retry the same approve.
  • idempotency_key_reused (409): the same Idempotency-Key was sent with a different payload.
  • idempotency_in_progress (409): a request with this Idempotency-Key is still running. Retry.
  • concurrency_limit_exceeded (429): too many concurrent agent turns for this key (limit 2), with retry_after_seconds in the body and a Retry-After header.
  • house_paid_daily_limit (429): this key or connection started 50 pieces of work today that PrecisionDocs pays for itself (URL documents, GIS services, source previews, code checks, chapter retries, utilities sources, and free parcel searches and screens), the daily limit for that work. Retry-After names the wait until 00:00 UTC; supplemental ordinance sources, duplicates and calls that queued nothing are not counted.
  • insufficient_credits (402): the organization wallet is empty.
  • api_key_credit_cap_exceeded (402): this key reached its daily, weekly or monthly spending limit.
  • connection_credit_cap_exceeded (402): this chat-agent connection reached the daily, weekly or monthly spending limit chosen when it was connected; raise it in Account -> Integrations -> Connected apps.
  • free_tier_limit (402): a free-plan limit. The feature (own documents, sources, GIS registration) is not on the free plan, or its allowance is used up; limit names which. Add credits.
  • search_unavailable (503): search is temporarily unavailable. Retry with backoff.

What are the rate limits?

Operation limits are per credential. Exceeding one returns 429 with a Retry-After header and a problem document naming the wait (code: "rate_limited" plus retry_after_seconds) - wait and retry the same call. The MCP client puts the wait in the error text as "Retry after Ns".

RouteLimit
POST /v1/projects8/min
POST /v1/plan-check20/min
POST .../sources, POST .../gis-sources10/min
POST /v1/uploads/initiate, POST /v1/uploads/{job_id}/finalize30/min
GET /v1/projects, GET /v1/projects/{id}60/min
PATCH .../parcels/{i}/zoning30/min
PATCH /v1/projects/{id}30/min
GET .../site-knowledge60/min
POST .../messages2/min (concurrency 2)
GET .../messages, GET .../messages/{turn_id}60/min
POST .../search30/min
POST .../summaries5/min
POST .../gis-exports10/min
POST .../maps10/min
POST /v1/parcels/resolve20/min
POST /v1/parcels/preview10/min
GET .../site-plan, GET .../design-criteria, GET .../yield-scenario60/min
POST .../site-plan-exports10/min
GET .../interview/workflows, GET .../interview/step60/min
POST .../interview/answers30/min
POST .../site-plan/program/approve30/min
POST .../site-plan/proposals, POST .../site-plan/proposals/{id}/approve, POST .../site-plan/proposals/{id}/reject10/min
GET .../site-plan/proposals60/min
GET .../gis-exports/{artifact_id}30/min
POST .../reports5/min
GET .../reports, GET .../reports/{job_id}, GET .../artifacts60/min
GET .../artifacts/{artifact_id}30/min
GET /v1/wallet30/min

The 202-then-poll pattern: long-running work (project creation, report generation) returns 202 immediately. Poll the corresponding read endpoint every 5–15 seconds until the resource is terminal - never spin faster than the read limits. GET /v1/runs/{run_id} and GET /v1/projects/{project_id}/messages/{turn_id} also take wait_seconds (0-25, default 0): the call itself waits until the status changes or the seconds pass, then answers as a plain poll would, so one held request replaces a loop.

Other API topics

PrecisionDocs
Reload page