Knowledge
Start an upload
POST
Opens an upload of one file into the base. PUT each parts[i].url with exactly part_size bytes (the last part may be shorter) and exactly parts[i].headers — no Authorization header — then complete it with each part's ETag, as the ETag header gave it. A part's URL is good for an hour; the session expires at expires_at. Only the key that started an upload can complete it.
More in Knowledge API.
apiKeyheader
AuthorizationBearer <token>An API key, sk-syn- and 32 characters. On SynapseOrch Cloud an owner or admin makes it under Settings → Developer; on a self-hosted install, under Settings → API Keys.
kb_id*stringapplication/json- body
filename*stringLength
1 <= length <= 255size_bytes*integerRange
1 <= valuemime*stringLength
length <= 255path?|nullmetadata?Successful Response
application/json- response
upload_id*stringpart_size*integerparts*array<>expires_at*stringcurl -X POST "https://api.synapseorch.com/api/v1/knowledge/bases/kb_01a10d3f5a7c9e1b3d5f7a9c1e3b5d7f/uploads" \ -H "Authorization: Bearer sk-syn-..." \ -H "Content-Type: application/json" \ -d '{ "filename": "string", "size_bytes": 1, "mime": "string" }'{ "upload_id": "string", "part_size": 0, "parts": [ { "part_number": 0, "url": "string", "method": "PUT", "headers": { "property1": "string", "property2": "string" } } ], "expires_at": "string"}