PerfectParser Docs

Update Parser

Reference for the PATCH /v1/parsers/:id endpoint.

PATCH /v1/parsers/:id

Updates specific configuration parameters of an existing parser. This is the preferred method for making partial updates.

Path Parameters

ParameterTypeRequiredDescription
idstringThe unique ID of the parser to update.

Body Parameters

ParameterTypeRequiredDescription
namestringUpdated name for the parser (max 100 chars).
descriptionstringUpdated description text.
result_modestringone_per_file or one_per_page.
fieldsarrayFull replacement list of field definitions. Each field: name (required), type (optional: string, number, boolean, date, array, object), description (optional), required (optional boolean). Re-generates underlying parser schema.
curl -X PATCH https://api.perfectparser.com/v1/parsers/prs_999 \
  -H "X-API-Key: pp_live_your_secret_key" \
  -H "Content-Type: application/json" \
  -d '{"description": "Updated description text."}'

Response 200 OK

{
  "parser": {
    "parser_id": "prs_999",
    "name": "Invoice Parser",
    "description": "Updated description text.",
    "result_mode": "one_per_file",
    "schema": {
      "type": "object",
      "properties": {
        "invoice_number": { "type": "string" },
        "total_amount": { "type": "number" }
      }
    },
    "fields": {
      "invoice_number": { "description": "" },
      "total_amount": { "description": "" }
    },
    "has_sample_file": true,
    "sample_file_id": "smp_123",
    "created_at": "2026-06-20T10:00:00.000Z",
    "updated_at": "2026-06-20T10:05:12.000Z"
  }
}

Common Error Responses

HTTP StatusError CodeDescription
400INVALID_PAYLOADRequest body validation failed or malformed JSON.
401UNAUTHORIZEDInvalid or missing API key.
404PARSER_NOT_FOUNDThe requested parser does not exist or belongs to another account.
409CONFLICTA parser with this name already exists.

On this page