Batch Create Uploads
curl --request POST \
--url https://api.mixpeek.com/v1/buckets/{bucket_identifier}/uploads/batch \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"uploads": [
{
"filename": "<string>",
"content_type": "<string>",
"file_size_bytes": 10485760,
"presigned_url_expiration": 3600,
"metadata": {},
"create_object_on_confirm": true,
"object_metadata": {
"category": "products",
"priority": "high"
},
"blob_property": "video",
"blob_type": "VIDEO",
"file_hash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
"skip_duplicates": true
}
],
"shared_metadata": {},
"shared_object_metadata": {}
}
'import requests
url = "https://api.mixpeek.com/v1/buckets/{bucket_identifier}/uploads/batch"
payload = {
"uploads": [
{
"filename": "<string>",
"content_type": "<string>",
"file_size_bytes": 10485760,
"presigned_url_expiration": 3600,
"metadata": {},
"create_object_on_confirm": True,
"object_metadata": {
"category": "products",
"priority": "high"
},
"blob_property": "video",
"blob_type": "VIDEO",
"file_hash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
"skip_duplicates": True
}
],
"shared_metadata": {},
"shared_object_metadata": {}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
uploads: [
{
filename: '<string>',
content_type: '<string>',
file_size_bytes: 10485760,
presigned_url_expiration: 3600,
metadata: {},
create_object_on_confirm: true,
object_metadata: {category: 'products', priority: 'high'},
blob_property: 'video',
blob_type: 'VIDEO',
file_hash: 'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855',
skip_duplicates: true
}
],
shared_metadata: {},
shared_object_metadata: {}
})
};
fetch('https://api.mixpeek.com/v1/buckets/{bucket_identifier}/uploads/batch', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.mixpeek.com/v1/buckets/{bucket_identifier}/uploads/batch",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'uploads' => [
[
'filename' => '<string>',
'content_type' => '<string>',
'file_size_bytes' => 10485760,
'presigned_url_expiration' => 3600,
'metadata' => [
],
'create_object_on_confirm' => true,
'object_metadata' => [
'category' => 'products',
'priority' => 'high'
],
'blob_property' => 'video',
'blob_type' => 'VIDEO',
'file_hash' => 'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855',
'skip_duplicates' => true
]
],
'shared_metadata' => [
],
'shared_object_metadata' => [
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.mixpeek.com/v1/buckets/{bucket_identifier}/uploads/batch"
payload := strings.NewReader("{\n \"uploads\": [\n {\n \"filename\": \"<string>\",\n \"content_type\": \"<string>\",\n \"file_size_bytes\": 10485760,\n \"presigned_url_expiration\": 3600,\n \"metadata\": {},\n \"create_object_on_confirm\": true,\n \"object_metadata\": {\n \"category\": \"products\",\n \"priority\": \"high\"\n },\n \"blob_property\": \"video\",\n \"blob_type\": \"VIDEO\",\n \"file_hash\": \"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855\",\n \"skip_duplicates\": true\n }\n ],\n \"shared_metadata\": {},\n \"shared_object_metadata\": {}\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.mixpeek.com/v1/buckets/{bucket_identifier}/uploads/batch")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"uploads\": [\n {\n \"filename\": \"<string>\",\n \"content_type\": \"<string>\",\n \"file_size_bytes\": 10485760,\n \"presigned_url_expiration\": 3600,\n \"metadata\": {},\n \"create_object_on_confirm\": true,\n \"object_metadata\": {\n \"category\": \"products\",\n \"priority\": \"high\"\n },\n \"blob_property\": \"video\",\n \"blob_type\": \"VIDEO\",\n \"file_hash\": \"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855\",\n \"skip_duplicates\": true\n }\n ],\n \"shared_metadata\": {},\n \"shared_object_metadata\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.mixpeek.com/v1/buckets/{bucket_identifier}/uploads/batch")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"uploads\": [\n {\n \"filename\": \"<string>\",\n \"content_type\": \"<string>\",\n \"file_size_bytes\": 10485760,\n \"presigned_url_expiration\": 3600,\n \"metadata\": {},\n \"create_object_on_confirm\": true,\n \"object_metadata\": {\n \"category\": \"products\",\n \"priority\": \"high\"\n },\n \"blob_property\": \"video\",\n \"blob_type\": \"VIDEO\",\n \"file_hash\": \"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855\",\n \"skip_duplicates\": true\n }\n ],\n \"shared_metadata\": {},\n \"shared_object_metadata\": {}\n}"
response = http.request(request)
puts response.read_body{
"uploads": [
{
"upload_id": "<string>",
"bucket_id": "<string>",
"filename": "<string>",
"content_type": "<string>",
"presigned_url_expiration": 123,
"s3_key": "<string>",
"create_object_on_confirm": true,
"created_at": "2023-11-07T05:31:56Z",
"expires_at": "2023-11-07T05:31:56Z",
"file_size_bytes": 10485760,
"presigned_url": "<string>",
"metadata": {},
"object_metadata": {},
"blob_property": "<string>",
"blob_type": "<string>",
"file_hash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
"skip_duplicates": true,
"is_duplicate": false,
"duplicate_of_upload_id": "upl_original123",
"skipped_unique_key": false,
"existing_object_id": "obj_abc123xyz789",
"message": "<string>",
"completed_at": "2024-01-15T10:35:00Z",
"verified_at": "2024-01-15T10:35:00Z",
"etag": "d41d8cd98f00b204e9800998ecf8427e",
"object_id": "obj_a1b2c3d4e5f6",
"task_id": "task_abc123"
}
],
"total": 123
}{
"status": 123,
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"details": {}
},
"success": false
}{
"status": 123,
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"details": {}
},
"success": false
}{
"status": 123,
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"details": {}
},
"success": false
}{
"status": 123,
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"details": {}
},
"success": false
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}{
"status": 123,
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"details": {}
},
"success": false
}Uploads
Batch Create Uploads
Generate multiple presigned URLs in a single request.
All uploads belong to the same bucket (from path parameter). Maximum 100 uploads per batch.
Shared metadata is merged with individual upload metadata (individual takes precedence).
POST
/
v1
/
buckets
/
{bucket_identifier}
/
uploads
/
batch
Batch Create Uploads
curl --request POST \
--url https://api.mixpeek.com/v1/buckets/{bucket_identifier}/uploads/batch \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"uploads": [
{
"filename": "<string>",
"content_type": "<string>",
"file_size_bytes": 10485760,
"presigned_url_expiration": 3600,
"metadata": {},
"create_object_on_confirm": true,
"object_metadata": {
"category": "products",
"priority": "high"
},
"blob_property": "video",
"blob_type": "VIDEO",
"file_hash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
"skip_duplicates": true
}
],
"shared_metadata": {},
"shared_object_metadata": {}
}
'import requests
url = "https://api.mixpeek.com/v1/buckets/{bucket_identifier}/uploads/batch"
payload = {
"uploads": [
{
"filename": "<string>",
"content_type": "<string>",
"file_size_bytes": 10485760,
"presigned_url_expiration": 3600,
"metadata": {},
"create_object_on_confirm": True,
"object_metadata": {
"category": "products",
"priority": "high"
},
"blob_property": "video",
"blob_type": "VIDEO",
"file_hash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
"skip_duplicates": True
}
],
"shared_metadata": {},
"shared_object_metadata": {}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
uploads: [
{
filename: '<string>',
content_type: '<string>',
file_size_bytes: 10485760,
presigned_url_expiration: 3600,
metadata: {},
create_object_on_confirm: true,
object_metadata: {category: 'products', priority: 'high'},
blob_property: 'video',
blob_type: 'VIDEO',
file_hash: 'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855',
skip_duplicates: true
}
],
shared_metadata: {},
shared_object_metadata: {}
})
};
fetch('https://api.mixpeek.com/v1/buckets/{bucket_identifier}/uploads/batch', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.mixpeek.com/v1/buckets/{bucket_identifier}/uploads/batch",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'uploads' => [
[
'filename' => '<string>',
'content_type' => '<string>',
'file_size_bytes' => 10485760,
'presigned_url_expiration' => 3600,
'metadata' => [
],
'create_object_on_confirm' => true,
'object_metadata' => [
'category' => 'products',
'priority' => 'high'
],
'blob_property' => 'video',
'blob_type' => 'VIDEO',
'file_hash' => 'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855',
'skip_duplicates' => true
]
],
'shared_metadata' => [
],
'shared_object_metadata' => [
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.mixpeek.com/v1/buckets/{bucket_identifier}/uploads/batch"
payload := strings.NewReader("{\n \"uploads\": [\n {\n \"filename\": \"<string>\",\n \"content_type\": \"<string>\",\n \"file_size_bytes\": 10485760,\n \"presigned_url_expiration\": 3600,\n \"metadata\": {},\n \"create_object_on_confirm\": true,\n \"object_metadata\": {\n \"category\": \"products\",\n \"priority\": \"high\"\n },\n \"blob_property\": \"video\",\n \"blob_type\": \"VIDEO\",\n \"file_hash\": \"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855\",\n \"skip_duplicates\": true\n }\n ],\n \"shared_metadata\": {},\n \"shared_object_metadata\": {}\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.mixpeek.com/v1/buckets/{bucket_identifier}/uploads/batch")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"uploads\": [\n {\n \"filename\": \"<string>\",\n \"content_type\": \"<string>\",\n \"file_size_bytes\": 10485760,\n \"presigned_url_expiration\": 3600,\n \"metadata\": {},\n \"create_object_on_confirm\": true,\n \"object_metadata\": {\n \"category\": \"products\",\n \"priority\": \"high\"\n },\n \"blob_property\": \"video\",\n \"blob_type\": \"VIDEO\",\n \"file_hash\": \"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855\",\n \"skip_duplicates\": true\n }\n ],\n \"shared_metadata\": {},\n \"shared_object_metadata\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.mixpeek.com/v1/buckets/{bucket_identifier}/uploads/batch")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"uploads\": [\n {\n \"filename\": \"<string>\",\n \"content_type\": \"<string>\",\n \"file_size_bytes\": 10485760,\n \"presigned_url_expiration\": 3600,\n \"metadata\": {},\n \"create_object_on_confirm\": true,\n \"object_metadata\": {\n \"category\": \"products\",\n \"priority\": \"high\"\n },\n \"blob_property\": \"video\",\n \"blob_type\": \"VIDEO\",\n \"file_hash\": \"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855\",\n \"skip_duplicates\": true\n }\n ],\n \"shared_metadata\": {},\n \"shared_object_metadata\": {}\n}"
response = http.request(request)
puts response.read_body{
"uploads": [
{
"upload_id": "<string>",
"bucket_id": "<string>",
"filename": "<string>",
"content_type": "<string>",
"presigned_url_expiration": 123,
"s3_key": "<string>",
"create_object_on_confirm": true,
"created_at": "2023-11-07T05:31:56Z",
"expires_at": "2023-11-07T05:31:56Z",
"file_size_bytes": 10485760,
"presigned_url": "<string>",
"metadata": {},
"object_metadata": {},
"blob_property": "<string>",
"blob_type": "<string>",
"file_hash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
"skip_duplicates": true,
"is_duplicate": false,
"duplicate_of_upload_id": "upl_original123",
"skipped_unique_key": false,
"existing_object_id": "obj_abc123xyz789",
"message": "<string>",
"completed_at": "2024-01-15T10:35:00Z",
"verified_at": "2024-01-15T10:35:00Z",
"etag": "d41d8cd98f00b204e9800998ecf8427e",
"object_id": "obj_a1b2c3d4e5f6",
"task_id": "task_abc123"
}
],
"total": 123
}{
"status": 123,
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"details": {}
},
"success": false
}{
"status": 123,
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"details": {}
},
"success": false
}{
"status": 123,
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"details": {}
},
"success": false
}{
"status": 123,
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"details": {}
},
"success": false
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}{
"status": 123,
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"details": {}
},
"success": false
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
The unique identifier of the bucket
Body
application/json
Request to generate multiple presigned URLs in a single request.
List of upload requests (max 100)
Required array length:
1 - 100 elementsShow child attributes
Show child attributes
Metadata to apply to all uploads (merged with individual metadata)
Object metadata to apply to all uploads (merged with individual)
Was this page helpful?
⌘I

