> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://reference.flatfile.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://reference.flatfile.com/_mcp/server.

# Update a job's plan

PATCH https://api.x.flatfile.com/v1/jobs/{jobId}/plan
Content-Type: application/json

Update one or more individual fields on a job's execution plan

Reference: https://reference.flatfile.com/api-reference/jobs/update-execution-plan-fields

## Authentication

- `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer <token>`, where token is your auth token.

## Request

### Path parameters

- `jobId` (string, required) — ID of job to return

### Body (application/json)

This endpoint expects a JobExecutionPlanConfigRequest.

- `fieldMapping` (list of Edge, optional)
- `fileId` (string, optional) — File ID
- `jobId` (string, optional) — Pipeline Job ID
- `programId` (string, optional)
- `unmappedDestinationFields` (list of DestinationField, optional)
- `unmappedSourceFields` (list of SourceField, optional)

## Response

### 200

- `data` (JobPlan, required) — The job/plan tuple that contains the full plan and the jobs status

## Types

### Edge

- `sourceField` (Property, required) — The description of the source field
- `destinationField` (Property, required) — The description of the destination field
- `preview` (list of string, optional) — A list of preview values of the data in the destination field
- `enumDetails` (EnumDetails, optional) — Only available if one or more of the destination fields is of type enum. Provides category mapping.
- `metadata` (Metadata, optional) — Metadata about the edge

### DestinationField

- `destinationField` (Property, required) — The description of the destination field
- `preview` (list of string, optional) — A list of preview values of the data in the destination field

### SourceField

- `sourceField` (Property, required) — The description of the source field
- `preview` (list of string, optional) — A list of preview values of the data in the source field

### JobPlan

The job/plan tuple that contains the full plan and the jobs status

- `job` (Job, required) — A single unit of work that will execute asynchronously
- `plan` (JobExecutionPlan, required) — The execution plan for a job, for example, for a map job, the execution plan is the mapping of the source sheet to the destination sheet.

### Property

- `type`: `string`
  - `key` (string, required)
  - `actions` (list of Action, optional) — An array of actions that end users can perform on this Column.
  - `alternativeNames` (list of string, optional)
  - `appearance` (FieldAppearance, optional) — Control the appearance of this field when it's displayed in a table or input
  - `config` (StringConfig, optional)
  - `constraints` (list of Constraint, optional) — A list of constraints that should be applied to this field. This is limited to a maximum of 10 constraints and all external and stored constraints must have unique validator values.
  - `description` (string, optional) — A short description of the field. Markdown syntax is supported.
  - `label` (string, optional) — User friendly field name
  - `metadata` (any, optional) — Useful for any contextual metadata regarding the schema. Store any valid json here.
  - `readonly` (boolean, optional)
  - `treatments` (list of string, optional) — A unique presentation for a field in the UI.
- `type`: `number`
  - `key` (string, required)
  - `actions` (list of Action, optional) — An array of actions that end users can perform on this Column.
  - `alternativeNames` (list of string, optional)
  - `appearance` (FieldAppearance, optional) — Control the appearance of this field when it's displayed in a table or input
  - `config` (NumberConfig, optional)
  - `constraints` (list of Constraint, optional) — A list of constraints that should be applied to this field. This is limited to a maximum of 10 constraints and all external and stored constraints must have unique validator values.
  - `description` (string, optional) — A short description of the field. Markdown syntax is supported.
  - `label` (string, optional) — User friendly field name
  - `metadata` (any, optional) — Useful for any contextual metadata regarding the schema. Store any valid json here.
  - `readonly` (boolean, optional)
  - `treatments` (list of string, optional) — A unique presentation for a field in the UI.
  - `isArray` (boolean, optional, deprecated) — Will allow multiple values and store as an array. Use enum-list type instead.
- `type`: `boolean`
  - `key` (string, required)
  - `actions` (list of Action, optional) — An array of actions that end users can perform on this Column.
  - `alternativeNames` (list of string, optional)
  - `appearance` (FieldAppearance, optional) — Control the appearance of this field when it's displayed in a table or input
  - `config` (BooleanPropertyConfig, optional)
  - `constraints` (list of Constraint, optional) — A list of constraints that should be applied to this field. This is limited to a maximum of 10 constraints and all external and stored constraints must have unique validator values.
  - `description` (string, optional) — A short description of the field. Markdown syntax is supported.
  - `label` (string, optional) — User friendly field name
  - `metadata` (any, optional) — Useful for any contextual metadata regarding the schema. Store any valid json here.
  - `readonly` (boolean, optional)
  - `treatments` (list of string, optional) — A unique presentation for a field in the UI.
- `type`: `date`
  - `key` (string, required)
  - `actions` (list of Action, optional) — An array of actions that end users can perform on this Column.
  - `alternativeNames` (list of string, optional)
  - `appearance` (FieldAppearance, optional) — Control the appearance of this field when it's displayed in a table or input
  - `constraints` (list of Constraint, optional) — A list of constraints that should be applied to this field. This is limited to a maximum of 10 constraints and all external and stored constraints must have unique validator values.
  - `description` (string, optional) — A short description of the field. Markdown syntax is supported.
  - `label` (string, optional) — User friendly field name
  - `metadata` (any, optional) — Useful for any contextual metadata regarding the schema. Store any valid json here.
  - `readonly` (boolean, optional)
  - `treatments` (list of string, optional) — A unique presentation for a field in the UI.
