Add document action
POST/documents/:documentId/actions
Add one or more actions to a document; this appends actions and does not replace previous actions
Each action type supports a different set of parameters as shown in the table below:
Action Parameters
| ActionType | Parameter | Description | Example |
|---|---|---|---|
| OCR | ocrParseTypes | Ocr Parsing strategy to use | TEXT, FORMS, TABLES, QUERIES (requires 'ocrTextractQueries') |
| OCR | ocrTextractQueries | Required for "QUERIES", questions to ask Textract | |
| OCR | ocrEngine | Ocr Engine to use | tesseract or textract |
| OCR | ocrOutputType | Convert OCR result to an Output format (textract table only) | true |
| OCR | ocrNumberOfPages | Number of pages to OCR (from start) | -1 |
| OCR | addPdfDetectedCharactersAsText | PDF Documents convert images to text | true or false |
| DATA_CLASSIFICATION | llmPromptEntityName | LLM Prompt Entity Name | |
| FULLTEXT | characterMax | Maximum number of characters to add to Fulltext destination | -1 |
| DOCUMENTTAGGING | engine | Tagging Engine to use | chatgpt |
| DOCUMENTTAGGING | tags | Comma-deliminted list of keywords | author,title,description |
| WEBHOOK | url | Webhook URL | https://yourdomain.com/webhook-endpoint |
| NOTIFICATION | notificationType | Type of Notification | |
| NOTIFICATION | notificationToCc | Notification Carbon Copy | email@yourdomain.com |
| NOTIFICATION | notificationToBcc | Notification Blind Carbon Copy | email@yourdomain.com |
| NOTIFICATION | notificationSubject | Notification Subject | Email Subject |
| NOTIFICATION | notificationText | Notification as Text | Email Text |
| NOTIFICATION | notificationHtml | Notification as Html | Email HTML Text |
| QUEUE | queueId | Id of Queue | |
| IDP | mappingId | Id of Mapping | |
| EVENTBRIDGE | eventBusName | The name or ARN of the Amazon EventBridge to receive the event. | |
| RESIZE | width | The width of the image to resize (or 'auto'). | |
| RESIZE | height | The height of the image to resize (or 'auto'). | |
| RESIZE | outputType | The output type of the image (optional). | |
| RESIZE | path | The path to use when creating resized document (optional). |
Request
Path Parameters
Document Identifier
Query Parameters
Site Identifier
- application/json
Body
Array [
Array [
]
]
actions
object[]
List of Actions
Type of the Document Action
Possible values: [ANTIVIRUS, DOCUMENTTAGGING, FULLTEXT, NOTIFICATION, OCR, QUEUE, WEBHOOK, IDP, PUBLISH, PDFEXPORT, EVENTBRIDGE, RESIZE, DATA_CLASSIFICATION, MALWARE_SCAN]
parameters
object
ocrTextractQueries
object[]
Natural-language question
Label to identify this query in the result
Page selection
OCR: Parse types - TEXT, FORMS, TABLES, QUERIES (must include ocrTextractQueries)
Type of OCR Engine to use
Possible values: [TESSERACT, TEXTRACT]
OCR Engine output format (textract table only)
Possible values: [CSV]
Number of pages to OCR (from start) (-1 all)
OCR: For the rewriting of the PDF document, converting any image text to searchable text
DATA_CLASSIFICATION: Set the LLM Prompt Entity Name
Webhook: Callback URL
Fulltext: Maximum number of characters (-1 unlimited, Typesense defaults to 2048 characters)
DocumentTagging: Engine to use for document tagging generation
Possible values: [chatgpt]
Notification Type
Possible values: [email]
Who to carbon copy on the notification to (comma-delimited list)
Who to blind carbon copy on the notification to (comma-delimited list)
Subject of the notification
Text of the notification
Html of the notification
DocumentTagging: Comma-deliminted list of keywords to generate tags for
Id of Mapping
The name or ARN of the event bus to receive the event
The width of the image to resize (or 'auto')
The height of the image to resize (or 'auto')
The path to use when creating resized document (optional)
The output type of the image
Id of Queue
Responses
- 200
- 400
200 OK
Response Headers
Access-Control-Allow-Origin
string
Access-Control-Allow-Methods
string
Access-Control-Allow-Headers
string
- application/json
- Schema
- Example (from schema)
Schema
Document Action message
{
"message": "string"
}
400 OK
- application/json
- Schema
- Example (from schema)
Schema
Array [
]
errors
object[]
List of errors
Error Key
Error Message
{
"errors": [
{
"key": "string",
"error": "string"
}
]
}