PerfectParser Docs

Create Parser

Reference for the POST /v1/parsers endpoint.

POST /v1/parsers

Creates a new parser template. If fields is omitted or empty, a blank parser container is created.

Body Parameters

ParameterTypeRequiredDescription
namestringUnique name for the parser (max 100 chars).
descriptionstringHuman-readable description.
result_modestringone_per_file (default) or one_per_page.
fieldsarrayList of field definitions containing name (required), type (optional), and description (optional).
curl -X POST https://api.perfectparser.com/v1/parsers \
  -H "X-API-Key: pp_live_your_secret_key" \
  -H "Content-Type: application/json" \
  -d '{"name": "Invoice Parser", "result_mode": "one_per_file"}'

Response 201 Created

{
  "parser": {
    "parser_id": "prs_999",
    "name": "Invoice Parser",
    "description": null,
    "result_mode": "one_per_file",
    "schema": {},
    "fields": {},
    "has_sample_file": false,
    "created_at": "2026-06-20T10:00:00.000Z",
    "updated_at": "2026-06-20T10:00:00.000Z"
  }
}

Common Error Responses

HTTP StatusError CodeDescription
400INVALID_PAYLOADRequest body validation failed or malformed JSON.
401UNAUTHORIZEDInvalid or missing API key.
409CONFLICTA parser with this name already exists.

On this page