- `type`: `enum`
  - `config` (EnumPropertyConfig, required)
  - `key` (string, required)
  - `actions` (list of Action, optional) — An array of actions that end users can perform on this Column.
  - `alternativeNames` (list of string, optional)
  - `appearance` (FieldAppearance, optional) — Control the appearance of this field when it's displayed in a table or input
  - `constraints` (list of Constraint, optional) — A list of constraints that should be applied to this field. This is limited to a maximum of 10 constraints and all external and stored constraints must have unique validator values.
  - `description` (string, optional) — A short description of the field. Markdown syntax is supported.
  - `label` (string, optional) — User friendly field name
  - `metadata` (any, optional) — Useful for any contextual metadata regarding the schema. Store any valid json here.
  - `readonly` (boolean, optional)
  - `treatments` (list of string, optional) — A unique presentation for a field in the UI.
  - `isArray` (boolean, optional, deprecated) — Will allow multiple values and store as an array. Use enum-list type instead.
  - `multi` (boolean, optional, deprecated) — Will allow multiple values and store / provide the values in an array if set. Not all field types support arrays. Use enum-list type instead.
- `type`: `reference`
  - `config` (ReferencePropertyConfig, required)
  - `key` (string, required)
  - `actions` (list of Action, optional) — An array of actions that end users can perform on this Column.
  - `alternativeNames` (list of string, optional)
  - `appearance` (FieldAppearance, optional) — Control the appearance of this field when it's displayed in a table or input
  - `constraints` (list of Constraint, optional) — A list of constraints that should be applied to this field. This is limited to a maximum of 10 constraints and all external and stored constraints must have unique validator values.
  - `description` (string, optional) — A short description of the field. Markdown syntax is supported.
  - `label` (string, optional) — User friendly field name
  - `metadata` (any, optional) — Useful for any contextual metadata regarding the schema. Store any valid json here.
  - `readonly` (boolean, optional)
  - `treatments` (list of string, optional) — A unique presentation for a field in the UI.
  - `isArray` (boolean, optional, deprecated) — Will allow multiple values and store as an array. Use enum-list type instead.
- `type`: `reference-list`
  - `config` (ReferenceListPropertyConfig, required)
  - `key` (string, required)
  - `actions` (list of Action, optional) — An array of actions that end users can perform on this Column.
  - `alternativeNames` (list of string, optional)
  - `appearance` (FieldAppearance, optional) — Control the appearance of this field when it's displayed in a table or input
  - `constraints` (list of Constraint, optional) — A list of constraints that should be applied to this field. This is limited to a maximum of 10 constraints and all external and stored constraints must have unique validator values.
  - `description` (string, optional) — A short description of the field. Markdown syntax is supported.
  - `label` (string, optional) — User friendly field name
  - `metadata` (any, optional) — Useful for any contextual metadata regarding the schema. Store any valid json here.
  - `readonly` (boolean, optional)
  - `treatments` (list of string, optional) — A unique presentation for a field in the UI.
  - `isArray` (boolean, optional, deprecated) — Will allow multiple values and store as an array. Use enum-list type instead.
- `type`: `string-list`
  - `key` (string, required)
  - `actions` (list of Action, optional) — An array of actions that end users can perform on this Column.
  - `alternativeNames` (list of string, optional)
  - `appearance` (FieldAppearance, optional) — Control the appearance of this field when it's displayed in a table or input
  - `constraints` (list of Constraint, optional) — A list of constraints that should be applied to this field. This is limited to a maximum of 10 constraints and all external and stored constraints must have unique validator values.
  - `description` (string, optional) — A short description of the field. Markdown syntax is supported.
  - `label` (string, optional) — User friendly field name
  - `metadata` (any, optional) — Useful for any contextual metadata regarding the schema. Store any valid json here.
  - `readonly` (boolean, optional)
  - `treatments` (list of string, optional) — A unique presentation for a field in the UI.
- `type`: `enum-list`
  - `config` (EnumPropertyConfig, required)
  - `key` (string, required)
  - `actions` (list of Action, optional) — An array of actions that end users can perform on this Column.
  - `alternativeNames` (list of string, optional)
  - `appearance` (FieldAppearance, optional) — Control the appearance of this field when it's displayed in a table or input
  - `constraints` (list of Constraint, optional) — A list of constraints that should be applied to this field. This is limited to a maximum of 10 constraints and all external and stored constraints must have unique validator values.
  - `description` (string, optional) — A short description of the field. Markdown syntax is supported.
  - `label` (string, optional) — User friendly field name
  - `metadata` (any, optional) — Useful for any contextual metadata regarding the schema. Store any valid json here.
  - `readonly` (boolean, optional)
  - `treatments` (list of string, optional) — A unique presentation for a field in the UI.

### EnumDetails

Only available if one or more of the destination fields is of type enum. Provides category mapping.

- `mapping` (list of CategoryMapping, required) — The mapping of source values to destination values
- `unusedSourceValues` (list of EnumValue, optional) — A list of source values that are not mapped from
- `unusedDestinationValues` (list of EnumValue, optional) — A list of destination values that are not mapped to

### Metadata

- `certainty` (enum, optional)
  - Allowed values: `absolute`, `strong`, `moderate`, `weak`
