curl -X POST https://api.bota.dev/v1/recordings/rec_abc123/upload-url \
-H "Authorization: Bearer sk_live_..." \
-H "Content-Type: application/json" \
-d '{
"content_type": "audio/opus",
"file_size_bytes": 2048576
}'
const response = await fetch('https://api.bota.dev/v1/recordings/rec_abc123/upload-url', {
method: 'POST',
headers: {
'Authorization': 'Bearer sk_live_...',
'Content-Type': 'application/json',
},
body: JSON.stringify({
content_type: 'audio/opus',
file_size_bytes: 2048576,
}),
});
const { upload_url, upload_token, expires_in, content_type } = await response.json();
import requests
response = requests.post(
'https://api.bota.dev/v1/recordings/rec_abc123/upload-url',
headers={
'Authorization': 'Bearer sk_live_...',
'Content-Type': 'application/json',
},
json={
'content_type': 'audio/opus',
'file_size_bytes': 2048576,
},
)
result = response.json()
upload_url = result['upload_url']
{
"upload_url": "https://bota-uploads.s3.amazonaws.com/...",
"upload_token": "up_abc123",
"expires_in": 3600,
"content_type": "audio/opus"
}
Uploads
Get Upload URL
Generate a pre-signed URL to upload recording audio directly to S3
POST
/
recordings
/
{id}
/
upload-url
curl -X POST https://api.bota.dev/v1/recordings/rec_abc123/upload-url \
-H "Authorization: Bearer sk_live_..." \
-H "Content-Type: application/json" \
-d '{
"content_type": "audio/opus",
"file_size_bytes": 2048576
}'
const response = await fetch('https://api.bota.dev/v1/recordings/rec_abc123/upload-url', {
method: 'POST',
headers: {
'Authorization': 'Bearer sk_live_...',
'Content-Type': 'application/json',
},
body: JSON.stringify({
content_type: 'audio/opus',
file_size_bytes: 2048576,
}),
});
const { upload_url, upload_token, expires_in, content_type } = await response.json();
import requests
response = requests.post(
'https://api.bota.dev/v1/recordings/rec_abc123/upload-url',
headers={
'Authorization': 'Bearer sk_live_...',
'Content-Type': 'application/json',
},
json={
'content_type': 'audio/opus',
'file_size_bytes': 2048576,
},
)
result = response.json()
upload_url = result['upload_url']
{
"upload_url": "https://bota-uploads.s3.amazonaws.com/...",
"upload_token": "up_abc123",
"expires_in": 3600,
"content_type": "audio/opus"
}
Generate a pre-signed S3 URL for uploading a recording audio file. Upload the audio bytes directly to S3 using the returned URL, then call Complete Upload.
After S3 upload succeeds, call Complete Upload.
Authentication
This endpoint accepts either an API key or a device token.curl -X POST https://api.bota.dev/v1/recordings/rec_abc123/upload-url \
-H "Authorization: Bearer sk_live_..." \
-H "Content-Type: application/json" \
-d '{
"content_type": "audio/opus",
"file_size_bytes": 2048576
}'
const response = await fetch('https://api.bota.dev/v1/recordings/rec_abc123/upload-url', {
method: 'POST',
headers: {
'Authorization': 'Bearer sk_live_...',
'Content-Type': 'application/json',
},
body: JSON.stringify({
content_type: 'audio/opus',
file_size_bytes: 2048576,
}),
});
const { upload_url, upload_token, expires_in, content_type } = await response.json();
import requests
response = requests.post(
'https://api.bota.dev/v1/recordings/rec_abc123/upload-url',
headers={
'Authorization': 'Bearer sk_live_...',
'Content-Type': 'application/json',
},
json={
'content_type': 'audio/opus',
'file_size_bytes': 2048576,
},
)
result = response.json()
upload_url = result['upload_url']
Path Parameters
string
required
The recording’s unique identifier.
Request Body
string
Audio MIME type. Defaults to
audio/opus.integer
Expected file size in bytes. This is accepted for compatibility but the current upload URL response does not echo it.
Response
Returns a pre-signed S3 upload URL and metadata needed by clients.{
"upload_url": "https://bota-uploads.s3.amazonaws.com/...",
"upload_token": "up_abc123",
"expires_in": 3600,
"content_type": "audio/opus"
}
Response Fields
| Field | Type | Description |
|---|---|---|
upload_url | string | Pre-signed S3 URL for uploading the file with PUT |
upload_token | string | Upload token generated for the upload operation |
expires_in | integer | Number of seconds before the URL expires |
content_type | string | MIME type selected for the object |
Uploading the File
Use the returned URL directly:cURL
curl -X PUT "https://bota-uploads.s3.amazonaws.com/..." \
-H "Content-Type: audio/opus" \
--data-binary @recording.opus
Was this page helpful?

