# Rerun file form filling
Source: https://docs.file.ai/api-reference/files/rerun-file-form-filling

> This endpoint is used to rerun the form filling of a file.

patch /prod/v1/files/schema/rerun

This endpoint is used to rerun the form filling of a file.

It is used to update the file fields based on the current file content and the current schema version.

The `fileId` field is used to specify the file that should be updated.

The `backgroundRerun` field is used to determine whether the form filling should be run in the background.

If set to `true`, the form filling will be run in the background. If set to `false`, the form filling will be run synchronously.

The `rerunOptions` field is used to specify the options for the form filling. The allowed fields are `paths`, `partialRerun`, and `notification`.

The `paths` field is used to specify the fields that should be updated. The fields that are specified in the `paths` field will be updated with the new schema fields.

The `partialRerun` field is used to determine whether the form filling should only be run for the modified fields.

If set to `true`, the form filling will only be run for the modified fields. If set to `false`, the form filling will be run for all fields.

The `notification` field is used to specify the notification options for the form filling. The allowed fields are `shouldSendOnCompletion`, `referenceEntityName`, `referenceEntityId`, and `referenceEntityAction`.

The `shouldSendOnCompletion` field is used to determine whether a notification should be sent when the form filling is completed.

If set to `true`, a notification will be sent when the form filling is completed. If set to `false`, no notification will be sent.

The `referenceEntityName` field is used to specify the name of the reference entity that should be used for the notification. The allowed values are `FILE` and `SCHEMA`.

The `referenceEntityId` field is used to specify the id of the reference entity that should be used for the notification.

The `referenceEntityAction` field is used to specify the action that should be used for the notification. The allowed values are `CREATE`, `UPDATE`, and `DELETE`.
