Skip to main content
POST
/
v1
/
core
/
recordings
/
signed-urls
Get a signed URL for uploading a recording
curl --request POST \
  --url https://api.siro.ai/v1/core/recordings/signed-urls \
  --header 'Content-Type: application/json' \
  --header 'x-siro-auth-token: <api-key>' \
  --data '
{
  "fileType": "<string>",
  "fileSize": 1
}
'
{
  "data": {
    "uploadUrl": "<string>",
    "uploadHeaders": {
      "Content-Type": "<string>",
      "x-goog-content-length-range": "<string>"
    },
    "downloadUrl": "<string>",
    "expiresAt": "<string>"
  },
  "cursor": "<string>",
  "pageSize": 123,
  "limit": 123,
  "total": 123,
  "hasNextPage": true
}
Generates a short-lived signed upload URL for an audio file plus a matching download URL. This is the first step of the direct-upload flow: upload your audio to cloud storage with uploadUrl, then pass downloadUrl as fileUrl to Post recordings upload to create the recording.

Response fields

FieldDescription
uploadUrlSigned URL to PUT the file body to (Google Cloud Storage).
uploadHeadersHeaders you must send with the PUT — see below.
downloadUrlPass this as fileUrl when creating the recording.
expiresAtWhen the signed URLs expire (ISO 8601). Upload before this time.

Required upload headers

The values of Content-Type and x-goog-content-length-range are baked into the signature of uploadUrl. You must send them exactly as returned in uploadHeaders, or GCS rejects the upload with a 403 SignatureDoesNotMatch.
  • Content-Type — the MIME type for the fileType you requested. Siro maps extensions as follows:
    fileTypeContent-Type
    mp3audio/mpeg
    wavaudio/wav
    aacaudio/aac
  • x-goog-content-length-range0,<fileSize>, where <fileSize> is the exact byte size you passed in the request. The uploaded body must fall within this range.

Example upload

# 1. Request the signed URLs
curl -X POST https://api.siro.ai/v1/core/recordings/signed-urls \
  -H "x-siro-auth-token: $SIRO_OAUTH_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"fileType": "mp3", "fileSize": 1048576}'

# Response:
# {
#   "data": {
#     "uploadUrl": "https://storage.googleapis.com/...",
#     "uploadHeaders": {
#       "Content-Type": "audio/mpeg",
#       "x-goog-content-length-range": "0,1048576"
#     },
#     "downloadUrl": "https://storage.googleapis.com/...",
#     "expiresAt": "2026-06-08T12:00:00.000Z"
#   }
# }

# 2. PUT the file to uploadUrl, echoing uploadHeaders verbatim
curl -X PUT "$UPLOAD_URL" \
  -H "Content-Type: audio/mpeg" \
  -H "x-goog-content-length-range: 0,1048576" \
  --data-binary @recording.mp3
Then call Post recordings upload with fileUrl set to downloadUrl.

Authorizations

x-siro-auth-token
string
header
default:<oauth-access-token>
required

OAuth access token for user-scoped requests (Authorization Code or machine-to-machine). Send header x-siro-auth-token: <oauth-access-token>. Not an organization API key.

Body

application/json
fileType
string
required

File type (limited to mp3, aac, wav)

fileSize
integer
required

Size of the file in bytes

Required range: x > 0

Response

Get a signed URL for uploading a recording

data
object
required
cursor
pageSize
number
limit
number
total
number | null
hasNextPage
boolean