POST
/
api
/
v1
/
appuid
/
{appUid}
/
contexts
/
{contextUid}
/
files
Ingest a new file
curl --request POST \
  --url https://a.api.mindset.ai/api/v1/appuid/{appUid}/contexts/{contextUid}/files \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '{
  "externalId": "<string>",
  "name": "<string>",
  "mimeType": "video/mp4",
  "zipType": "<string>",
  "sourceUrl": "<string>",
  "documentContent": "<string>",
  "autoPublish": true,
  "hideContentSegments": true,
  "knownAs": "<string>",
  "externalUrl": "<string>",
  "thumbnailUrl": "<string>",
  "thumbnail": "<string>",
  "viewOriginalSource": true,
  "contentHash": "<string>",
  "labels": [
    "<string>"
  ],
  "runId": "<string>"
}'
{
  "uid": "<string>",
  "externalId": "<string>",
  "createdAt": "2023-11-07T05:31:56Z",
  "name": "<string>",
  "status": "<string>",
  "runId": "<string>",
  "mimeType": "<string>",
  "autoPublish": true,
  "hideContentSegments": true,
  "labels": [
    "<string>"
  ],
  "contentHash": "<string>",
  "knownAs": "<string>",
  "externalUrl": "<string>",
  "viewOriginalSource": true,
  "thumbnailUpdatedByAdmin": true
}

Authorizations

x-api-key
string
header
required

Path Parameters

appUid
string
required

Your application's uid

Minimum length: 1
contextUid
string
required

Your context's uid

Minimum length: 1

Body

application/json
name
string
required

Name of the file

Required string length: 1 - 100
mimeType
enum<string>
required

mime type of the file to be ingested

Available options:
video/mp4,
audio/mpeg,
application/pdf,
application/vnd.openxmlformats-officedocument.presentationml.presentation,
application/vnd.openxmlformats-officedocument.wordprocessingml.document,
text/html,
text/plain,
application/zip
externalId
string

Optional External ID of the file

zipType
string

When sending a scorm file set mimeType to application/zip and specify 'scorm' here

Maximum length: 20
sourceUrl
string

Url to download the file from for ingestion

Maximum length: 2048
documentContent
string

Content of the file, text (plain or markdown) or html to be ingested directly

Maximum length: 65536
autoPublish
boolean

Automatically publish this file after successful ingestion

hideContentSegments
boolean

Allows the agent to refer to knowledge ingested from this document without ever revealing the source doc

knownAs
string

How the agent can refer to this file. eg 'video', 'discussion', 'sales pitch'

Maximum length: 200
externalUrl
string

An external URL to direct an end user to the file for this document

Maximum length: 2048
thumbnailUrl
string

An external URL for a custom thumbnail for this file. It must point to an image of less than 3MB

Maximum length: 2048
thumbnail
string

A base64 encoded image to use as a thumbnail for this file.

Maximum length: 65536
viewOriginalSource
boolean

Instruct agent UI to launch the externalUrl provided

contentHash
string

Optional string to support spotting content change

Maximum length: 200
labels
string[]

Array of label uids (max 10)

Maximum length: 10
runId
string

Optional string to track id of triggering process

Maximum length: 200

Response

File accepted. Ingestion processing started

uid
string

Unique identifier

externalId
string

Optional External ID of the file

createdAt
string<date-time>

Creation timestamp (ISO 8601)

name
string

Name to display to the end user

status
string

Status of the resource

runId
string

Run identifier (if specified on ingestion)

mimeType
string

MIME type of the file

autoPublish
boolean

Whether this file will be automatically made available after successful ingestion

hideContentSegments
boolean

Flag to hide file segments in agent responses. Does not hide the knowledge from the agent

labels
string[]

Array of label UIDs to associate wth the file

Maximum length: 10
contentHash
string

Externally provided content hash string to enable decisions on when to replace the file

knownAs
string

How the agent can refer to this item. Eg webinar, presentation, paper, specification etc

externalUrl
string<uri>

External URL to launch when aa user wishes to view this file

viewOriginalSource
boolean

Flag to view using the provided externalUrl. Otherwise inbuilt player will be used

thumbnailUpdatedByAdmin
boolean

If a thumbnail has been changed by an admin this boolean will allow automated updates to skip replacing the thumbnail