- `confidence` (double, optional)
- `source` (string, optional)
- `detectedDelimiter` (string, optional)

### Job

A single unit of work that will execute asynchronously

- `createdAt` (datetime, required) — Date the item was created
- `createdBy` (string, required) — The user, guest, or agent who created the job
- `id` (string, required) — Pipeline Job ID
- `operation` (string, required) — the type of operation to perform on the data. For example, "export".
- `source` (string, required) — The id of a file, workbook, sheet, or app
- `type` (enum, required) — The type of job
  - Allowed values: `file`, `workbook`, `sheet`, `space`, `document`, `app`, `agent`, `autobuild`, `onboarding`
- `updatedAt` (datetime, required) — Date the item was last updated
- `config` (JobUpdateConfig, optional)
- `destination` (string, optional) — The id of the workbook where extracted file data will be sent
- `environmentId` (string, optional) — The id of the environment this job belongs to
- `fileId` (string, optional) — File ID
- `finishedAt` (datetime, optional) — the time that the job finished at
- `info` (string, optional) — Current status of job in text
- `input` (map from string to any, optional) — Input parameters for this job type.
- `managed` (boolean, optional) — Indicates if Flatfile is managing the control flow of this job or if it is being manually tracked.
- `metadata` (map from string to any, optional) — Additional metadata for the job
- `mode` (enum, optional) — the mode of the job
  - Allowed values: `foreground`, `background`, `toolbarBlocking`, `hidden`
- `outcome` (map from string to any, optional) — Outcome summary of job.
- `outcomeAcknowledgedAt` (datetime, optional) — the time that the job's outcome has been acknowledged by a user
- `parentId` (string, optional) — The id of the parent job
- `part` (integer, optional) — The part number of this job
- `partData` (map from string to any, optional) — The data for this part of the job
- `partExecution` (enum, optional) — The execution mode for this part of the job
  - Allowed values: `sequential`, `parallel`
- `predecessorIds` (list of string, optional) — The ids of the jobs that must complete before this job can start
- `progress` (integer, optional) — the progress of the job. Whole number between 0 and 100
- `result` (map from string to any, optional) — Information computed during job execution can be stored here
- `spaceId` (string, optional) — The id of the space this job belongs to
- `startedAt` (datetime, optional) — the time that the job started at
- `status` (enum, optional) — the status of the job
  - Allowed values: `created`, `planning`, `scheduled`, `ready`, `executing`, `complete`, `failed`, `canceled`, `waiting`
- `subject` (JobSubject, optional) — Subject parameters for this job type.
- `trigger` (enum, optional) — the type of trigger to use for this job
  - Allowed values: `manual`, `immediate`

### JobExecutionPlan

The execution plan for a job, for example, for a map job, the execution plan is the mapping of the source sheet to the destination sheet.

- `fieldMapping` (list of Edge, required)
- `unmappedSourceFields` (list of SourceField, required)
- `unmappedDestinationFields` (list of DestinationField, required)
- `programId` (string, optional)

### Action

- `label` (string, required) — The text on the Button itself
- `confirm` (boolean, optional) — Whether to show a modal to confirm the action
- `constraints` (list of ActionConstraint, optional) — A limitation or restriction on the action.
- `createdFrom` (string, optional) — The action that this action was cloned from
- `deletedAt` (datetime, optional) — The time this action was deleted
- `description` (string, optional) — The text that appears in the dialog after the action is clicked.
- `guardrail` (Guardrail, optional)
- `guide` (Guide, optional)
- `icon` (string, optional) — Icon will work on primary actions. It will only accept an already existing Flatfile design system icon.
- `inputForm` (InputForm, optional) — Adds an input form for this action after it is clicked.
- `invalidConditionalMessaging` (boolean, optional) — When enabled, shows dynamic confirmation messages based on record validation status instead of the static description
- `invalidRecordsMessage` (string, optional) — Custom message to show when there are invalid records (only used when invalidConditionalMessaging is true)
- `lastPropagatedAt` (datetime, optional) — The last time this action was propagated to a workbook
- `messages` (list of ActionMessage, optional)
- `mode` (enum, optional) — Foreground and toolbarBlocking action mode will prevent interacting with the resource until complete
  - Allowed values: `foreground`, `background`, `toolbarBlocking`
- `mount` (ActionMount, optional)
- `operation` (string, optional) — This will become the job operation that is triggered
- `primary` (boolean, optional) — A primary action will be more visibly present, whether in Sheet or Workbook.
- `schedule` (enum, optional) — Determines if the action should happen on a regular cadence.
  - Allowed values: `weekly`, `daily`, `hourly`
- `tooltip` (string, optional) — A tooltip that appears when hovering the action button
- `type` (string, optional) — **This is deprecated.**
- `validRecordsMessage` (string, optional) — Custom message to show when all records are valid (only used when invalidConditionalMessaging is true)
- `requireAllValid` (boolean, optional, deprecated) — **This is deprecated. Use `constraints` instead.**
- `requireSelection` (boolean, optional, deprecated) — **This is deprecated. Use `constraints` instead.**
- `slug` (string, optional, deprecated) — **This is deprecated. Use `operation` instead.**

### FieldAppearance

Control the appearance of this field when it's displayed in a table or input

