Presign assets/presign
curl --request POST \
--url https://api.callaro.ai/api/v1/assets/presign \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"asset": {
"metadata": {},
"assetable_type": "<string>",
"assetable_id": "<string>",
"scope_type": "<string>",
"scope_id": "<string>",
"file_name": "<string>",
"mime_type": "<string>",
"byte_size": 123
}
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
asset: {
metadata: {},
assetable_type: '<string>',
assetable_id: '<string>',
scope_type: '<string>',
scope_id: '<string>',
file_name: '<string>',
mime_type: '<string>',
byte_size: 123
}
})
};
fetch('https://api.callaro.ai/api/v1/assets/presign', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.callaro.ai/api/v1/assets/presign"
payload = { "asset": {
"metadata": {},
"assetable_type": "<string>",
"assetable_id": "<string>",
"scope_type": "<string>",
"scope_id": "<string>",
"file_name": "<string>",
"mime_type": "<string>",
"byte_size": 123
} }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"data": {
"id": "<string>",
"assetable_type": "<string>",
"assetable_id": "<string>",
"category": "<string>",
"status": "<string>",
"storage_provider": "<string>",
"storage_bucket": "<string>",
"storage_key": "<string>",
"file_name": "<string>",
"mime_type": "<string>",
"byte_size": 123,
"checksum": "<string>",
"cdn_url": "<string>",
"storage_url": "<string>",
"public_url": "<string>",
"uploaded_by_id": "<string>",
"metadata": {},
"created_at": "<string>"
},
"message": "<string>",
"meta": {},
"request_id": "<string>"
}{
"data": {
"id": "<string>",
"assetable_type": "<string>",
"assetable_id": "<string>",
"category": "<string>",
"status": "<string>",
"storage_provider": "<string>",
"storage_bucket": "<string>",
"storage_key": "<string>",
"file_name": "<string>",
"mime_type": "<string>",
"byte_size": 123,
"checksum": "<string>",
"cdn_url": "<string>",
"storage_url": "<string>",
"public_url": "<string>",
"uploaded_by_id": "<string>",
"metadata": {},
"created_at": "<string>"
},
"message": "<string>",
"meta": {},
"request_id": "<string>"
}{
"error": "<string>",
"error_code": "<string>",
"request_id": "<string>",
"details": {},
"errors": [
"<string>"
]
}{
"error": "<string>",
"error_code": "<string>",
"request_id": "<string>",
"details": {},
"errors": [
"<string>"
]
}{
"error": "<string>",
"error_code": "<string>",
"request_id": "<string>",
"details": {},
"errors": [
"<string>"
]
}{
"error": "<string>",
"error_code": "<string>",
"request_id": "<string>",
"details": {},
"errors": [
"<string>"
]
}{
"error": "<string>",
"error_code": "<string>",
"request_id": "<string>",
"details": {},
"errors": [
"<string>"
]
}{
"error": "<string>",
"error_code": "<string>",
"request_id": "<string>",
"details": {},
"errors": [
"<string>"
]
}Assets
Presign assets/presign
From api/v1/assets#presign in voice_saas_api. Fields come from that action’s strong params / params usage.
POST
/
api
/
v1
/
assets
/
presign
Presign assets/presign
curl --request POST \
--url https://api.callaro.ai/api/v1/assets/presign \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"asset": {
"metadata": {},
"assetable_type": "<string>",
"assetable_id": "<string>",
"scope_type": "<string>",
"scope_id": "<string>",
"file_name": "<string>",
"mime_type": "<string>",
"byte_size": 123
}
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
asset: {
metadata: {},
assetable_type: '<string>',
assetable_id: '<string>',
scope_type: '<string>',
scope_id: '<string>',
file_name: '<string>',
mime_type: '<string>',
byte_size: 123
}
})
};
fetch('https://api.callaro.ai/api/v1/assets/presign', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.callaro.ai/api/v1/assets/presign"
payload = { "asset": {
"metadata": {},
"assetable_type": "<string>",
"assetable_id": "<string>",
"scope_type": "<string>",
"scope_id": "<string>",
"file_name": "<string>",
"mime_type": "<string>",
"byte_size": 123
} }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"data": {
"id": "<string>",
"assetable_type": "<string>",
"assetable_id": "<string>",
"category": "<string>",
"status": "<string>",
"storage_provider": "<string>",
"storage_bucket": "<string>",
"storage_key": "<string>",
"file_name": "<string>",
"mime_type": "<string>",
"byte_size": 123,
"checksum": "<string>",
"cdn_url": "<string>",
"storage_url": "<string>",
"public_url": "<string>",
"uploaded_by_id": "<string>",
"metadata": {},
"created_at": "<string>"
},
"message": "<string>",
"meta": {},
"request_id": "<string>"
}{
"data": {
"id": "<string>",
"assetable_type": "<string>",
"assetable_id": "<string>",
"category": "<string>",
"status": "<string>",
"storage_provider": "<string>",
"storage_bucket": "<string>",
"storage_key": "<string>",
"file_name": "<string>",
"mime_type": "<string>",
"byte_size": 123,
"checksum": "<string>",
"cdn_url": "<string>",
"storage_url": "<string>",
"public_url": "<string>",
"uploaded_by_id": "<string>",
"metadata": {},
"created_at": "<string>"
},
"message": "<string>",
"meta": {},
"request_id": "<string>"
}{
"error": "<string>",
"error_code": "<string>",
"request_id": "<string>",
"details": {},
"errors": [
"<string>"
]
}{
"error": "<string>",
"error_code": "<string>",
"request_id": "<string>",
"details": {},
"errors": [
"<string>"
]
}{
"error": "<string>",
"error_code": "<string>",
"request_id": "<string>",
"details": {},
"errors": [
"<string>"
]
}{
"error": "<string>",
"error_code": "<string>",
"request_id": "<string>",
"details": {},
"errors": [
"<string>"
]
}{
"error": "<string>",
"error_code": "<string>",
"request_id": "<string>",
"details": {},
"errors": [
"<string>"
]
}{
"error": "<string>",
"error_code": "<string>",
"request_id": "<string>",
"details": {},
"errors": [
"<string>"
]
}Authorizations
bearerAuthtenantApiKey
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
Optional tenant context selector for JWT/partner key callers.
Body
application/json
Wrapped resource object or the same fields at the top level.
Show child attributes
Show child attributes
Was this page helpful?