---
title: "Upload district plan directly"
method: POST
path: "/upload"
---

# Upload district plan directly

`POST /upload`

Upload a GeoJSON district plan directly for scoring. Plans must be under 5MB.
For larger files or other formats, use the multistep upload process.

## Request body

- GeoJSONPlan
  - `type` 'FeatureCollection', required — Must be "FeatureCollection"
  - `description` string — Short description of the plan that will appear as the top-most header on the plan page
  - `model_version` string — Predictive model version to use. If omitted, the most recent available version is used.
  - `library_metadata` LibraryMetadata — Additional metadata about the plan, particularly for library/historical plans. The following properties are displayed specially in the plan UI, but other properties are also allowed.
    - `authoritative_link` string, uri — URL to the authoritative source for this plan (e.g., state legislature website)
    - `predecessor_link` string, uri — URL to the preceding enacted plan that this plan replaces or succeeds
    - `shapefile_file` string, uri — URL to download the plan as a shapefile
    - `blockassign_file` string, uri — URL to download the block assignment file for this plan
    - `notes` string — Explanatory notes about the plan, its history, or other relevant context
  - `features` DistrictFeature[], required — Array of district polygons
    - `type` 'Feature', required
    - `geometry` union, required
      - Polygon
        - `type` 'Polygon', required
        - `coordinates` array[], required
          - array[]
            - number[]
      - MultiPolygon
        - `type` 'MultiPolygon', required
        - `coordinates` array[], required
          - array[]
            - array[]
              - …
    - `properties` object, required
      - `Incumbent` 'R' | 'D' | 'O' — Incumbent party affiliation for more accurate predictions: - R: Republican incumbent - D: Democratic incumbent - O: Open seat (default)

## Response `200`

Plan uploaded successfully

- UploadResponse
  - `index_url` string, uri, required — Machine-readable JSON representation of the plan being scored. The response follows the structure defined in the PlanIndex schema.
  - `plan_url` string, uri, required — Human-readable web page with graphs and maps for the plan

## Other responses

- `400` — Bad request - invalid GeoJSON or plan data
- `401` — Authentication required

---

[API](https://skmtc.dev/planscore/apis/planscore-api.md) · [All operations](https://skmtc.dev/planscore/apis/planscore-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/planscore/planscore-api/revisions/124d888b2d0d/schema)
