Skip to main content
POST
/
api
/
company
/
kb
/
documents
/
upload-init
Initiate document upload
curl --request POST \
  --url https://app.demand-iq.com/api/company/kb/documents/upload-init \
  --header 'Content-Type: application/json' \
  --cookie session= \
  --data '
{
  "filename": "product-guide.pdf",
  "contentType": "application/pdf",
  "sizeBytes": 1048576,
  "displayName": "<string>"
}
'
{
  "documentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "uploadUrl": "<string>",
  "storageKey": "<string>",
  "expiresIn": 123
}

Authorizations

session
string
cookie
required

Session cookie obtained from POST /api/auth/login.

Body

application/json
filename
string
required
Example:

"product-guide.pdf"

contentType
string
required
Example:

"application/pdf"

sizeBytes
integer
required
Example:

1048576

displayName
string

Response

Upload initiated

documentId
string<uuid>
uploadUrl
string<uri>

Presigned S3 URL for PUT upload

storageKey
string
expiresIn
integer

URL expiry in seconds