Create upload
curl --request POST \
--url https://api.autoadify.com/v1/media/uploads \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"fileName": "<string>",
"mimeType": "<string>",
"fileSize": 123,
"altText": "<string>"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({fileName: '<string>', mimeType: '<string>', fileSize: 123, altText: '<string>'})
};
fetch('https://api.autoadify.com/v1/media/uploads', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.autoadify.com/v1/media/uploads"
payload = {
"fileName": "<string>",
"mimeType": "<string>",
"fileSize": 123,
"altText": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"media": {
"id": "<string>",
"type": "image",
"status": "pending",
"fileName": "<string>",
"mimeType": "<string>",
"sizeBytes": 0,
"url": "<string>",
"thumbnailUrl": "<string>",
"width": 0,
"height": 0,
"durationSeconds": 0,
"altText": "<string>",
"description": "<string>",
"createdAt": "2023-11-07T05:31:56Z"
},
"upload": {
"method": "PUT",
"url": "<string>",
"headers": {},
"expiresAt": "2023-11-07T05:31:56Z"
},
"next": "<string>"
}{
"error": {
"code": "unauthorized",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "unauthorized",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "unauthorized",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "unauthorized",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "unauthorized",
"message": "<string>",
"details": {}
}
}Media
Create upload
Starts an upload of a local file. PUT the bytes to the returned upload.url with upload.headers within 15 minutes, then call Complete upload.
Requires the publish scope.
POST
/
media
/
uploads
Create upload
curl --request POST \
--url https://api.autoadify.com/v1/media/uploads \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"fileName": "<string>",
"mimeType": "<string>",
"fileSize": 123,
"altText": "<string>"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({fileName: '<string>', mimeType: '<string>', fileSize: 123, altText: '<string>'})
};
fetch('https://api.autoadify.com/v1/media/uploads', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.autoadify.com/v1/media/uploads"
payload = {
"fileName": "<string>",
"mimeType": "<string>",
"fileSize": 123,
"altText": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"media": {
"id": "<string>",
"type": "image",
"status": "pending",
"fileName": "<string>",
"mimeType": "<string>",
"sizeBytes": 0,
"url": "<string>",
"thumbnailUrl": "<string>",
"width": 0,
"height": 0,
"durationSeconds": 0,
"altText": "<string>",
"description": "<string>",
"createdAt": "2023-11-07T05:31:56Z"
},
"upload": {
"method": "PUT",
"url": "<string>",
"headers": {},
"expiresAt": "2023-11-07T05:31:56Z"
},
"next": "<string>"
}{
"error": {
"code": "unauthorized",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "unauthorized",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "unauthorized",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "unauthorized",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "unauthorized",
"message": "<string>",
"details": {}
}
}Authorizations
An API key from Autoadify → Settings → Developers, sent as Authorization: Bearer aak_live_….
Body
application/json

