# Finalize a managed-data upload session

`POST /api/v1/projects/{project}/connections/{connection}/upload-sessions/{uploadSession}/finalize`

Operation ID: `finalizeManagedDataUploadSession`  
Effect: `write`  
Confirmation: `conditional`

## Authorization

- mode: `privilege`
- privilege: `INGEST_DATA`

## Parameters

| Name | In | Required | Schema | Description |
| --- | --- | --- | --- | --- |
| `project` | path | true | `{"maxLength":128,"minLength":1,"type":"string"}` |  |
| `connection` | path | true | `{"maxLength":128,"minLength":1,"type":"string"}` |  |
| `uploadSession` | path | true | `{"maxLength":160,"minLength":1,"type":"string"}` |  |
| `Idempotency-Key` | header | true | `{"maxLength":255,"minLength":1,"type":"string"}` |  |

## Responses

| Status | Content | Description |
| --- | --- | --- |
| `202` | `application/json` (ManagedDataUploadSessionResponse) | The request has been accepted for processing, but processing has not yet completed. |
| `400` | `application/problem+json` (ProblemDetails) | The server could not understand the request due to invalid syntax. |
| `401` | `application/problem+json` (ProblemDetails) | Access is unauthorized. |
| `403` | `application/problem+json` (ProblemDetails) | Access is forbidden. |
| `404` | `application/problem+json` (ProblemDetails) | The server cannot find the requested resource. |
| `409` | `application/problem+json` (ProblemDetails) | The request conflicts with the current state of the server. |
| `412` | `application/problem+json` (ProblemDetails) | Precondition failed. |
| `413` | `application/problem+json` (ProblemDetails) | Client error |
| `415` | `application/problem+json` (ProblemDetails) | Client error |
| `422` | `application/problem+json` (ProblemDetails) | Client error |
| `429` | `application/problem+json` (ProblemDetails) | Client error |
| `500` | `application/problem+json` (ProblemDetails) | Server error |
| `502` | `application/problem+json` (ProblemDetails) | Server error |
| `503` | `application/problem+json` (ProblemDetails) | Service unavailable. |
