Skip to content
Assistants

Add a text to the knowledge base

POST/assistants/{id}/knowledge

A text written or pasted, or the content of a .txt or .md file.

Path parameters

Request body

  • titlestringrequired

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

    Example "Biens en vente"1 to 200 characters

  • contentstringrequired

    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.