Skip to main content
POST
/
upload
/
presigned-url
Get presigned upload URL
curl --request POST \
  --url https://api.dev.knowmio.com/api/upload/presigned-url \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "knowledgeId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "fileName": "<string>",
  "contentType": "<string>",
  "organizationId": "<string>"
}
'
{
  "url": "<string>",
  "fields": {},
  "key": "<string>",
  "expiresIn": 123
}

Authorizations

x-api-key
string
header
required

API key for authentication (lowercase header name)

Body

application/json
knowledgeId
string<uuid>
required

Knowledge base ID to associate file with

fileName
string
required

Original file name

contentType
string
required

MIME type of the file

organizationId
string
required

Organization ID - Required when using API Key authentication. Optional with session authentication (defaults to session's active organization).

Response

Presigned URL generated successfully

url
string
required

Presigned upload URL

fields
object
required

Additional form fields for upload

key
string
required

S3 object key

expiresIn
integer
required

URL expiration time in seconds