Skip to main content

Public add document

POST 

/public/documents

Allow unauthenticated creation of new documents; must be enabled during installation (disabled by default)

See POST /documents/{documentId}/tags for adding tags to document schema

See POST /documents/{documentId}/actions for adding actions to document schema

Request

Query Parameters

    siteId string

    Site Identifier

Body

required

    documentId string

    optional Document Identifier (Version 4 UUID), if skipped one will be assigned

    path string

    Path or Name of document

    checksumType ChecksumType (string)

    The type of checksum to use for file validation

    Possible values: [SHA1, SHA256]

    checksum string

    The checksum value to validate the file against

    width string

    Document Content Width property

    height string

    Document Content Height property

    deepLinkPath string

    Path or Name of deep link

    contentType string

    Document media type

    isBase64 boolean

    Is the content Base64-encoded?

    content stringrequired

    Document content

    tags

    object[]

    List of document tags

  • Array [

  • key stringrequired

    Tag key

    value string

    Tag value

    values string[]

    Tag values

  • ]

  • metadata

    object[]

    List of document Metadata

  • Array [

  • key stringrequired

    Metadata key

    value string

    Metadata value

    values string[]

    Metadata values

  • ]

  • actions

    object[]

    List of Actions

  • Array [

  • type DocumentActionType (string)required

    Type of the Document Action

    Possible values: [ANTIVIRUS, DOCUMENTTAGGING, FULLTEXT, NOTIFICATION, OCR, QUEUE, WEBHOOK, IDP, PUBLISH, PDFEXPORT, EVENTBRIDGE]

    parameters

    object

    ocrParseTypes string

    OCR: Parse types - TEXT, FORMS, TABLES

    ocrEngine OcrEngine (string)

    Type of OCR Engine to use

    Possible values: [TESSERACT, TEXTRACT]

    ocrOutputType OcrOutputType (string)

    OCR Engine output format (textract table only)

    Possible values: [CSV]

    ocrNumberOfPages string

    Number of pages to OCR (from start) (-1 all)

    addPdfDetectedCharactersAsText string

    OCR: For the rewriting of the PDF document, converting any image text to searchable text

    url string

    Webhook: Callback URL

    characterMax string

    Fulltext: Maximum number of characters (-1 unlimited, Typesense defaults to 2048 characters)

    engine string

    DocumentTagging: Engine to use for document tagging generation

    Possible values: [chatgpt]

    notificationType string

    Notification Type

    Possible values: [email]

    notificationToCc string

    Who to carbon copy on the notification to (comma-delimited list)

    notificationToBcc string

    Who to blind carbon copy on the notification to (comma-delimited list)

    notificationSubject string

    Subject of the notification

    notificationText string

    Text of the notification

    notificationHtml string

    Html of the notification

    tags string

    DocumentTagging: Comma-deliminted list of keywords to generate tags for

    mappingId string

    Id of Mapping

    eventBusName string

    The name or ARN of the event bus to receive the event

    queueId string

    Id of Queue

  • ]

  • attributes

    object[]

    List of Attributes to add to document

  • Array [

  • oneOf

    Document Attribute

    key stringrequired

    Attribute key

    stringValue string

    Attribute with string value

    stringValues string[]

    Attribute with string values

    numberValue number

    Attribute with number value

    numberValues number[]

    Attribute with number values

    booleanValue boolean

    Attribute with boolean value

  • ]

  • documents

    object[]

    List of child documents

  • Array [

  • path string

    Path or Name of document

    width string

    Document Content Width property

    height string

    Document Content Height property

    deepLinkPath string

    Path or Name of deep link

    contentType string

    Document Content-Type

    checksumType ChecksumType (string)

    The type of checksum to use for file validation

    Possible values: [SHA1, SHA256]

    checksum string

    The checksum value to validate the file against

    isBase64 boolean

    Is the content Base64-encoded?

    content stringrequired

    Document content

    tags

    object[]

    List of document tags

  • Array [

  • key stringrequired

    Tag key

    value string

    Tag value

    values string[]

    Tag values

  • ]

  • metadata

    object[]

    List of document Metadata

  • Array [

  • key stringrequired

    Metadata key

    value string

    Metadata value

    values string[]

    Metadata values

  • ]

  • ]

Responses

201 CREATED

Response Headers

  • Access-Control-Allow-Origin

    string

  • Access-Control-Allow-Methods

    string

  • Access-Control-Allow-Headers

    string

Schema

    documentId string

    Document Identifier

    siteId string

    Site Identifier

    uploadUrl string

    Url to upload document to

    headers

    object

    documents

    object[]

    List of child documents

  • Array [

  • documentId string

    Document Identifier

    uploadUrl string

    Url to upload document to

    headers

    object

  • ]

Loading...