Mindset v3 / Deploy in your app / Context Files
View as MarkdownIngest a new file
Mindset v3 REST API reference: Context Files.
POST /api/v1/appuid/{appUid}/contexts/{contextUid}/files
Base URL
Requests go to your region's API host, for example https://a.api.mindset.ai. Hosts: https://a.api.mindset.ai, https://b.api.mindset.ai, https://c.api.mindset.ai, https://d.api.mindset.ai.
Authorization
x-api-keystringheaderrequired
Your API key.
Path parameters
appUidstringpathrequired
Your application's uid
contextUidstringpathrequired
Your context's uid
Request body
Content type: application/json.
externalIdstringbody
Optional External ID of the file
namestringbodyrequired
Name of the file
mimeTypestringbodyrequired
mime type of the file to be ingested
One of: video/mp4, audio/mpeg, application/pdf, application/vnd.openxmlformats-officedocument.presentationml.presentation, application/vnd.openxmlformats-officedocument.wordprocessingml.document, text/html, text/plain, application/zip.
zipTypestringbody
When sending a scorm file set mimeType to application/zip and specify 'scorm' here
sourceUrlstringbody
Url to download the file from for ingestion
documentContentstringbody
Content of the file, text (plain or markdown) or html to be ingested directly. Supports up to ~10MB of Base64-encoded content.
autoPublishbooleanbody
Automatically publish this file after successful ingestion
hideContentSegmentsbooleanbody
Allows the agent to refer to knowledge ingested from this document without ever revealing the source doc
knownAsstringbody
How the agent can refer to this file. eg 'video', 'discussion', 'sales pitch'
externalUrlstringbody
An external URL to direct an end user to the file for this document
thumbnailUrlstringbody
An external URL for a custom thumbnail for this file. It must point to an image of less than 3MB
thumbnailstringbody
A base64 encoded image to use as a thumbnail for this file.
viewOriginalSourcebooleanbody
Instruct agent UI to launch the externalUrl provided
contentHashstringbody
Optional string to support spotting content change
labelsstring[]body
Array of label uids (max 10)
runIdstringbody
Optional string to track id of triggering process
{
"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"
}Responses
201
File accepted. Ingestion processing started
{
"uid": "string",
"externalId": "string",
"createdAt": "string",
"name": "string",
"status": "string",
"statusMessage": "string",
"runId": "string",
"mimeType": "string",
"autoPublish": true,
"hideContentSegments": true,
"labels": [
"string"
],
"contentHash": "string",
"knownAs": "string",
"externalUrl": "string",
"viewOriginalSource": true,
"thumbnailUpdatedByAdmin": true
}400
Bad Request
401
Unauthorized
403
Forbidden
404
Context does not exist
422
Unprocessable Entity
500
Internal Server Error
Example request
curl -X POST "https://a.api.mindset.ai/api/v1/appuid/{appUid}/contexts/{contextUid}/files" \
-H "x-api-key: <your-api-key>" \
-H "Content-Type: application/json" \
-d '{"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"}'