# Start a multipart upload
`POST https://octopus.livepush.io/streams/{stream_id}/videos/uploadurl/multipart`
Opens a multipart upload session for a large video and returns the `uploadId` and object `Key` used by the remaining multipart calls.

Check `isMultipartUploadDisabled` on the storage specs first — when it is `true` this endpoint is closed to the account.

Requires a token with the `streams.videos.write` scope.
- **Tag:** Videos
- **Operation ID:** `startMultipartVideoUpload`
- **Authentication:** Bearer token required
- **Docs:** https://developers.livepush.io/videos/start-a-multipart-upload/

### Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `stream_id` | string | yes | Unique identifier of the stream. |


### Request body

`application/json` (required)

- `type` (string) **required** — MIME type of the file.
- `size` (integer) **required** — File size in bytes.
- `originalFilename` (string) **required**
- `zone` (string) **required** — Storage zone to upload into.
- `partNumber` (integer) — Only used by the signed single-part variant.


```json
{
  "type": "video/mp4",
  "size": 734003200,
  "originalFilename": "service-12-jan.mp4",
  "zone": "eu-central",
  "partNumber": 0
}
```


### Example request

```bash
curl -X POST 'https://octopus.livepush.io/streams/st_xxxxxxxxxxxxx/videos/uploadurl/multipart' \
  -H 'Authorization: Bearer YOUR_API_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
    "type": "video/mp4",
    "size": 734003200,
    "originalFilename": "service-12-jan.mp4",
    "zone": "eu-central",
    "partNumber": 0
  }'
```


### Responses


#### 200 — Start a multipart upload.

- `id` (string)
- `Key` (string)
- `uploadId` (string) — Storage-side session identifier.
- `uploadUrl` (string) — Mirrors uploadId — kept for symmetry with the single-part response.
- `uploadType` (string)
- `uploadCredentials` (VideoUploadCredentials) — Vendor-specific credentials the client needs to perform the upload. The shape depends on uploadType: multipart uploads receive pool and chunking parameters, formdata uploads receive the signed form fields to post alongside the file, and direct uploads receive nothing — everything is carried in uploadUrl.
  - `bucketName` (string)
  - `region` (string)
  - `poolId` (string) — Identity pool used to authorise the multipart upload.
  - `concurrency` (integer) — How many parts the client should upload in parallel.
  - `chunkSize` (integer) — Part size in bytes.
  - `keyPrefix` (string)
  - `useAccelerateEndpoint` (boolean)
- `zone` (string)


```json
{
  "id": "vd_xxxxxxxxxxxx",
  "Key": "string",
  "uploadId": "string",
  "uploadUrl": "string",
  "uploadType": "multipart",
  "uploadCredentials": {
    "bucketName": "string",
    "region": "eu-west-1",
    "poolId": "string",
    "concurrency": 4,
    "chunkSize": 8388608,
    "keyPrefix": "string",
    "useAccelerateEndpoint": false
  },
  "zone": "zn_35hk0gxy_pr"
}
```


#### 401 — Response


#### 404 — Not found for this account.

