Skip to content

Classify

Create Classify Job
client.classify.create(ClassifyCreateParams { organization_id, project_id, configuration, 6 more } params, RequestOptionsoptions?): ClassifyCreateResponse { id, configuration, document_input_type, 11 more }
POST/api/v2/classify
List Classify Jobs
client.classify.list(ClassifyListParams { configuration_id, created_at_on_or_after, created_at_on_or_before, 6 more } query?, RequestOptionsoptions?): PaginatedCursor<ClassifyListResponse { id, configuration, document_input_type, 11 more } >
GET/api/v2/classify
Get Classify Job
client.classify.get(stringjobID, ClassifyGetParams { organization_id, project_id } query?, RequestOptionsoptions?): ClassifyGetResponse { id, configuration, document_input_type, 11 more }
GET/api/v2/classify/{job_id}
ModelsExpand Collapse
ClassifyConfiguration { rules, mode, parsing_configuration }

Configuration for a classify job.

rules: Array<Rule>

Classify rules to evaluate against the document (at least one required)

description: string

Natural language criteria for matching this rule

maxLength500
minLength10
type: string

Document type to assign when rule matches

maxLength50
minLength1
mode?: "FAST"

Classify execution mode

parsing_configuration?: ParsingConfiguration | null

Parsing configuration for classify jobs.

lang?: string

ISO 639-1 language code for the document

max_pages?: number | null

Maximum number of pages to process. Omit for no limit.

minimum1
target_pages?: string | null

Comma-separated page numbers or ranges to process (1-based). Omit to process all pages.

ClassifyCreateRequest { configuration, configuration_id, file_id, 4 more }

Request to create a classify job.

configuration?: ClassifyConfiguration { rules, mode, parsing_configuration } | null

Configuration for a classify job.

rules: Array<Rule>

Classify rules to evaluate against the document (at least one required)

description: string

Natural language criteria for matching this rule

maxLength500
minLength10
type: string

Document type to assign when rule matches

maxLength50
minLength1
mode?: "FAST"

Classify execution mode

parsing_configuration?: ParsingConfiguration | null

Parsing configuration for classify jobs.

lang?: string

ISO 639-1 language code for the document

max_pages?: number | null

Maximum number of pages to process. Omit for no limit.

minimum1
target_pages?: string | null

Comma-separated page numbers or ranges to process (1-based). Omit to process all pages.

configuration_id?: string | null

Saved configuration ID

Deprecatedfile_id?: string | null

Deprecated: use file_input instead

file_input?: string | null

File ID or parse job ID to classify

maxLength200
Deprecatedparse_job_id?: string | null

Deprecated: use file_input instead

transaction_id?: string | null

Idempotency key scoped to the project

webhook_configurations?: Array<WebhookConfiguration> | null

Outbound webhook endpoints to notify on job status changes

webhook_events?: Array<"extract.pending" | "extract.success" | "extract.error" | 20 more> | null

Events to subscribe to (e.g. ‘parse.success’, ‘extract.error’). If null, all events are delivered.

One of the following:
"extract.pending"
"extract.success"
"extract.error"
"extract.partial_success"
"extract.cancelled"
"parse.pending"
"parse.running"
"parse.success"
"parse.error"
"parse.partial_success"
"parse.cancelled"
"classify.pending"
"classify.running"
"classify.success"
"classify.error"
"classify.partial_success"
"classify.cancelled"
"sheets.pending"
"sheets.success"
"sheets.error"
"sheets.partial_success"
"sheets.cancelled"
"unmapped_event"
webhook_headers?: Record<string, string> | null

Custom HTTP headers sent with each webhook request (e.g. auth tokens)

webhook_output_format?: string | null

Response format sent to the webhook: ‘string’ (default) or ‘json’

webhook_url?: string | null

URL to receive webhook POST notifications

ClassifyResult { confidence, reasoning, type }

Result of classifying a document.

confidence: number

Confidence score between 0.0 and 1.0

maximum1
minimum0
reasoning: string

Why the document matched (or didn’t match) the returned rule

type: string | null

Matched rule type, or null if no rule matched

ClassifyCreateResponse { id, configuration, document_input_type, 11 more }

Response for a classify job.

id: string

Unique identifier

configuration: ClassifyConfiguration { rules, mode, parsing_configuration }

Classify configuration used for this job

rules: Array<Rule>

Classify rules to evaluate against the document (at least one required)

description: string

Natural language criteria for matching this rule

maxLength500
minLength10
type: string

Document type to assign when rule matches

maxLength50
minLength1
mode?: "FAST"

Classify execution mode

parsing_configuration?: ParsingConfiguration | null

Parsing configuration for classify jobs.

lang?: string

ISO 639-1 language code for the document

max_pages?: number | null

Maximum number of pages to process. Omit for no limit.

minimum1
target_pages?: string | null

Comma-separated page numbers or ranges to process (1-based). Omit to process all pages.

document_input_type: "url" | "file_id" | "parse_job_id"