- `size` (enum, optional) — The default visual sizing. This sizing may be overridden by a user
  - Allowed values: `xs`, `s`, `m`, `l`, `xl`

### StringConfig

- `size` (enum, required) — How much text should be storeable in this field
  - Allowed values: `tiny`, `normal`, `medium`, `long`

### Constraint

- `type`: `required`
  - `config` (RequiredConstraintConfig, optional)
- `type`: `unique`
  - `config` (UniqueConstraintConfig, optional)
- `type`: `computed`
- `type`: `external`
  - `validator` (string, required)
  - `config` (any, optional)
  - `description` (string, optional) — A full description of what this constraint configuration does
  - `label` (string, optional) — A short description of what this constraint constraint should do, example - values between 1 and 100
- `type`: `stored`
  - `validator` (string, required) — Must match the constraint validator name.
  - `config` (any, optional)
  - `description` (string, optional) — A full description of what this constraint configuration does
  - `label` (string, optional) — A short description of what this constraint constraint should do, example - values between 1 and 100
  - `version` (integer, optional) — The version of the stored constraint to use. (Defaults to version 1.)

### NumberConfig

- `decimalPlaces` (integer, optional, deprecated) — Number of decimal places to round data to

### BooleanPropertyConfig

- `allowIndeterminate` (boolean, required) — Allow a neither true or false state to be stored as `null`

### EnumPropertyConfig

- `options` (list of EnumPropertyOption, required)
- `allowCustom` (boolean, optional) — Permit the user to create new options for this specific field.
- `sortBy` (enum, optional) — Sort the options by the value of this property. Defaults to `label`.
  - Allowed values: `label`, `value`, `ordinal`

### ReferencePropertyConfig

- `ref` (string, required) — Full path reference to a sheet configuration. Must be in the same workbook.
- `key` (string, required) — Key of the property to use as the reference key. Defaults to `id`
- `filter` (ReferenceFilter, optional) — Optional filter to narrow the set of records in the reference sheet used as valid values
- `relationship` (enum, optional, deprecated) — The type of relationship this defines
  - Allowed values: `has-one`, `has-many`

### ReferenceListPropertyConfig

- `ref` (string, required) — Full path reference to a sheet configuration. Must be in the same workbook.
- `key` (string, required) — Key of the property to use as the reference key. Defaults to `id`
- `filter` (ReferenceFilter, optional) — Optional filter to narrow the set of records in the reference sheet used as valid values

### CategoryMapping

- `sourceValue` (EnumValue, optional) — The source value to map from
- `destinationValue` (EnumValue, optional) — The destination value to map to

### EnumValue

### JobUpdateConfig

### JobSubject

Subject parameters for this job type

- `type`: `resource`
  - `id` (string, required)
- `type`: `collection`
  - `resource` (string, required)
  - `params` (map from string to any, optional)
  - `query` (map from string to any, optional)

### ActionConstraint

- `type`: `hasAllValid`
  - `ignoreSelection` (boolean, optional)
- `type`: `hasSelection`
- `type`: `hasData`
- `type`: `hasColumnEnabled`

### Guardrail

- `content` (string, required) — Markdown guardrail for this action

### Guide

- `content` (string, required) — Markdown guidance for this action

### InputForm

- `type` (enum, required)
  - Allowed values: `simple`
- `fields` (list of InputField, required)

### ActionMessage

- `type` (enum, required)
  - Allowed values: `error`, `info`
- `content` (string, required)

### ActionMount

- `type`: `sheet`
  - `slugs` (list of string, optional)
- `type`: `workbook`
  - `slugs` (list of string, optional)
- `type`: `field`
  - `keys` (list of string, optional)
- `type`: `document`
- `type`: `file`

### RequiredConstraintConfig

- `message` (string, optional) — Custom validation message to display when the constraint fails
- `level` (enum, optional) — Validation level (error, warn, info). Defaults to error.
  - Allowed values: `error`, `warn`, `info`

### UniqueConstraintConfig

- `caseSensitive` (boolean, optional) — Ignore casing when determining uniqueness
- `ignoreEmpty` (boolean, optional) — Do not flag empty values as duplicate
- `message` (string, optional) — Custom validation message to display when the constraint fails
- `level` (enum, optional) — Validation level (error, warn, info). Defaults to error.
  - Allowed values: `error`, `warn`, `info`

### EnumPropertyOption

- `value` (any, required) — The value or ID of this option. This value will be sent in egress. The type is a string | integer | boolean.
- `label` (string, optional) — A visual label for this option
- `description` (string, optional) — A short description for this option
- `color` (string, optional) — An optional color to assign this option
- `icon` (string, optional) — A reference pointer to a previously registered icon
- `meta` (map from string to any, optional) — An arbitrary JSON object to be associated with this option and made available to hooks
- `alternativeNames` (list of string, optional) — Alternative names to match this enum option to
- `ordinal` (integer, optional) — The order of this option in the list. SortBy must be set to `ordinal` to use this.

### ReferenceFilter

If provided, the reference filter will narrow the set of records in the reference sheet used as the set of valid values for the record. Only rows where the value in the reference sheet's refField matches the value in this record's recordField will be used.

- `refField` (string, required) — The field key of the reference sheet to filter with
- `recordField` (string, required) — The field key of the record used to filter the reference field

### DeleteRecordsJobConfig

