Atmee.aiDocs
APIAPI referenceAvatars

Replace the knowledge files

PUT
/v1/avatars/{avatarId}/knowledge

Replaces the avatar's whole set of knowledge files and re-runs the build stages that depend on them; send none to clear the set. The knowledge.facts text and the questionnaire answers are kept (change them with PATCH /v1/avatars/{avatarId}).

  • Body: repeat the files part for each document (pdf, docx, doc, txt, md, html or csv, up to 50 MB each, at most 20), with an optional descriptions JSON object of file name to description. Where POST /v1/uploads is available, JSON {"files": [...], "descriptions": {...}} also works, with https URLs or knowledge uploads consumed on success.
  • A URL's file is named by its last path segment, an upload's by its fileName; descriptions uses those names.
  • v2 conversations do not use knowledge yet.
  • Scope: avatars:write.

Authorization

headerX-Api-Key<token>

Your secret API key (sk_atmee_...; older keys start sk_live_), sent as X-Api-Key. Keep it on your server and never send it to a browser.

Path Parameters

avatarId*string
Formatuuid

Request Body

  1. body
files*array<>
descriptions?string

JSON object, filename -> description (<= 500 chars each).

Response Body

Accepted; the affected build stages re-run.

application/json
  1. response
avatarId*string
Formatuuid
status*"building"
Value in"building"
Example Request
curl -X PUT 'https://api.atmanity.us/v1/avatars/497f6eca-6276-4993-bfeb-53cbbbba6f08/knowledge' \  -H 'Content-Type: application/json' \  -d '{  "files": [    "string"  ]}'
Example Response
{  "avatarId": "ac572b6e-802b-4b9e-a602-0786d4441e67",  "status": "building"}