Skip to main content
POST
/
api
/
kb
/
assets
/
upload
Upload an asset
curl --request POST \
  --url https://{customer-tenant}.nuwacom.ai/api/kb/assets/upload \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: multipart/form-data' \
  --form 'spaceId=<string>' \
  --form 'file=<unknown>' \
  --form connectorId=123 \
  --form 'metadata={}' \
  --form 'path=<string>'
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

multipart/form-data
spaceId
required

Unique ID of the space the asset should be added to.

Required string length: 2 - 6
file
any
required

The file to upload. This contains the name, MIME type, and data.

connectorId
number

Identifier of the connector (e.g., SharePoint, Google Drive) the asset belongs to.

metadata
object

JSON metadata string that will be stored alongside the asset (e.g., author, custom tags).

path
string[]

Hierarchical path (array of folder names) describing where the asset lives in the connector.

Response

Asset already exists

id
string<uuid>
required