Docs
Open dashboard

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

  • extensionstringrequired
    File extension. One of: txt, md, pdf, doc, docx.

Response 200 OK

Signed upload URL and storage path.

  • urlstringrequired
    Signed upload URL. PUT the file body directly to this URL.
  • storage_pathstringrequired
    Pass this value to the create endpoint's storage_path field.
  • expires_in_secondsintegerrequired
    Lifetime of the signed upload URL, in seconds.

Errors

  • 400Bad Request
    Validation failed / malformed request.
  • 401Unauthorized
    Missing, malformed, or invalid API key.
  • 403Forbidden
    Workspace unavailable, suspended, or paywalled.
  • 429Too Many Requests
    Workspace request limit exceeded; shared across all its API keys.