The configuration for a delete job

- `sheet` (string, required) — Sheet ID
- `filter` (enum, optional) — Options to filter records (default=none)
  - Allowed values: `valid`, `error`, `all`, `none`
- `filterField` (string, optional) — Use this to narrow the valid/error filter results to a specific field (Requires filter to be set)
- `searchValue` (string, optional) — Search for the given value, returning matching rows. For exact matches, wrap the value in double quotes ("Bob"). To search for null values, send empty double quotes ("")
- `searchField` (string, optional) — Use this to narrow the searchValue results to a specific field
- `q` (string, optional) — FFQL query to filter records
- `exceptions` (list of string, optional) — List of record ids to exclude from deletion
- `snapshotLabel` (string, optional) — If specified, a snapshot will be generated with this label

### FileJobConfig

- `driver` (enum, required) — The driver to use for extracting data from the file
  - Allowed values: `csv`
- `options` (map from string to any, optional) — The options to use for extracting data from the file
- `detectedHeaderRow` (integer, optional) — The row number of the header row detected at extraction time

### PipelineJobConfig

- `sourceSheetId` (string, required) — Sheet ID
- `destinationSheetId` (string, required) — Sheet ID
- `runbookId` (string, optional) — Runbook ID

### ExportJobConfig

- `options` (ExportOptions, required)

### MutateJobConfig

- `sheetId` (string, required) — Sheet ID
- `mutateRecord` (string, required) — A JavaScript function that will be run on each record in the sheet, it should return a mutated record.
- `mutationId` (string, optional) — If the mutation was generated through some sort of id-ed process, this links this job and that process.
- `snapshotLabel` (string, optional) — If specified, a snapshot will be generated with this label
- `snapshotId` (string, optional) — The generated snapshotId will be stored here
- `filter` (enum, optional) — Options to filter records
  - Allowed values: `valid`, `error`, `all`, `none`
- `filterField` (string, optional) — Use this to narrow the valid/error filter results to a specific field
- `searchValue` (string, optional) — Search for the given value, returning matching rows. For exact matches, wrap the value in double quotes ("Bob"). To search for null values, send empty double quotes ("")
- `searchField` (string, optional) — Use this to narrow the searchValue results to a specific field
- `q` (string, optional)
- `ids` (list of string, optional) — The Record Ids param (ids) is a list of record ids that can be passed to several record endpoints allowing the user to identify specific records to INCLUDE in the query, or specific records to EXCLUDE, depending on whether or not filters are being applied. When passing a query param that filters the record dataset, such as 'searchValue', or a 'filter' of 'valid' | 'error' | 'all', the 'ids' param will EXCLUDE those records from the filtered results. For basic queries that do not filter the dataset, passing record ids in the 'ids' param will limit the dataset to INCLUDE just those specific records

### FindAndReplaceJobConfig

- `fieldKey` (string, required) — A unique key used to identify a field in a sheet
- `filter` (enum, optional) — The filter to apply to the records
  - Allowed values: `valid`, `error`, `all`, `none`
- `filterField` (string, optional) — The field to filter on
- `searchValue` (string, optional) — The value to search for
- `searchField` (string, optional) — The field to search for the search value in
- `q` (string, optional) — The FFQL query to filter records
- `ids` (list of string, optional) — The Record Ids param (ids) is a list of record ids that can be passed to several record endpoints allowing the user to identify specific records to INCLUDE in the query, or specific records to EXCLUDE, depending on whether or not filters are being applied. When passing a query param that filters the record dataset, such as 'searchValue', or a 'filter' of 'valid' | 'error' | 'all', the 'ids' param will EXCLUDE those records from the filtered results. For basic queries that do not filter the dataset, passing record ids in the 'ids' param will limit the dataset to INCLUDE just those specific records
- `find` (CellValueUnion, optional) — A value to find for a given field in a sheet. Wrap the value in "" for exact match
- `replace` (CellValueUnion, optional) — The value to replace found values with
- `snapshotLabel` (string, optional) — If specified, a snapshot will be generated with this label

### MappingProgramJobConfig

- `sourceSheetId` (string, required) — Sheet ID
- `destinationSheetId` (string, required) — Sheet ID
- `mappingRules` (list of map from string to any, required)
- `canRecompute` (boolean, optional)

### AiGenerateBlueprintJobConfig

- `spaceId` (string, required) — Space ID
- `appId` (string, required) — App ID

### AiGenerateSampleDataJobConfig

- `spaceId` (string, required) — Space ID
- `appId` (string, required) — App ID

### AiGenerateBlueprintConstraintsJobConfig

- `spaceId` (string, required) — Space ID
- `workbookId` (string, required) — Workbook ID

### AiGenerateConstraintJobConfig

- `spaceId` (string, required) — Space ID
- `constraints` (list of StoredConstraint, required)
- `description` (string, optional) — A description of what the constraint to be generated should do

### AiRuleCreationJobConfig

Configuration for AI-powered rule creation jobs that generate or replace field constraints

- `prompt` (string, required) — The natural language description of the rule to be created
- `sheetId` (string, required) — The ID of the sheet containing the field to create/update the rule for
- `fieldKey` (string, required) — The key of the field to create/update the rule for
- `label` (string, optional) — Display name for the rule to be created
- `index` (integer, optional) — To edit an existing rule, provide the index of the constraint in the constraints array for the field and that constraint will be replaced.

