---
title: "Save Form Route"
method: PUT
path: "/forms/{form_key}/route"
tags: ["Forms"]
---

# Save Form Route

`PUT /forms/{form_key}/route`

## Request

- Base URL: `https://be.graph8.com/api/v1`
- URL: `https://be.graph8.com/api/v1/forms/{form_key}/route`
- Auth: HTTP bearer

Set where this form's submissions go, and how its fields map.

SEND THE `expected_*` PRECONDITIONS. They are optimistic-concurrency
guards, not settings: without them the save is last-writer-wins and can
silently overwrite a colleague's route on a live form.

`workflow_policy` defaults to `disabled`. `simulate` records what WOULD
have run without running it, which is the safe way to turn automation on
for a form that is already receiving real submissions.

## Path parameters

- `form_key` string, required: Form key.

## Headers

- `Authorization` string, nullable
- `X-Target-Org-Id` string, nullable

## Request body

- FormRouteRequest: Save a form's route: where its submissions land, and how they map. `extra="forbid"` mirrors the app. An unknown key here is a typo in a caller's mapping, and silently dropping it would send submissions to the right list with the wrong fields.
  - `source_id` string, required
  - `target_list_id` integer, required: Audience list submissions land in.
  - `mapping` object[]: Form field -> graph8 field.
  - `defaults` object: Values applied to every submission.
  - `workflow_policy` 'disabled' | 'simulate' | 'enabled': Whether routed submissions trigger workflows. `simulate` records what WOULD have run without running it - the safe way to turn automation on for a live form. Defaults to `disabled`.
  - `expected_schema_version` integer, nullable: PRECONDITION, not a setting. The form schema version this mapping was built against; the save is rejected if the form has changed shape since. Omitting it saves a mapping against a schema you have not seen.
  - `schema_drift_approved` boolean: Save anyway when the schema HAS drifted. Deliberate override.
  - `expected_current_route_version` integer, nullable: PRECONDITION. The route version you are replacing. Without it the save is last-writer-wins and can silently overwrite a colleague's route.
  - `expected_route_history_version` integer, nullable: PRECONDITION on the route's history log.

## Response `200`

Successful Response

- ApiResponseFormPayload
  - `data` FormPayload, required: An open envelope for a form operational view. `overview`, `fields`, `placements`, `activity`, a route save result and a submission trace each return a different shape assembled from several upstreams. Pinning any of them would drop a field the moment one is added, and on a delivery-diagnostics surface a missing field reads as a missing delivery.
  - `pagination` PaginationMeta
    - `page` integer, required: Current page number (1-indexed)
    - `limit` integer, required: Items per page
    - `total` integer, required: Total number of items
    - `has_next` boolean, required: Whether there are more pages
    - `next_cursor` string, nullable: Opaque cursor for the next page; null when there are no more items. Pass it back as the `cursor` query param to fetch the following page without computing page numbers.
    - `total_available` integer, nullable: Search endpoints only: how many records really match, when known. Can be larger than `total`, which is capped at the 10,000 results that can be paged. For company search this is a distinct-company estimate. Null when unknown; absent outside search.
    - `total_is_lower_bound` boolean, nullable: Search endpoints only: true when more records match than `total` shows (the result set is larger than the 10,000 results that can be paged). Absent outside search.
    - `notes` string[], nullable: Search endpoints only: plain-language notes about the result, e.g. that more records match than can be paged, or that a reversed `between` range was put in order.

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/graph8/apis/graph8-developer-api.md) · [All operations](https://skmtc.dev/graph8/apis/graph8-developer-api/llms.txt) · [OpenAPI document](https://skmtc.dev/graph8/apis/graph8-developer-api/revisions/2e7cfa0ca921?raw)