Whether the input was a file or parse job (FILE or PARSE_JOB)

One of the following:
"url"
"file_id"
"parse_job_id"
file_input: string

ID of the input file or parse job

project_id: string

Project this job belongs to

status: "PENDING" | "RUNNING" | "COMPLETED" | "FAILED"

Current job status: PENDING, RUNNING, COMPLETED, or FAILED

One of the following:
"PENDING"
"RUNNING"
"COMPLETED"
"FAILED"
user_id: string

User who created this job

configuration_id?: string | null

Product configuration ID

created_at?: string | null

Creation datetime

formatdate-time
error_message?: string | null

Error message if job failed

parse_job_id?: string | null

Associated parse job ID

result?: ClassifyResult { confidence, reasoning, type } | null

Result of classifying a document.

confidence: number

Confidence score between 0.0 and 1.0

maximum1
minimum0
reasoning: string

Why the document matched (or didn’t match) the returned rule

type: string | null

Matched rule type, or null if no rule matched

transaction_id?: string | null

Idempotency key

updated_at?: string | null

Update datetime

formatdate-time
ClassifyListResponse { id, configuration, document_input_type, 11 more }

Response for a classify job.

id: string

Unique identifier

configuration: ClassifyConfiguration { rules, mode, parsing_configuration }

Classify configuration used for this job

rules: Array<Rule>

Classify rules to evaluate against the document (at least one required)

description: string

Natural language criteria for matching this rule

maxLength500
minLength10
type: string

Document type to assign when rule matches

maxLength50
minLength1
mode?: "FAST"

Classify execution mode

parsing_configuration?: ParsingConfiguration | null

Parsing configuration for classify jobs.

lang?: string

ISO 639-1 language code for the document

max_pages?: number | null

Maximum number of pages to process. Omit for no limit.

minimum1
target_pages?: string | null

Comma-separated page numbers or ranges to process (1-based). Omit to process all pages.

document_input_type: "url" | "file_id" | "parse_job_id"

Whether the input was a file or parse job (FILE or PARSE_JOB)

One of the following:
"url"
"file_id"
"parse_job_id"
file_input: string

ID of the input file or parse job

project_id: string

Project this job belongs to

status: "PENDING" | "RUNNING" | "COMPLETED" | "FAILED"

Current job status: PENDING, RUNNING, COMPLETED, or FAILED

One of the following:
"PENDING"
"RUNNING"
"COMPLETED"
"FAILED"
user_id: string

User who created this job

configuration_id?: string | null

Product configuration ID

created_at?: string | null

Creation datetime

formatdate-time
error_message?: string | null

Error message if job failed

parse_job_id?: string | null

Associated parse job ID

result?: ClassifyResult { confidence, reasoning, type } | null

Result of classifying a document.

confidence: number

Confidence score between 0.0 and 1.0

maximum1
minimum0
reasoning: string

Why the document matched (or didn’t match) the returned rule

type: string | null

Matched rule type, or null if no rule matched

transaction_id?: string | null

Idempotency key

updated_at?: string | null

Update datetime

formatdate-time
ClassifyGetResponse { id, configuration, document_input_type, 11 more }

Response for a classify job.

id: string

Unique identifier

configuration: ClassifyConfiguration { rules, mode, parsing_configuration }

Classify configuration used for this job

rules: Array<Rule>

Classify rules to evaluate against the document (at least one required)

description: string

Natural language criteria for matching this rule

maxLength500
minLength10
type: string

Document type to assign when rule matches

maxLength50
minLength1
mode?: "FAST"

Classify execution mode

parsing_configuration?: ParsingConfiguration | null

Parsing configuration for classify jobs.

lang?: string

ISO 639-1 language code for the document

max_pages?: number | null

Maximum number of pages to process. Omit for no limit.

minimum1
target_pages?: string | null

Comma-separated page numbers or ranges to process (1-based). Omit to process all pages.

document_input_type: "url" | "file_id" | "parse_job_id"

Whether the input was a file or parse job (FILE or PARSE_JOB)

One of the following:
"url"
"file_id"
"parse_job_id"
file_input: string

ID of the input file or parse job

project_id: string

Project this job belongs to

status: "PENDING" | "RUNNING" | "COMPLETED" | "FAILED"

Current job status: PENDING, RUNNING, COMPLETED, or FAILED

One of the following:
"PENDING"
"RUNNING"
"COMPLETED"
"FAILED"
user_id: string

User who created this job

configuration_id?: string | null

Product configuration ID

created_at?: string | null

Creation datetime

formatdate-time
error_message?: string | null

Error message if job failed

parse_job_id?: string | null

Associated parse job ID

result?: ClassifyResult { confidence, reasoning, type } | null

Result of classifying a document.

confidence: number

Confidence score between 0.0 and 1.0

maximum1
minimum0
reasoning: string

Why the document matched (or didn’t match) the returned rule

type: string | null

Matched rule type, or null if no rule matched

transaction_id?: string | null

Idempotency key

updated_at?: string | null

Update datetime

formatdate-time