### CaptureRoutineJobConfig

- `sourceJobId` (string, required) — Pipeline Job ID
- `runbookId` (string, required) — Runbook ID

### RunRunbookJobConfig

- `sourceSheetId` (string, required) — Sheet ID
- `runbookId` (string, required) — Runbook ID

### MappingFromPreprocessingJobConfig

- `proposal` (any, required)
- `mappingJobId` (string, required) — Pipeline Job ID

### EmptyObject

### AddRecordsToDataClipJobConfig

The configuration for an add records to DataClip job

- `dataClipId` (string, required) — Data Clip ID
- `sheetId` (string, required) — Sheet ID

### UpdateDataClipResolutionsJobConfig

Configuration for a data clip resolution job

- `clipId` (string, required) — The ID of the data clip to resolve
- `clippedSheetId` (string, required) — The ID of the sheet that contains the data clip
- `resolveTo` (enum, required)
  - Allowed values: `clip`, `main`, `snapshot`
- `removedFromMainResolution` (enum, required)
  - Allowed values: `ignore`, `restore`
- `columnField` (string, required) — Optional. If provided, only this column will be resolved.
- `columnValue` (string, required) — Optional. If provided, this value in the column will be replaced with the resolution target.

### AgentExportJobConfig

The configuration for an agent export job

- `exportType` (enum, required) — The different export type formats available.
  - Allowed values: `AUTOBUILD_INLINED`, `SYSTEM_COMBINED`, `SOURCE`

### AgentPromotionJobConfig

The configuration for an agent promotion job

- `targetEnvironmentId` (string, required) — The environment ID where the agent should be promoted
- `spaceId` (string, required) — The space ID where the agent is being promoted from

### CompanyResearchJobConfig

The configuration for a company research job

- `onboardingId` (string, required) — The onboarding id
- `url` (string, optional) — The url of the company to research
- `companyName` (string, optional) — The name of the company to research

### ConfigureDemoJobConfig

The configuration for an onboarding job

- `companyName` (string, required) — The name of the company

### BulkMutateFlagsJobConfig

The configuration for a bulk flag mutation job

- `workbookId` (string, required) — The workbook to perform flag mutations on
- `mutation` (FlagMutationConfig, required) — The flag mutation configuration
- `exceptions` (list of string, optional) — Record IDs to exclude from the operation
- `query` (string, optional) — Query string to filter records
- `filter` (any, optional) — Filter object to apply to records
- `filterField` (string, optional) — Field to filter on
- `searchValue` (string, optional) — Value to search for
- `searchField` (string, optional) — Field to search in
- `q` (string, optional) — General search query
- `ids` (list of string, optional) — Specific record IDs to target
- `snapshotLabel` (string, optional) — Label for snapshot before mutation

### InputField

- `key` (string, required) — Unique key for a Field.
- `label` (string, required) — Visible name of a Field.
- `type` (string, required) — Field Types inform the user interface how to sort and display data.
- `description` (string, optional) — Brief description below the name of the Field.
- `defaultValue` (any, optional) — Default value for a Field.
- `config` (InputConfig, optional) — Additional configuration for enum Fields.
- `constraints` (list of InputConstraint, optional) — Indicate additional validations that will be applied to the Field.

### ExportOptions

- `versionId` (string, optional) — Deprecated, use `commitId` instead
- `commitId` (string, optional) — If provided, the snapshot version of the workbook will be used for the export
- `sortField` (string, optional) — The field to sort the records on
- `sortDirection` (enum, optional) — The direction to sort the records
  - Allowed values: `asc`, `desc`
- `filter` (enum, optional) — The filter to apply to the records
  - Allowed values: `valid`, `error`, `all`, `none`
- `filterField` (string, optional) — The field to filter on
- `searchValue` (string, optional) — The value to search for
- `searchField` (string, optional) — The field to search for the search value in
- `q` (string, optional) — The FFQL query to filter records
- `ids` (list of string, optional) — The Record Ids param (ids) is a list of record ids that can be passed to several record endpoints allowing the user to identify specific records to INCLUDE in the query, or specific records to EXCLUDE, depending on whether or not filters are being applied. When passing a query param that filters the record dataset, such as 'searchValue', or a 'filter' of 'valid' | 'error' | 'all', the 'ids' param will EXCLUDE those records from the filtered results. For basic queries that do not filter the dataset, passing record ids in the 'ids' param will limit the dataset to INCLUDE just those specific records

### CellValueUnion

### StoredConstraint

- `validator` (string, required) — Must match the constraint validator name.
- `version` (integer, optional) — The version of the stored constraint to use. (Defaults to version 1.)
- `description` (string, optional) — A full description of what this constraint configuration does
- `label` (string, optional) — A short description of what this constraint constraint should do, example - values between 1 and 100
- `config` (any, optional)

### FlagMutationConfig

Configuration for flag mutation operations

- `type` ("flag", required) — The type of mutation (always "flag")
- `operation` (enum, required) — The operation to perform
  - Allowed values: `apply`, `update`, `delete`, `replace`
- `flag` (FlagMutationConfigData, required) — The flag data for the operation
- `flags` (list of string, optional) — Array of flag slugs for delete operation

### InputConfig

- `options` (list of InputEnumPropertyOption, required)

