docs: document 200 OK response for upload file API when file exists (#21071)

Co-authored-by: blink-so[bot] <211532188+blink-so[bot]@users.noreply.github.com>
This commit is contained in:
blinkagent[bot]
2025-12-08 16:04:56 -06:00
committed by GitHub
co-authored by blink-so[bot]
parent a6285dde5e
commit 50d42ab0b9
4 changed files with 21 additions and 7 deletions
+5 -4
View File
@@ -31,7 +31,7 @@ file: string
### Example responses
> 201 Response
> 200 Response
```json
{
@@ -41,9 +41,10 @@ file: string
### Responses
| Status | Meaning | Description | Schema |
|--------|--------------------------------------------------------------|-------------|--------------------------------------------------------------|
| 201 | [Created](https://tools.ietf.org/html/rfc7231#section-6.3.2) | Created | [codersdk.UploadResponse](schemas.md#codersdkuploadresponse) |
| Status | Meaning | Description | Schema |
|--------|--------------------------------------------------------------|------------------------------------|--------------------------------------------------------------|
| 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | Returns existing file if duplicate | [codersdk.UploadResponse](schemas.md#codersdkuploadresponse) |
| 201 | [Created](https://tools.ietf.org/html/rfc7231#section-6.3.2) | Returns newly created file | [codersdk.UploadResponse](schemas.md#codersdkuploadresponse) |
To perform this operation, you must be authenticated. [Learn more](authentication.md).