# Get Upload URL **POST /uploads/signed-url** Use this endpoint to get an AWS S3 signed upload url to upload your file to, store the returned key to use after file is uploaded successfully. Javascript example of how to upload file to the URL you receive from this endpoint: ```js try { // Get the S3 URL to upload file to. const authToken = '' const response = await fetch('https://getcody.ai/api/v1/uploads/signed-url', { method: 'POST', headers: { 'Authorization': `Bearer ${authToken}`, 'Content-Type': 'application/json' }, body: JSON.stringify({ content_type: 'text/plain', file_name: 'knowledge.txt' }) }) const { key, url } = (await response.json()).data // Upload the File object to S3 await fetch(url, { method: 'PUT', headers: { 'Content-Type': 'text/plain', }, body: file, // File object from Web API }) // File is uploaded, now you can use the `key` you got from this endpoint. } catch { // Handle file upload failure. } ``` ## Servers - https://getcody.ai/api/v1: https://getcody.ai/api/v1 () ## Authentication methods - Api key ## Parameters ## Body parameters Content-type: application/json - **file_name** (string) Original file name you want to upload, must contain the file extension. - **content_type** (string) MIME content type of the file. ## Responses ### 200: OK #### Body Parameters: application/json (object) - **url** (string(uri)) AWS S3 signed upload URL, you can make a put request to upload the file. - **key** (string) Key you can use for endpoints that require file uploads. [Powered by Bump.sh](https://bump.sh)