curl --request POST \
--url https://beta.creatorcore.co/api/v2/media/uploads \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-CreatorCore-Organization-Id: <api-key>' \
--data '
{
"filename": "<string>",
"sizeBytes": 123
}
'const options = {
method: 'POST',
headers: {
Authorization: 'Bearer <token>',
'X-CreatorCore-Organization-Id': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({filename: '<string>', sizeBytes: 123})
};
fetch('https://beta.creatorcore.co/api/v2/media/uploads', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://beta.creatorcore.co/api/v2/media/uploads"
payload = {
"filename": "<string>",
"sizeBytes": 123
}
headers = {
"Authorization": "Bearer <token>",
"X-CreatorCore-Organization-Id": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"success": true,
"upload": {
"id": "<string>",
"purpose": "branding_logo",
"visibility": "org",
"pathname": "<string>",
"contentType": "<string>",
"sizeBytes": 123,
"maxBytes": 123,
"expiresAt": "<string>",
"completeBy": "<string>",
"method": "PUT",
"url": "<string>",
"headers": {},
"storage": {
"provider": "vercel_blob",
"access": "public",
"clientToken": "<string>",
"multipartRecommendedAboveBytes": 123
}
}
}Start a direct upload
Step 1 of uploading a file of any supported size. Declare the file’s filename, contentType and sizeBytes; the server checks purpose, permission, size and type, then returns an upload target. Step 2: send the raw bytes with PUT {url} and every header in headers (or use storage.clientToken with the @vercel/blob SDK for multipart uploads of large videos). Step 3: call POST /api/v2/media/uploads//complete. The upload URL accepts exactly one object at pathname, of exactly contentType, up to maxBytes, until expiresAt. Size limits per purpose: campaign_draft 2GB; campaign_document and campaign_brief 500MB; payout_invoice 50MB; image purposes 20MB. Generic types such as application/octet-stream are rejected: send the file’s real type, or a filename with a known extension.
curl --request POST \
--url https://beta.creatorcore.co/api/v2/media/uploads \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-CreatorCore-Organization-Id: <api-key>' \
--data '
{
"filename": "<string>",
"sizeBytes": 123
}
'const options = {
method: 'POST',
headers: {
Authorization: 'Bearer <token>',
'X-CreatorCore-Organization-Id': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({filename: '<string>', sizeBytes: 123})
};
fetch('https://beta.creatorcore.co/api/v2/media/uploads', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://beta.creatorcore.co/api/v2/media/uploads"
payload = {
"filename": "<string>",
"sizeBytes": 123
}
headers = {
"Authorization": "Bearer <token>",
"X-CreatorCore-Organization-Id": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"success": true,
"upload": {
"id": "<string>",
"purpose": "branding_logo",
"visibility": "org",
"pathname": "<string>",
"contentType": "<string>",
"sizeBytes": 123,
"maxBytes": 123,
"expiresAt": "<string>",
"completeBy": "<string>",
"method": "PUT",
"url": "<string>",
"headers": {},
"storage": {
"provider": "vercel_blob",
"access": "public",
"clientToken": "<string>",
"multipartRecommendedAboveBytes": 123
}
}
}Authorizations
Body
Was this page helpful?