WhatsAble
API v1AI bots

Add a document to a bot's knowledge

posthttps://api.whatsable.app/v1/ai-bots/{id}/knowledge-files
Build a request to copy

This page never sends a request. Fill in the fields, then copy the request and run it from your server.

The body is multipart/form-data. Send the file as the file part.

Request
curl -X POST 'https://api.whatsable.app/v1/ai-bots/string/knowledge-files' \
  -F 'file=string'

Adds a document to the knowledge of an AI bot. Send a multipart/form-data body with one file part. The document starts as processing: read it again to see ready or failed. An archived bot takes no new documents.

Authorization

bearerAuth
headerAuthorizationBearer <nfy_live_<32 characters>>

An API key from Settings > API keys, sent as Authorization: Bearer <key>.

Path Parameters

id*string

The bot id.

Length1 <= length <= 64

Header Parameters

Idempotency-Key?string

Any string up to 255 characters. A repeat with the same key and body answers the stored response; with another body, 409 idempotency_key_reused.

Lengthlength <= 255

Request Body

multipart/form-data
  1. body

One document to add to the bot's knowledge, in a file part.

file*file

A PDF, a Word document (.docx), or plain text, Markdown or CSV, at most 25 MiB. Its type is checked against its bytes.

Formatbinary

Response Body

The document, processing.

application/json
  1. response

A document whose text the bot knows. The bot reads it; it never sends it.

object*string
id*string
Length1 <= length <= 64
bot_id*string
Length1 <= length <= 64
filename*string
mime_type*string
size_bytes*integer
Range0 <= value <= 9007199254740991
status*string

processing while its text is read, then ready (the bot knows it from its next reply) or failed.

Value in"processing""ready""failed"
failure_reason*|

Why reading it failed: unsupported_type, timeout, unreadable or empty. Null unless status is failed.

extracted_length*integer

Characters of text the bot reads from it. Zero until ready.

Range0 <= value <= 9007199254740991
created_at*string
Formatdate-time
Example Request
curl -X POST 'https://api.whatsable.app/v1/ai-bots/string/knowledge-files' \  -F 'file=string'
Example Response
{  "object": "knowledge_file",  "id": "cm2v8f1a00001qz8h7k8l9m0n",  "bot_id": "cm2v8b1a00001qz8h3j4k5l6m",  "filename": "price-list.pdf",  "mime_type": "application/pdf",  "size_bytes": 182340,  "status": "ready",  "failure_reason": null,  "extracted_length": 12873,  "created_at": "2026-10-20T19:51:21Z"}