Skip to main content

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​

ActionTypeParameterDescriptionExample
OCRocrParseTypesOcr Parsing strategy to useTEXT, FORMS, TABLES, QUERIES (requires 'ocrTextractQueries')
OCRocrTextractQueriesRequired for "QUERIES", questions to ask Textract
OCRocrEngineOcr Engine to usetesseract or textract
OCRocrOutputTypeConvert OCR result to an Output format (textract table only)true
OCRocrNumberOfPagesNumber of pages to OCR (from start)-1
OCRaddPdfDetectedCharactersAsTextPDF Documents convert images to texttrue or false
LLMPROMPTllmPromptEntityNameLLM Prompt Entity Name
LLMPROMPTmodelIdOverride the LLM Prompt Entity model id for this action
DATA_CLASSIFICATIONllmPromptEntityNameLLM Prompt Entity Name
METADATA_EXTRACTIONllmPromptEntityNameLLM Prompt Entity Name
DELETEdeleteTypeDeletion mode. CONTENT_ONLY removes the current S3 object while preserving document metadata.SOFT_DELETE, HARD_DELETE, PURGE, CONTENT_ONLY
CHECKSUMchecksumTypeChecksum algorithm to calculate and persist for the documentSHA1, SHA256, or SHA512
FULLTEXTcharacterMaxMaximum number of characters to add to Fulltext destination-1
DOCUMENTTAGGINGengineTagging Engine to usechatgpt
DOCUMENTTAGGINGtagsComma-deliminted list of keywordsauthor,title,description
WEBHOOKurlWebhook URLhttps://yourdomain.com/webhook-endpoint
NOTIFICATIONnotificationTypeType of Notificationemail
NOTIFICATIONnotificationToCcNotification Carbon Copyemail@yourdomain.com
NOTIFICATIONnotificationToBccNotification Blind Carbon Copyemail@yourdomain.com
NOTIFICATIONnotificationSubjectNotification SubjectEmail Subject
NOTIFICATIONnotificationTextNotification as TextEmail Text
NOTIFICATIONnotificationHtmlNotification as HtmlEmail HTML Text
QUEUEqueueIdId of Queue
IDPmappingIdId of Mapping
EVENTBRIDGEeventBusNameThe name or ARN of the Amazon EventBridge to receive the event.
RESIZEwidthThe width of the image to resize (or 'auto').
RESIZEheightThe height of the image to resize (or 'auto').
RESIZEoutputTypeThe output type of the image (optional).
RESIZEpathThe path to use when creating resized document (optional).

Request​

Responses​

200 OK

Response Headers
    Access-Control-Allow-Origin
    Access-Control-Allow-Methods
    Access-Control-Allow-Headers