### InputConstraint

- `type` (enum, required)
  - Allowed values: `required`

### FlagMutationConfigData

Flag data for mutation operations

- `slug` (string, required) — The flag slug
- `label` (string, optional) — The flag label
- `colorHex` (string, optional) — The flag color in hex format

### InputEnumPropertyOption

- `value` (any, required) — The value or ID of this option. This value will be sent in egress. The type is a string | integer | boolean.
- `label` (string, optional) — A visual label for this option, defaults to value if not provided
- `description` (string, optional) — A short description for this option
- `color` (string, optional) — An optional color to assign this option
- `icon` (string, optional) — A reference pointer to a previously registered icon
- `meta` (map from string to any, optional) — An arbitrary JSON object to be associated with this option and made available to hooks

## Examples

**Request**

```json
{}
```

**Response**

```json
{
  "data": {
    "job": {
      "createdAt": "2024-01-15T09:30:00Z",
      "createdBy": "createdBy",
      "id": "id",
      "operation": "operation",
      "source": "source",
      "type": "file",
      "updatedAt": "2024-01-15T09:30:00Z",
      "config": {
        "filter": "valid",
        "filterField": "filterField",
        "searchValue": "searchValue",
        "searchField": "searchField",
        "q": "q",
        "sheet": "sheet",
        "exceptions": [
          "exceptions",
          "exceptions"
        ],
        "snapshotLabel": "snapshotLabel"
      },
      "destination": "destination",
      "environmentId": "environmentId",
      "fileId": "fileId",
      "finishedAt": "2024-01-15T09:30:00Z",
      "info": "info",
      "input": {
        "input": {
          "key": "value"
        }
      },
      "managed": true,
      "metadata": {
        "metadata": {
          "key": "value"
        }
      },
      "mode": "foreground",
      "outcome": {
        "outcome": {
          "key": "value"
        }
      },
      "outcomeAcknowledgedAt": "2024-01-15T09:30:00Z",
      "parentId": "parentId",
      "part": 1,
      "partData": {
        "partData": {
          "key": "value"
        }
      },
      "partExecution": "sequential",
      "predecessorIds": [
        "predecessorIds",
        "predecessorIds"
      ],
      "progress": 1,
      "result": {
        "result": {
          "key": "value"
        }
      },
      "spaceId": "spaceId",
      "startedAt": "2024-01-15T09:30:00Z",
      "status": "created",
      "subject": {
        "type": "resource",
        "id": "id"
      },
      "trigger": "manual"
    },
    "plan": {
      "fieldMapping": [
        {
          "sourceField": {
            "type": "string",
            "key": "key",
            "actions": [
              {
                "label": "label"
              },
              {
                "label": "label"
              }
            ],
            "alternativeNames": [
              "alternativeNames",
              "alternativeNames"
            ],
            "appearance": {
              "size": "xs"
            },
            "config": {
              "size": "tiny"
            },
            "constraints": [
              {
                "type": "required"
              },
              {
                "type": "required"
              }
            ],
            "description": "description",
            "label": "label",
            "metadata": {
              "key": "value"
            },
            "readonly": true,
            "treatments": [
              "treatments",
              "treatments"
            ]
          },
          "destinationField": {
            "type": "string",
            "key": "key",
            "actions": [
              {
                "label": "label"
              },
              {
                "label": "label"
              }
            ],
            "alternativeNames": [
              "alternativeNames",
              "alternativeNames"
            ],
            "appearance": {
              "size": "xs"
            },
            "config": {
              "size": "tiny"
            },
            "constraints": [
              {
                "type": "required"
              },
              {
                "type": "required"
              }
            ],
            "description": "description",
            "label": "label",
            "metadata": {
              "key": "value"
            },
            "readonly": true,
            "treatments": [
              "treatments",
              "treatments"
            ]
          },
          "preview": [
            "preview",
            "preview"
          ],
          "enumDetails": {
            "mapping": [
              {},
              {}
            ],
            "unusedSourceValues": [
              "unusedSourceValues",
              "unusedSourceValues"
            ],
            "unusedDestinationValues": [
              "unusedDestinationValues",
              "unusedDestinationValues"
            ]
          },
          "metadata": {
            "certainty": "absolute",
            "confidence": 1.1,
            "source": "source",
            "detectedDelimiter": "detectedDelimiter"
          }
        },
        {
          "sourceField": {
            "type": "string",
            "key": "key",
            "actions": [
              {
                "label": "label"
              },
              {
                "label": "label"
              }
            ],
            "alternativeNames": [
              "alternativeNames",
              "alternativeNames"
            ],
            "appearance": {
              "size": "xs"
            },
            "config": {
              "size": "tiny"
            },
            "constraints": [
              {
                "type": "required"
              },
              {
                "type": "required"
              }
            ],
            "description": "description",
            "label": "label",
            "metadata": {
              "key": "value"
            },
            "readonly": true,
            "treatments": [
              "treatments",
              "treatments"
            ]
          },
          "destinationField": {
            "type": "string",
            "key": "key",
            "actions": [
              {
                "label": "label"
              },
              {
                "label": "label"
              }
            ],
            "alternativeNames": [
              "alternativeNames",
              "alternativeNames"
            ],
            "appearance": {
              "size": "xs"
            },
            "config": {
              "size": "tiny"
            },
            "constraints": [
              {
                "type": "required"
              },
              {
                "type": "required"
              }
            ],
            "description": "description",
            "label": "label",
            "metadata": {
              "key": "value"
            },
            "readonly": true,
            "treatments": [
              "treatments",
              "treatments"
            ]
          },
          "preview": [
            "preview",
            "preview"
          ],
          "enumDetails": {
            "mapping": [
              {},
              {}
            ],
            "unusedSourceValues": [
              "unusedSourceValues",
              "unusedSourceValues"
            ],
            "unusedDestinationValues": [
              "unusedDestinationValues",
              "unusedDestinationValues"
            ]
          },
          "metadata": {
            "certainty": "absolute",
            "confidence": 1.1,
            "source": "source",
            "detectedDelimiter": "detectedDelimiter"
          }
        }
      ],
      "unmappedSourceFields": [
        {
          "sourceField": {
            "type": "string",
            "key": "key",
            "actions": [
              {
                "label": "label"
              },
              {
                "label": "label"
              }
            ],
            "alternativeNames": [
              "alternativeNames",
              "alternativeNames"
            ],
            "appearance": {
              "size": "xs"
            },
            "config": {
              "size": "tiny"
            },
            "constraints": [
              {
                "type": "required"
              },
              {
                "type": "required"
              }
            ],
            "description": "description",
            "label": "label",
            "metadata": {
              "key": "value"
            },
            "readonly": true,
            "treatments": [
              "treatments",
              "treatments"
            ]
          },
          "preview": [
            "preview",
            "preview"
          ]
        },
        {
          "sourceField": {
            "type": "string",
            "key": "key",
            "actions": [
              {
                "label": "label"
              },
              {
                "label": "label"
              }
            ],
            "alternativeNames": [
              "alternativeNames",
              "alternativeNames"
            ],
            "appearance": {
              "size": "xs"
            },
            "config": {
              "size": "tiny"
            },
            "constraints": [
              {
                "type": "required"
              },
              {
                "type": "required"
              }
            ],
            "description": "description",
            "label": "label",
            "metadata": {
              "key": "value"
            },
            "readonly": true,
            "treatments": [
              "treatments",
              "treatments"
            ]
          },
          "preview": [
            "preview",
            "preview"
          ]
        }
      ],
      "unmappedDestinationFields": [
        {
          "destinationField": {
            "type": "string",
            "key": "key",
            "actions": [
              {
                "label": "label"
              },
              {
                "label": "label"
              }
            ],
            "alternativeNames": [
              "alternativeNames",
              "alternativeNames"
            ],
            "appearance": {
              "size": "xs"
            },
            "config": {
              "size": "tiny"
            },
            "constraints": [
              {
                "type": "required"
              },
              {
                "type": "required"
              }
            ],
            "description": "description",
            "label": "label",
            "metadata": {
              "key": "value"
            },
            "readonly": true,
            "treatments": [
              "treatments",
              "treatments"
            ]
          },
          "preview": [
            "preview",
            "preview"
          ]
        },
        {
          "destinationField": {
            "type": "string",
            "key": "key",
            "actions": [
              {
                "label": "label"
              },
              {
                "label": "label"
              }
            ],
            "alternativeNames": [
              "alternativeNames",
              "alternativeNames"
            ],
            "appearance": {
              "size": "xs"
            },
            "config": {
              "size": "tiny"
            },
            "constraints": [
              {
                "type": "required"
              },
              {
                "type": "required"
              }
            ],
            "description": "description",
            "label": "label",
            "metadata": {
              "key": "value"
            },
            "readonly": true,
            "treatments": [
              "treatments",
              "treatments"
            ]
          },
          "preview": [
            "preview",
            "preview"
          ]
        }
      ],
      "programId": "programId"
    }
  }
}
```

