> ## Documentation Index
> Fetch the complete documentation index at: https://docs.extend.app/llms.txt
> Use this file to discover all available pages before exploring further.

# Update Processor

> Update an existing processor in Extend.

This endpoint allows you to update the properties of an existing processor.

### Path Parameters

<ParamField path="id" type="string" required>
  The ID of the processor to update.
</ParamField>

### Body

<ParamField body="name" type="string" optional>
  The new name for the processor.
</ParamField>

<ParamField body="config" type="object" optional>
  The new config to update the processor with.

  <Tabs>
    <Tab title="Extraction">
      <Expandable title="properties">
        <ParamField body="type" type="string" required>
          Must be `"EXTRACT"` for extraction processors.
        </ParamField>

        <ParamField body="baseProcessor" type="string" optional>
          The base processor to use. For extractors, this is either `"extraction_performance"` or `"extraction_light"`. See the [base processor documentation](/changelog/overview) for more details.
        </ParamField>

        <ParamField body="baseVersion" type="string" optional>
          The version of the base processor to use (e.g. `"4.0.0"`). If this is provided, `baseProcessor` must be provided as well. See the [processor changelog](/changelog/overview) for available versions.
        </ParamField>

        <ParamField body="schema" type="object">
          The schema that defines the structure of data to extract from documents. One of `schema` or `fields` must be provided. We recommend using `schema` as `fields` is deprecated. See the [extraction processor schema documentation](/api-reference/guides/processor_configs20250421#extraction-processor-schema-json-schema) for more details.
        </ParamField>

        <ParamField body="fields" type="array" deprecated defaultOpen>
          The schema that defines the structure of data to extract from documents. One of `schema` or `fields` must be provided. We recommend using `schema` as `fields` is deprecated. See the [extraction processor schema documentation](/api-reference/guides/processor_configs20250421#extraction-processor-configuration) for more details on using the `fields` shape.

          <Expandable title="properties">
            <ParamField body="id" type="string" required>
              Unique identifier for the field.
            </ParamField>

            <ParamField body="name" type="string" required>
              Human-readable name for the field.
            </ParamField>

            <ParamField body="type" type="string" required>
              Type of the field. Supported values:

              * `string`: Text values
              * `number`: Numeric values
              * `currency`: Monetary values
              * `boolean`: True/false values
              * `date`: Date values
              * `array`: Lists of values (requires schema)
              * `enum`: Values from a predefined list (requires enum)
              * `object`: Nested structure (requires schema)
              * `signature`: Signature information
            </ParamField>

            <ParamField body="description" type="string" required>
              Detailed description of the field, including expected content and format.
            </ParamField>

            <ParamField body="schema" type="array" optional>
              Required when type is "array" or "object". Contains nested field definitions.
            </ParamField>

            <ParamField body="enum" type="array" optional>
              Required when type is "enum". List of allowed values.

              <Expandable title="properties">
                <ParamField body="value" type="string" required>
                  The enum value.
                </ParamField>

                <ParamField body="description" type="string" required>
                  Description of the enum value.
                </ParamField>
              </Expandable>
            </ParamField>
          </Expandable>
        </ParamField>

        <ParamField body="extractionRules" type="string" optional>
          Custom rules to guide the extraction process in natural language.
        </ParamField>

        <ParamField body="advancedOptions" type="object" optional>
          Advanced configuration options.

          <Expandable title="properties">
            <ParamField body="fixedPageLimit" type="number" optional>
              Limit processing to a specific number of pages from the beginning of the document.
            </ParamField>

            <ParamField body="documentKind" type="string" optional>
              Provide a hint about the document type (e.g. "invoice", "receipt", etc.).
            </ParamField>

            <ParamField body="keyDefinitions" type="string" optional>
              Define specific key terms or concepts relevant to the document type.
            </ParamField>

            <ParamField body="modelReasoningInsightsEnabled" type="boolean" optional>
              Enable model reasoning insights in the extraction results.
            </ParamField>

            <ParamField body="advancedMultimodalEnabled" type="boolean" optional>
              Enable advanced multimodal processing for better handling of visual elements.
            </ParamField>

            <ParamField body="citationsEnabled" type="boolean" optional>
              Enable citation information for extracted fields.
            </ParamField>

            <ParamField body="advancedFigureParsingEnabled" type="boolean" optional>
              Enable advanced parsing of figures and diagrams in the document.
            </ParamField>

            <ParamField body="chunkingOptions" type="object" optional>
              Options for controlling document chunking.

              <Expandable title="properties">
                <ParamField body="chunkingStrategy" type="string" optional>
                  Strategy for chunking the document. Supported values:

                  * `standard`: Default chunking strategy
                  * `semantic`: Content-aware chunking based on document structure
                </ParamField>

                <ParamField body="customSemanticChunkingRules" type="string" optional>
                  Custom rules for semantic chunking in natural language.
                </ParamField>

                <ParamField body="pageChunkSize" type="number" optional>
                  Number of pages per chunk.
                </ParamField>

                <ParamField body="chunkSelectionStrategy" type="string" optional>
                  Strategy for selecting chunks. Supported values:

                  * `intelligent`: AI-based selection
                  * `confidence`: Select based on confidence score
                  * `take_first`: Always use first chunk
                  * `take_last`: Always use last chunk
                </ParamField>
              </Expandable>
            </ParamField>
          </Expandable>
        </ParamField>
      </Expandable>
    </Tab>

    <Tab title="Classification">
      <Expandable title="properties">
        <ParamField body="type" type="string" required>
          Must be `"CLASSIFY"` for classification processors.
        </ParamField>

        <ParamField body="baseProcessor" type="string" optional>
          The base processor to use. For classifiers, must be `"classification_performance"` or `"classification_light"`. See the [base processor documentation](/changelog/overview) for more details.
        </ParamField>

        <ParamField body="baseVersion" type="string" optional>
          The version of the base processor to use (e.g. `"3.2.0"`). If this is provided, `baseProcessor` must be provided as well. See the [processor changelog](/changelog/overview) for available versions.
        </ParamField>

        <ParamField body="classifications" type="array" required>
          Array of possible classifications for the document.

          <Expandable title="properties">
            <ParamField body="id" type="string" required>
              Unique identifier for the classification. We recommend lowercase, underscore-separated format.
            </ParamField>

            <ParamField body="type" type="string" required>
              Type identifier for the classification.
            </ParamField>

            <ParamField body="description" type="string" required>
              Detailed description of the classification.
            </ParamField>
          </Expandable>
        </ParamField>

        <ParamField body="classificationRules" type="string" optional>
          Custom rules to guide the classification process in natural language.
        </ParamField>

        <ParamField body="advancedOptions" type="object" optional>
          Advanced configuration options.

          <Expandable title="properties">
            <ParamField body="fixedPageLimit" type="number" optional>
              Limit processing to a specific number of pages from the beginning of the document.
            </ParamField>

            <ParamField body="context" type="string" optional>
              The context to use for classification. Supported values:
              `default` `max`
            </ParamField>

            <ParamField body="advancedMultimodalEnabled" type="boolean" optional>
              Enable advanced multimodal processing for better handling of visual elements during classification.
            </ParamField>
          </Expandable>
        </ParamField>
      </Expandable>
    </Tab>

    <Tab title="Splitter">
      <Expandable title="properties">
        <ParamField body="type" type="string" required>
          Must be `"SPLITTER"` for splitter processors.
        </ParamField>

        <ParamField body="baseProcessor" type="string" optional>
          The base processor to use. For splitters, this can currently only be `"splitter_performance"`. See the [base processor documentation](/changelog/overview) for more details.
        </ParamField>

        <ParamField body="baseVersion" type="string" optional>
          The version of the base processor to use (e.g. `"1.0.0"`). If this is provided, `baseProcessor` must be provided as well. See the [processor changelog](/changelog/overview) for available versions.
        </ParamField>

        <ParamField body="splitClassifications" type="array" required>
          Array of classifications that define the possible types of document sections.

          <Expandable title="properties">
            <ParamField body="id" type="string" required>
              Unique identifier for the split classification.
            </ParamField>

            <ParamField body="type" type="string" required>
              Type identifier for the split classification.
            </ParamField>

            <ParamField body="description" type="string" required>
              Detailed description of the document section type.
            </ParamField>
          </Expandable>
        </ParamField>

        <ParamField body="splitRules" type="string" optional>
          Custom rules to guide the document splitting process in natural language.
        </ParamField>

        <ParamField body="advancedOptions" type="object" optional>
          Advanced configuration options.

          <Expandable title="properties">
            <ParamField body="fixedPageLimit" type="number" optional>
              Limit processing to a specific number of pages from the beginning of the document.
            </ParamField>

            <ParamField body="splitMethod" type="string" optional>
              Method to use for splitting. Supported values:

              * `high_precision`: More accurate but potentially slower
              * `low_latency`: Faster but potentially less precise
            </ParamField>

            <ParamField body="splitIdentifierRules" type="string" optional />

            <ParamField body="splitExcelDocumentsBySheetEnabled" type="boolean" optional>
              For Excel documents, split by worksheet.
            </ParamField>
          </Expandable>
        </ParamField>
      </Expandable>
    </Tab>
  </Tabs>
</ParamField>

### Response

<ResponseField name="success" type="boolean">
  A true or false value indicating whether the processor was updated
  successfully or not.
</ResponseField>

<ResponseField name="processor" type="DocumentProcessor">
  A DocumentProcessor object representing the updated processor. See the
  [DocumentProcessor object](/api-reference/objects/processor) for more details.
</ResponseField>

### Error Responses

<ResponseField name="success" type="boolean">
  Will be `false` if the request failed.
</ResponseField>

<ResponseField name="error" type="string">
  A description of the error that occurred.
</ResponseField>

<ResponseExample>
  ```json Example Success Response theme={null}
  {
    "success": true,
    "processor": {
      "object": "document_processor",
      "id": "processor_1234",
      "name": "Updated Invoice Processor",
      "type": "EXTRACT",
      "createdAt": "2024-03-01T12:00:00Z",
      "updatedAt": "2024-03-01T13:00:00Z",
      "draftVersion": {
        "id": "dpv_4567",
        "version": "draft",
        "config": {
          "fields": [
            {
              "id": "field_1234",
              "name": "invoice_number",
              "description": "The invoice number",
              "type": "string"
            }
          ]
        }
      }
    }
  }
  ```
</ResponseExample>
