---
title: "Warm County Boundary"
method: POST
path: "/api/v1/project/sandbox/warm-county"
tags: ["project"]
---

# Warm County Boundary

`POST /api/v1/project/sandbox/warm-county`

Pre-warm the boundary MV for a county without creating a project.

Called from the picker the moment a user soft-selects a county, so
the Neon roundtrip (TIGER GEOID lookup + CREATE MATERIALIZED VIEW +
index) overlaps with prompt composition instead of blocking the
subsequent project-create. Idempotent — the MV is workspace-scoped
and deterministically named by ``county_fips``; concurrent warms are
serialized inside ``ensure_county_boundary_mv`` by an advisory lock
and the second caller fast-paths on the existing MV.

Workspace RBAC mirrors ``create_sandbox_project``: FIPS not in the
user's available geographies → 403, FIPS not loaded into the
workspace's ``workspace_counties`` table → 404, FIPS not present in
the workspace's ``tiger_county`` table → 404. No project row is
created on any path — the warm flow is read-only at the app-DB level.

## Request body

- SandboxWarmCountyRequest — Pre-warm a county boundary MV without creating a project. Called when the user soft-selects a county in the picker so the boundary MV builds in parallel with prompt composition. The subsequent project-create call short-circuits the slow Neon work because the MV is already materialized.
  - `county_fips` string, required — 5-digit US county FIPS code (e.g. '12103' for Pinellas, FL)

## Response `200`

Successful Response

- SandboxWarmCountyResponse — Confirms the workspace-shared county boundary MV is queryable. Returned synchronously — the response shipping means the MV exists in Neon. The picker is free to navigate the user into a sandbox project for the same county without waiting on the create-project background task to rebuild it.
  - `county_fips` string, required
  - `ready` boolean

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/maia-analytics/apis/maia-api.md) · [All operations](https://skmtc.net/maia-analytics/apis/maia-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/maia-analytics/maia-api/revisions/fff2cd2dfbac/schema)
