Request a signed upload URL
POST/knowledge-base/upload-url
Request a signed upload URL. PUT the file body directly to the returned URL, then pass the storage_path to the create endpoint. Supported extensions: txt, md, pdf, doc, docx. The URL expires after the time indicated by expires_in_seconds.
Requires
Authorization: Bearer <api_key>. Create a key in the Inspra dashboard under Workspace Settings → API Keys.Body application/json
- extensionstringrequiredFile extension. One of: txt, md, pdf, doc, docx.
Response 200 OK
Signed upload URL and storage path.
- urlstringrequiredSigned upload URL. PUT the file body directly to this URL.
- storage_pathstringrequiredPass this value to the create endpoint's storage_path field.
- expires_in_secondsintegerrequiredLifetime of the signed upload URL, in seconds.
Errors
- 400Bad RequestValidation failed / malformed request.
- 401UnauthorizedMissing, malformed, or invalid API key.
- 403ForbiddenWorkspace unavailable, suspended, or paywalled.
- 429Too Many RequestsWorkspace request limit exceeded; shared across all its API keys.