---
title: "Create Dialogue Upload Url"
method: POST
path: "/api/available/dialogue/{task_uid}/upload-url"
tags: ["tasks"]
---

# Create Dialogue Upload Url

`POST /api/available/dialogue/{task_uid}/upload-url`

## Request

- Base URL: `https://api.ncspeech.org` (the document declares no server; this is the origin it was published from)
- URL: `https://api.ncspeech.org/api/available/dialogue/{task_uid}/upload-url`
- Auth: HTTP bearer

Mint a resumable GCS upload session for this user's half of a conversation.

The object name is server-chosen (dialogue/{sessionId}/{uploadId}.wav) and the
session is bound to the caller's Origin — the browser PUTs the bytes directly.
A repeat call while an attempt is open supersedes it; after /complete → 409.

Two forms (module docstring): with `sizeBytes` the recording already exists,
so its declared length bounds the session and the duration/size rules run
here; without it the call has only just started and both the length and the
rules move to /complete. Either way the caller gets a one-time complete
token, which is what makes that /complete survive a cookie-less webview.

## Path parameters

- `task_uid` string, required

## Headers

- `X-Test-UID` string, nullable

## Request body

- DialogueUploadUrlPayload: Mint request, in either of its two forms. `sessionId` is required by both.
  - `sampleRate` integer, nullable
  - `channels` 1, nullable
  - `bitsPerSample` 16, nullable
  - `sizeBytes` integer, nullable
  - `sessionId` string, required
  - `durationSeconds` number, nullable
  - `endReason` 'selfStopped' | 'partnerEnded' | 'minDurationNotReached' | 'connectionLost' | 'error', nullable
  - `rating` integer, nullable
  - `gps` string, nullable
  - `deviceType` string, nullable
  - `inputHash` string, nullable
  - `inputLabel` string, nullable
  - `outputHash` string, nullable
  - `outputLabel` string, nullable
  - `topicId` string, nullable
  - `topicTitle` string, nullable
  - `convLang` string, nullable
  - `droppedFrames` integer, nullable
  - `startedAtEpochMs` integer, nullable

## Response `200`

Successful Response

- object

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/ncspeech/apis/advanced-data-collector-api.md) - [All operations](https://skmtc.dev/ncspeech/apis/advanced-data-collector-api/llms.txt) - [OpenAPI document](https://skmtc.dev/ncspeech/apis/advanced-data-collector-api/revisions/fec602f8df8c?raw)
