Upload a branding asset
curl --request POST \
--url https://beta.creatorcore.co/api/v2/org/branding/assets \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: multipart/form-data' \
--header 'X-CreatorCore-Organization-Id: <api-key>' \
--form file=@example-fileconst form = new FormData();
form.append('file', '<string>');
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'X-CreatorCore-Organization-Id': '<api-key>'}
};
options.body = form;
fetch('https://beta.creatorcore.co/api/v2/org/branding/assets', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://beta.creatorcore.co/api/v2/org/branding/assets"
files = { "file": ("example-file", open("example-file", "rb")) }
headers = {
"Authorization": "Bearer <token>",
"X-CreatorCore-Organization-Id": "<api-key>"
}
response = requests.post(url, files=files, headers=headers)
print(response.text){
"success": true,
"mediaAsset": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"organizationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"purpose": "branding_logo",
"visibility": "org",
"url": "<string>",
"publicUrl": "<string>",
"fallbackUrl": "<string>",
"contentType": "<string>",
"sizeBytes": 123,
"originalFilename": "<string>",
"sha256": "<string>",
"cacheControl": "<string>",
"context": {},
"createdAt": "<string>",
"updatedAt": "<string>"
}
}Branding
Upload a branding asset
Multipart upload of a logo or favicon. kind selects validation rules (allowed MIME types and max size) and is recorded on the media asset.
POST
/
api
/
v2
/
org
/
branding
/
assets
Upload a branding asset
curl --request POST \
--url https://beta.creatorcore.co/api/v2/org/branding/assets \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: multipart/form-data' \
--header 'X-CreatorCore-Organization-Id: <api-key>' \
--form file=@example-fileconst form = new FormData();
form.append('file', '<string>');
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'X-CreatorCore-Organization-Id': '<api-key>'}
};
options.body = form;
fetch('https://beta.creatorcore.co/api/v2/org/branding/assets', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://beta.creatorcore.co/api/v2/org/branding/assets"
files = { "file": ("example-file", open("example-file", "rb")) }
headers = {
"Authorization": "Bearer <token>",
"X-CreatorCore-Organization-Id": "<api-key>"
}
response = requests.post(url, files=files, headers=headers)
print(response.text){
"success": true,
"mediaAsset": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"organizationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"purpose": "branding_logo",
"visibility": "org",
"url": "<string>",
"publicUrl": "<string>",
"fallbackUrl": "<string>",
"contentType": "<string>",
"sizeBytes": 123,
"originalFilename": "<string>",
"sha256": "<string>",
"cacheControl": "<string>",
"context": {},
"createdAt": "<string>",
"updatedAt": "<string>"
}
}Authorizations
Body
multipart/form-data
Was this page helpful?