# Correct a detected field (flywheel input)

> PATCH /api/v1/documents/{id}/fields/{fieldId}: Correct a detected field (flywheel input).

`PATCH https://appliflo.com/api/v1/documents/{id}/fields/{fieldId}`

Every key is optional; only the keys sent change. label, semanticType, bbox and fieldType correct the detection (each correction is kept as training input). help sets the box's help for the client, shown under its question when they fill it in (at most 160 characters after trimming, 422 beyond; null or blank removes it).

Send your API key in the `Authorization: Bearer` header. Every response is JSON: `{ success, data, error }`.

## Parameters

| Name | In | Required | Description |
| --- | --- | --- | --- |
| `id` | path | yes | Document id |
| `fieldId` | path | yes | Field id |

## Request body (application/json)

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `label` | string \| null | no | Up to 500 characters |
| `semanticType` | string | no | One of: date, phone, ssn, ein, currency, name, address, email, generic-text, checkbox, radio, signature, initials, comb |
| `bbox` | number[] | no | 4 to 4 items |
| `fieldType` | string | no | One of: text, checkbox, signature |
| `help` | string \| null | no | Help for the client under this box's question (0073): at most 160 characters after trimming; null or blank removes it. Up to 160 characters |

## Responses

| Status | Description |
| --- | --- |
| 200 | Corrected field. |
| 401 | Missing or invalid API key, or `api_key_expired` for a key past its expiry. |
| 403 | The API key's workspace does not have access to this resource, or `insufficient_scope` (with `required_scope`) for a key without the scope this route needs. |
| 404 | Resource not found in this workspace. |
| 422 | Request failed validation. |
| 500 | Internal error. |

## 200 response

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `success` | true | yes |  |
| `data` | object | yes | FieldSchema v2 (see architecture spec §2), snake_case wire keys |
| `data.id` | string | yes |  |
| `data.page` | integer | yes |  |
| `data.bbox` | number[] \| null | yes |  |
| `data.type` | string | yes |  |
| `data.label_text` | string \| null | yes |  |
| `data.semantic_type` | string | yes | One of: date, phone, ssn, ein, currency, name, address, email, generic-text, checkbox, radio, signature, initials, comb |
| `data.format` | string | no |  |
| `data.comb` | object | no |  |
| `data.comb.cells` | integer | no |  |
| `data.multiline` | boolean | no |  |
| `data.confidence` | number \| null | yes |  |
| `data.flagged` | boolean | yes |  |
| `data.source` | string | yes | One of: acroform, vision |
| `data.recipient_id` | string \| null | yes |  |
| `data.group_id` | string | no | The choice group (groups[].id) this box is an option of |
| `data.option_value` | string | no | What choosing this box stamps (the form's own on-state, e.g. "ms" or "2") |
| `data.option_label` | string | no | The option's printed text ("Ms", "C corporation") |
| `data.section` | string | no | The printed heading the field sits under |
| `data.label_source` | string | no | One of: page_text, tooltip, name, provider, llm, manual |
| `data.role_hint` | string | no | Who fills it by default: "signer" for a signature box and its date |
| `data.help` | string | no | Help for the client, shown under the box's question when they fill it in (absent: none) |

See also: [Errors](https://dev.appliflo.com/guides/errors), [Rate limits](https://dev.appliflo.com/guides/rate-limits), [Idempotency](https://dev.appliflo.com/guides/idempotency).
