Base64 Upload
curl --request PUT \
--url https://files.unifically.com/upload \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"base64": "<string>"
}
'import requests
url = "https://files.unifically.com/upload"
payload = { "base64": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({base64: '<string>'})
};
fetch('https://files.unifically.com/upload', 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://files.unifically.com/upload",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'base64' => '<string>'
]),
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://files.unifically.com/upload"
payload := strings.NewReader("{\n \"base64\": \"<string>\"\n}")
req, _ := http.NewRequest("PUT", 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.put("https://files.unifically.com/upload")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"base64\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://files.unifically.com/upload")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"base64\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"file_url": "<string>"
}Storage
Base64 Upload
Upload files as base64-encoded strings
PUT
/
upload
Base64 Upload
curl --request PUT \
--url https://files.unifically.com/upload \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"base64": "<string>"
}
'import requests
url = "https://files.unifically.com/upload"
payload = { "base64": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({base64: '<string>'})
};
fetch('https://files.unifically.com/upload', 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://files.unifically.com/upload",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'base64' => '<string>'
]),
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://files.unifically.com/upload"
payload := strings.NewReader("{\n \"base64\": \"<string>\"\n}")
req, _ := http.NewRequest("PUT", 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.put("https://files.unifically.com/upload")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"base64\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://files.unifically.com/upload")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"base64\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"file_url": "<string>"
}Upload a file as a base64-encoded string in JSON format. Base64 string can be either raw or data string.
Upload limits:
- Free users: 1 GB per day, up to 5 uploads per minute.
- Paid users (topped up $5 or more): 10 GB per day, up to 50 uploads per minute.
Request
curl --location --request PUT 'https://files.unifically.com/upload' \
--header 'Authorization: Bearer YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data-raw '{
"base64": "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNk+M9QDwADhgGAWjR9awAAAABJRU5ErkJggg=="
}'
Request Body
{
"base64": "YOUR_BASE64_ENCODED_FILE_STRING"
}
Parameters
String
required
Base64-encoded file content
Example
curl --location --request PUT 'https://files.unifically.com/upload' \
--header 'Authorization: Bearer YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data-raw '{
"base64": "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNk+M9QDwADhgGAWjR9awAAAABJRU5ErkJggg=="
}'
Response
Success Response
Status Code:200 OK
{
"success": true,
"file_url": "https://files.unifically.com/image/2b847255-e028-4cf7-a2aa-c638f3e15cbc.webp"
}
boolean
Whether the upload was successful
string
URL to access the uploaded file
Use Cases
- Uploading files from web applications
- When file is already in base64 format
- Best for: Browser-based uploads, embedded images, API integrations
Notes
- Ensure your file is properly base64-encoded before sending
- Base64 encoding increases file size by approximately 33%
- Maximum file size may be limited by your API plan
⌘I
