m4Mindset docs

Mindset v3 / Deploy in your app / Context Files

View as Markdown

Update a file by externalId

Mindset v3 REST API reference: Context Files.

PATCH /api/v1/appuid/{appUid}/contexts/{contextUid}/files/externalId/{externalId}

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

externalIdstringpathrequired

Unique externalId of the file

Request body

Content type: application/json.

namestringbody

Name of the file

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

viewOriginalSourcebooleanbody

Instruct agent UI to launch the externalUrl provided

labelsstring[]body

Array of label uids (max 10)

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.

json
{
  "name": "string",
  "hideContentSegments": true,
  "knownAs": "string",
  "externalUrl": "string",
  "viewOriginalSource": true,
  "labels": [
    "string"
  ],
  "thumbnailUrl": "string",
  "thumbnail": "string"
}

Responses

200

Successful update

json
{
  "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
}

404

Context or File not found

422

Unprocessable Entity

Example request

bash
curl -X PATCH "https://a.api.mindset.ai/api/v1/appuid/{appUid}/contexts/{contextUid}/files/externalId/{externalId}" \
  -H "x-api-key: <your-api-key>" \
  -H "Content-Type: application/json" \
  -d '{"name":"string","hideContentSegments":true,"knownAs":"string","externalUrl":"string","viewOriginalSource":true,"labels":["string"],"thumbnailUrl":"string","thumbnail":"string"}'