Create Document Intelligence
Extract structured data from documents using AI-powered document intelligence.
Request Body
id field (reference existing) OR the data field (upload new).fields or template must be provided — not both.template.fields.results field once processing is complete.hint field to help the AI extract the field. For example, if the field is a date, you
can use the hint field to specify the format of the date. For example: “DD/MM/YYYY”.Authorizations
API token (starts with pnbx_). Create at https://app.penbox.io/workspace/settings/api. Include as: Authorization: Bearer {token}
Body
- Option 1
- Option 2
Exactly one of 'fields' or 'template' must be provided.
Fields to extract. Mutually exclusive with 'template'.
Array of attachments to process (minimum 1). Each attachment must have either 'id' (reference to existing attachment) OR 'data' (new file upload with base64). When using 'data', 'name' and 'type' are required.
1New file upload with base64-encoded data
- Option 1
- Option 2
Reference to a document intelligence template. Mutually exclusive with 'fields'.
Optional language hint for document processing
Response
Document intelligence job created
Document intelligence job UUID
Job creation timestamp
Array of processed documents
Extraction results: the extracted fields, a validation assessment, and the detected document type.
{
"fields": [
{
"key": "firstname",
"name": "firstname",
"type": "text",
"value": "Jane",
"confidence": "high"
},
{
"key": "lastname",
"name": "lastname",
"type": "text",
"value": "Doe",
"confidence": "high"
},
{
"key": "number",
"name": "id card number",
"type": "text",
"value": "000-0000000-00",
"confidence": "high"
},
{
"key": "birthday",
"name": "date de naissance",
"hint": "DD MMM YYYY",
"type": "text",
"value": "01 JAN 1990",
"confidence": "high"
}
],
"validation": {
"is_valid": true,
"is_blurry": false,
"user_explanation": "All required fields were successfully extracted from the document."
},
"document_type": "ID Card"
}
Last update timestamp
Document language detected or specified
User who created the job
Token usage statistics for the AI processing