**SDK Code**

```python
import requests

url = "https://api.x.flatfile.com/v1/jobs/jobId/plan"

payload = {}
headers = {
    "X-Disable-Hooks": "true",
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.patch(url, json=payload, headers=headers)

print(response.json())
```

```typescript
import { FlatfileClient } from "@flatfile/api";

const client = new FlatfileClient({ token: "YOUR_TOKEN" });
await client.jobs.updateExecutionPlanFields("jobId", {
    fileId: "fileId",
    jobId: "jobId"
});

```

```go
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.x.flatfile.com/v1/jobs/jobId/plan"

	payload := strings.NewReader("{}")

	req, _ := http.NewRequest("PATCH", url, payload)

	req.Header.Add("X-Disable-Hooks", "true")
	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.x.flatfile.com/v1/jobs/jobId/plan")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Patch.new(url)
request["X-Disable-Hooks"] = 'true'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{}"

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.patch("https://api.x.flatfile.com/v1/jobs/jobId/plan")
  .header("X-Disable-Hooks", "true")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{}")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('PATCH', 'https://api.x.flatfile.com/v1/jobs/jobId/plan', [
  'body' => '{}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
    'X-Disable-Hooks' => 'true',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.x.flatfile.com/v1/jobs/jobId/plan");
var request = new RestRequest(Method.PATCH);
request.AddHeader("X-Disable-Hooks", "true");
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "X-Disable-Hooks": "true",
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.x.flatfile.com/v1/jobs/jobId/plan")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PATCH"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```