Skip to main content
PATCH
/
api
/
v1
/
appuid
/
{appUid}
/
contexts
/
{contextUid}
/
files
/
uid
/
{uid}
Update a file by UID
curl --request PATCH \
  --url https://a.api.mindset.ai/api/v1/appuid/{appUid}/contexts/{contextUid}/files/uid/{uid} \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '{
  "name": "<string>",
  "hideContentSegments": true,
  "knownAs": "<string>",
  "externalUrl": "<string>",
  "viewOriginalSource": true,
  "labels": [
    "<string>"
  ],
  "thumbnailUrl": "<string>",
  "thumbnail": "<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
uid
string
required

Unique ID of the file

Body

application/json
name
string

Name of the file

Maximum length: 100
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
viewOriginalSource
boolean

Instruct agent UI to launch the externalUrl provided

labels
string[]

Array of label uids (max 10)

Maximum length: 10
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

Response

Successful update

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

I