---
title: "Creates a new upload in the specified source"
method: POST
path: "/sources/{sourceId}/uploads"
tags: ["Source", "Upload"]
---

# Creates a new upload in the specified source

`POST /sources/{sourceId}/uploads`

## Request

- Base URL: `http://localhost:3001/api`
- URL: `http://localhost:3001/api/sources/{sourceId}/uploads`
- Auth: none declared

## Request body

- Upload: An instance of case data being written to the server.
  - `status` 'IN_PROGRESS' | 'SUCCESS' | 'ERROR'
  - `summary` object
    - `numCreated` integer
    - `numUpdated` integer
    - `error` 'INTERNAL_ERROR' | 'SOURCE_CONFIGURATION_ERROR' | 'SOURCE_CONFIGURATION_NOT_FOUND' | 'SOURCE_CONTENT_NOT_FOUND' | 'SOURCE_CONTENT_DOWNLOAD_ERROR' | 'PARSING_ERROR' | 'VALIDATION_ERROR' | 'DATA_UPLOAD_ERROR' | 'TIMEOUT'
  - `created` union
    - string
    - object
    - number

## Response `201`

Created

- Upload: An instance of case data being written to the server.
  - `status` 'IN_PROGRESS' | 'SUCCESS' | 'ERROR'
  - `summary` object
    - `numCreated` integer
    - `numUpdated` integer
    - `error` 'INTERNAL_ERROR' | 'SOURCE_CONFIGURATION_ERROR' | 'SOURCE_CONFIGURATION_NOT_FOUND' | 'SOURCE_CONTENT_NOT_FOUND' | 'SOURCE_CONTENT_DOWNLOAD_ERROR' | 'PARSING_ERROR' | 'VALIDATION_ERROR' | 'DATA_UPLOAD_ERROR' | 'TIMEOUT'
  - `created` union
    - string
    - object
    - number

## Other responses

- `400`: Malformed request
- `403`: Forbidden
- `404`: Not found
- `422`: Unprocessable entity
- `500`: Internal server error

## Changes

- **2022-04-19** `7b73390be316`: 2 info
  - added the media type `application/json` for the response with the status `403`
  - added the media type `application/json` for the response with the status `404`
- **2021-03-05** `3c824ebb2004`: 1 warning, 1 info
  - added the new `TIMEOUT` enum value to the `summary/error` response property for the response status `201`
  - added the new `TIMEOUT` enum value to the request property `summary/error`

[Operation history](https://skmtc.dev/globaldothealth/apis/global-health-curator-service-api/changes/sources/:sourceId/uploads/post.md)

---

[API](https://skmtc.dev/globaldothealth/apis/global-health-curator-service-api.md) - [All operations](https://skmtc.dev/globaldothealth/apis/global-health-curator-service-api/llms.txt) - [OpenAPI document](https://skmtc.dev/globaldothealth/apis/global-health-curator-service-api/revisions/5b1151265235?raw)
