Skip to main content
POST
Request an upload URL

Authorizations

Authorization
string
header
required

JWT Bearer token. Obtain a token via your identity provider and pass it in the Authorization: Bearer <token> header.

Scopes

REAL_CALL_WRITE_ACCESS

Body

application/json

Describes the audio file you are about to upload, so a pre-signed upload URL bound to its SHA-256 can be issued. You upload the bytes directly to that URL.

fileName
string
required

Name of the audio file. It must end in .mp3, .wav or .aiff (case-insensitive); any other extension is rejected with 422. It is shown as the call's original file name (fileName on the call).

Minimum string length: 1
Example:

"sample-call.wav"

contentType
string
required

MIME type of the audio file. Accepted formats are MP3, WAV and AIFF (for example audio/mpeg, audio/wav, audio/aiff). The format is checked from the fileName extension.

Minimum string length: 1
Example:

"audio/wav"

contentLength
integer
required

Size of the file in bytes. Maximum 20 MB (20,971,520 bytes); larger files are rejected with 422.

Required range: x >= 1
Example:

1048576

sha256
string
required

Hex-encoded SHA-256 of the file, computed client-side.

Pattern: ^[a-fA-F0-9]{64}$
Example:

"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"

Response

A presigned upload URL.

blobId
string
required

Identifier to pass to the simulate call once the upload completes.

Example:

"2nYn7qqkM5678Ks99ykvmZAr7pz"

uploadUrl
string<uri>
required

Pre-signed URL to PUT the file bytes to. The PUT must send Content-Type, Content-Length and X-Amz-Content-Sha256 set to the declared contentType, contentLength and sha256, or it is refused with 403.

Example:

"https://storage.example.com/upload?..."