---
title: "POST /knowledgeBases/{knowledgeBaseId}/upload"
method: POST
path: "/knowledgeBases/{knowledgeBaseId}/upload"
---

# POST /knowledgeBases/{knowledgeBaseId}/upload

`POST /knowledgeBases/{knowledgeBaseId}/upload`

Get a URL to upload content to a knowledge base. To upload content, first make a PUT request to the returned URL with your file, making sure to include the required headers. Then use <a href="https://docs.aws.amazon.com/wisdom/latest/APIReference/API_CreateContent.html">CreateContent</a> to finalize the content creation process or <a href="https://docs.aws.amazon.com/wisdom/latest/APIReference/API_UpdateContent.html">UpdateContent</a> to modify an existing resource. You can only upload content to a knowledge base of type CUSTOM.

## Path parameters

- `knowledgeBaseId` string, required

## Request body

- object
  - `contentType` string, required — The type of content to upload.
  - `presignedUrlTimeToLive` integer — Expiration time in minutes

## Response `200`

Success

- StartContentUploadResponse
  - `headersToInclude` object, required — The headers to include in the upload.
  - `uploadId` string, required — The identifier of the upload.
  - `url` string, password, required — The URL of the upload.
  - `urlExpiry` string, date-time, required — The expiration time of the URL as an epoch timestamp.

## Other responses

- `480` — ValidationException
- `481` — AccessDeniedException
- `482` — ResourceNotFoundException

---

[API](https://skmtc.net/aws/apis/wisdom.md) · [All operations](https://skmtc.net/aws/apis/wisdom/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/aws/wisdom/versions/4a596e60c7d1/schema)
