curl --request POST \
  --url https://api-prod.extend.app/v1/processors/:id \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "name": "<string>",
  "config": {
    "type": "<string>",
    "baseProcessor": "<string>",
    "baseVersion": "<string>",
    "fields": [
      {
        "id": "<string>",
        "name": "<string>",
        "type": "<string>",
        "description": "<string>",
        "schema": [
          {}
        ],
        "enum": [
          {
            "value": "<string>",
            "description": "<string>"
          }
        ]
      }
    ],
    "extractionRules": "<string>",
    "advancedOptions": {
      "fixedPageLimit": 123,
      "documentKind": "<string>",
      "keyDefinitions": "<string>",
      "modelReasoningInsightsEnabled": true,
      "advancedMultimodalEnabled": true,
      "citationsEnabled": true,
      "advancedFigureParsingEnabled": true,
      "chunkingOptions": {
        "chunkingStrategy": "<string>",
        "customSemanticChunkingRules": "<string>",
        "pageChunkSize": 123,
        "chunkSelectionStrategy": "<string>"
      }
    }
  }
}'
{
  "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"
          }
        ]
      }
    }
  }
}

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

Path Parameters

id
string
required

The ID of the processor to update.

Body

name
string

The new name for the processor.

config
object

The new config to update the processor with.

Your config will take one of three shapes depending on the processor type:

Configuration for an extraction processor.

Configuration for a classification processor.

Configuration for a splitter processor.

Response

success
boolean

A true or false value indicating whether the processor was updated successfully or not.

processor
DocumentProcessor

A DocumentProcessor object representing the updated processor. See the DocumentProcessor object for more details.

Error Responses

success
boolean

Will be false if the request failed.

error
string

A description of the error that occurred.

{
  "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"
          }
        ]
      }
    }
  }
}