Skip to content
Assistants

Edit a knowledge document

PATCH/assistants/{id}/knowledge/{documentId}

Renames any document; replaces the text of a text document, which is indexed again.

Path parameters

Request body

  • titlestring

    Name of the document, unique per assistant. Shown to the agent with each passage it finds.

    Example "Biens en vente"1 to 200 characters

  • contentstring

    The text, plain or markdown. Headings and list items are kept together when it is split for search: one listing per list item finds best.

    Example "## Toulon\n\n- Appartement · 65 m² · 289 000 € (réf. 1234)\n - Le Mourillon, 3 pièces avec terrasse"1 to 500000 characters

Response

200
  • documentobject

Errors

  • 400Invalid request: a field or parameter failed validation{ "message"?: string, "error"?: string, "bodyErrors"?: {…} }
  • 404Not found in your organization{ "message"?: string, "error"?: string, "bodyErrors"?: {…} }

Error bodies carry an error (or message) string; a 400 adds bodyErrors.issues. See Errors.