Start a photo upload
curl --request POST \
--url https://ems-api.aventia.africa/api/public/v1/media/uploads \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"content_type": "image/jpeg",
"filename": "keynote-stage.jpg",
"size": 2483113
}
'const options = {
method: 'POST',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({content_type: 'image/jpeg', filename: 'keynote-stage.jpg', size: 2483113})
};
fetch('https://ems-api.aventia.africa/api/public/v1/media/uploads', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://ems-api.aventia.africa/api/public/v1/media/uploads"
payload = {
"content_type": "image/jpeg",
"filename": "keynote-stage.jpg",
"size": 2483113
}
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://ems-api.aventia.africa/api/public/v1/media/uploads",
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([
'content_type' => 'image/jpeg',
'filename' => 'keynote-stage.jpg',
'size' => 2483113
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"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://ems-api.aventia.africa/api/public/v1/media/uploads"
payload := strings.NewReader("{\n \"content_type\": \"image/jpeg\",\n \"filename\": \"keynote-stage.jpg\",\n \"size\": 2483113\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Basic <encoded-value>")
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))
}{
"expires_at": "2026-11-02T09:15:00Z",
"id": "019a4f2c-0000-7000-8000-000000000020",
"status": "pending",
"upload": {
"fields": {},
"url": "http://localhost:9020/ems-media"
}
}{
"error": "Not Found"
}{
"error": "Not Found"
}{
"error": "validation failed",
"fields": {}
}Photos
Start a photo upload
Step 1 of 3: get a signed form. Needs media:write.
POST
/
api
/
public
/
v1
/
media
/
uploads
Start a photo upload
curl --request POST \
--url https://ems-api.aventia.africa/api/public/v1/media/uploads \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"content_type": "image/jpeg",
"filename": "keynote-stage.jpg",
"size": 2483113
}
'const options = {
method: 'POST',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({content_type: 'image/jpeg', filename: 'keynote-stage.jpg', size: 2483113})
};
fetch('https://ems-api.aventia.africa/api/public/v1/media/uploads', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://ems-api.aventia.africa/api/public/v1/media/uploads"
payload = {
"content_type": "image/jpeg",
"filename": "keynote-stage.jpg",
"size": 2483113
}
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://ems-api.aventia.africa/api/public/v1/media/uploads",
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([
'content_type' => 'image/jpeg',
'filename' => 'keynote-stage.jpg',
'size' => 2483113
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"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://ems-api.aventia.africa/api/public/v1/media/uploads"
payload := strings.NewReader("{\n \"content_type\": \"image/jpeg\",\n \"filename\": \"keynote-stage.jpg\",\n \"size\": 2483113\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Basic <encoded-value>")
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))
}{
"expires_at": "2026-11-02T09:15:00Z",
"id": "019a4f2c-0000-7000-8000-000000000020",
"status": "pending",
"upload": {
"fields": {},
"url": "http://localhost:9020/ems-media"
}
}{
"error": "Not Found"
}{
"error": "Not Found"
}{
"error": "validation failed",
"fields": {}
}Authorizations
Your API key pair from Settings › API keys: public key as the username, secret key as the password.
Body
application/json
The file you're about to upload