Skip to main content
POST
Upload through a link
Upload files sends files in one request, which is what most integrations want. On a slow or unreliable connection, upload through a link instead, the way the dashboard does: the file goes straight to Verbeo’s file storage, in pieces that carry on where they stopped if the connection drops. It takes three steps:
  1. Reserve a slot: this endpoint, with JSON. Your plan’s limits are checked here.
  2. Upload the file to the slot’s link, within 2 hours.
  3. Confirm it: Verbeo checks the file it received and starts reading it.

1. Reserve a slot

string
required
UUID of the knowledge base.
string
required
The file’s name, 1 to 255 characters. Its extension decides the type.
number
required
Its size in bytes. wc -c < prices.pdf prints it.
string
required
Its SHA-256, as 64 lowercase hex characters. sha256sum prices.pdf prints it. A file with the same bytes as one already in the knowledge base is refused here.
201 Created: the slot, a file object with status: "uploading", and where to send the file.

2. Upload the file

Send the whole file with one PUT to upload.signed_url, with upload.content_type:
For a resumable upload, use a TUS client such as tus-js-client with upload.resumable_url as its endpoint, pieces of 6 MB, the header x-signature set to upload.token, and the metadata bucketName, objectName and contentType set to upload.bucket, upload.path and upload.content_type. The link goes to Verbeo’s file storage, not to api.verbeo.ai: the token is the credential, so no API key goes with it. It works for 2 hours.

3. Confirm it

200 OK with the file object, now processing. Verbeo checks the size and SHA-256 of the file it received against your plan again; a refused file is removed, slot and all. Confirming twice is harmless. To give up on a slot, delete it. An unconfirmed slot is removed on its own once its link expires. The same JSON body on POST /knowledge-base/files/{fileId}/replace reserves a replacement the same way.

Errors