Upload image to multiple sites
curl --request POST \
--url https://api.kameleoon.com/images/multiple \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: multipart/form-data' \
--form image-to-upload='@example-file' \
--form 'params={
"siteIds": [
123
],
"altText": "<string>",
"description": "<string>",
"name": "<string>",
"tags": [
"<string>"
]
}'import requests
url = "https://api.kameleoon.com/images/multiple"
files = { "image-to-upload": ("example-file", open("example-file", "rb")) }
payload = { "params": "{
\"siteIds\": [
123
],
\"altText\": \"<string>\",
\"description\": \"<string>\",
\"name\": \"<string>\",
\"tags\": [
\"<string>\"
]
}" }
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, data=payload, files=files, headers=headers)
print(response.text)const form = new FormData();
form.append('image-to-upload', '<string>');
form.append('params', '{
"siteIds": [
123
],
"altText": "<string>",
"description": "<string>",
"name": "<string>",
"tags": [
"<string>"
]
}');
const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
options.body = form;
fetch('https://api.kameleoon.com/images/multiple', 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://api.kameleoon.com/images/multiple",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"image-to-upload\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"params\"\r\n\r\n{\r\n \"siteIds\": [\r\n 123\r\n ],\r\n \"altText\": \"<string>\",\r\n \"description\": \"<string>\",\r\n \"name\": \"<string>\",\r\n \"tags\": [\r\n \"<string>\"\r\n ]\r\n}\r\n-----011000010111000001101001--",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: multipart/form-data"
],
]);
$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://api.kameleoon.com/images/multiple"
payload := strings.NewReader("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"image-to-upload\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"params\"\r\n\r\n{\r\n \"siteIds\": [\r\n 123\r\n ],\r\n \"altText\": \"<string>\",\r\n \"description\": \"<string>\",\r\n \"name\": \"<string>\",\r\n \"tags\": [\r\n \"<string>\"\r\n ]\r\n}\r\n-----011000010111000001101001--")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.kameleoon.com/images/multiple")
.header("Authorization", "Bearer <token>")
.body("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"image-to-upload\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"params\"\r\n\r\n{\r\n \"siteIds\": [\r\n 123\r\n ],\r\n \"altText\": \"<string>\",\r\n \"description\": \"<string>\",\r\n \"name\": \"<string>\",\r\n \"tags\": [\r\n \"<string>\"\r\n ]\r\n}\r\n-----011000010111000001101001--")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.kameleoon.com/images/multiple")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request.body = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"image-to-upload\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"params\"\r\n\r\n{\r\n \"siteIds\": [\r\n 123\r\n ],\r\n \"altText\": \"<string>\",\r\n \"description\": \"<string>\",\r\n \"name\": \"<string>\",\r\n \"tags\": [\r\n \"<string>\"\r\n ]\r\n}\r\n-----011000010111000001101001--"
response = http.request(request)
puts response.read_body[
{
"altText": "<string>",
"baseColor": 123,
"colorDepth": 123,
"createdById": 123,
"date": "2023-11-07T05:31:56Z",
"description": "<string>",
"fileName": "<string>",
"fileWeight": 123,
"height": 123,
"id": 123,
"keywords": [
"<string>"
],
"name": "<string>",
"path": "<string>",
"shared": true,
"siteId": 123,
"size": 123,
"source": "<string>",
"sourceUrl": "<string>",
"tags": [
"<string>"
],
"width": 123
}
]{
"code": "<string>",
"impersonator": "<string>",
"message": "<string>",
"name": "<string>",
"sub": "<string>",
"time": 123,
"timestamp": "2023-11-07T05:31:56Z"
}{
"code": "<string>",
"impersonator": "<string>",
"message": "<string>",
"name": "<string>",
"sub": "<string>",
"time": 123,
"timestamp": "2023-11-07T05:31:56Z"
}{
"code": "<string>",
"impersonator": "<string>",
"message": "<string>",
"name": "<string>",
"sub": "<string>",
"time": 123,
"timestamp": "2023-11-07T05:31:56Z"
}{
"code": "<string>",
"impersonator": "<string>",
"message": "<string>",
"name": "<string>",
"sub": "<string>",
"time": 123,
"timestamp": "2023-11-07T05:31:56Z"
}{
"code": "<string>",
"impersonator": "<string>",
"message": "<string>",
"name": "<string>",
"sub": "<string>",
"time": 123,
"timestamp": "2023-11-07T05:31:56Z"
}{
"code": "<string>",
"impersonator": "<string>",
"message": "<string>",
"name": "<string>",
"sub": "<string>",
"time": 123,
"timestamp": "2023-11-07T05:31:56Z"
}{
"code": "<string>",
"impersonator": "<string>",
"message": "<string>",
"name": "<string>",
"sub": "<string>",
"time": 123,
"timestamp": "2023-11-07T05:31:56Z"
}{
"code": "<string>",
"impersonator": "<string>",
"message": "<string>",
"name": "<string>",
"sub": "<string>",
"time": 123,
"timestamp": "2023-11-07T05:31:56Z"
}Image
Upload image to multiple sites
Upload image for multiple sites of the same customer
POST
/
images
/
multiple
Upload image to multiple sites
curl --request POST \
--url https://api.kameleoon.com/images/multiple \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: multipart/form-data' \
--form image-to-upload='@example-file' \
--form 'params={
"siteIds": [
123
],
"altText": "<string>",
"description": "<string>",
"name": "<string>",
"tags": [
"<string>"
]
}'import requests
url = "https://api.kameleoon.com/images/multiple"
files = { "image-to-upload": ("example-file", open("example-file", "rb")) }
payload = { "params": "{
\"siteIds\": [
123
],
\"altText\": \"<string>\",
\"description\": \"<string>\",
\"name\": \"<string>\",
\"tags\": [
\"<string>\"
]
}" }
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, data=payload, files=files, headers=headers)
print(response.text)const form = new FormData();
form.append('image-to-upload', '<string>');
form.append('params', '{
"siteIds": [
123
],
"altText": "<string>",
"description": "<string>",
"name": "<string>",
"tags": [
"<string>"
]
}');
const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
options.body = form;
fetch('https://api.kameleoon.com/images/multiple', 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://api.kameleoon.com/images/multiple",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"image-to-upload\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"params\"\r\n\r\n{\r\n \"siteIds\": [\r\n 123\r\n ],\r\n \"altText\": \"<string>\",\r\n \"description\": \"<string>\",\r\n \"name\": \"<string>\",\r\n \"tags\": [\r\n \"<string>\"\r\n ]\r\n}\r\n-----011000010111000001101001--",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: multipart/form-data"
],
]);
$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://api.kameleoon.com/images/multiple"
payload := strings.NewReader("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"image-to-upload\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"params\"\r\n\r\n{\r\n \"siteIds\": [\r\n 123\r\n ],\r\n \"altText\": \"<string>\",\r\n \"description\": \"<string>\",\r\n \"name\": \"<string>\",\r\n \"tags\": [\r\n \"<string>\"\r\n ]\r\n}\r\n-----011000010111000001101001--")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.kameleoon.com/images/multiple")
.header("Authorization", "Bearer <token>")
.body("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"image-to-upload\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"params\"\r\n\r\n{\r\n \"siteIds\": [\r\n 123\r\n ],\r\n \"altText\": \"<string>\",\r\n \"description\": \"<string>\",\r\n \"name\": \"<string>\",\r\n \"tags\": [\r\n \"<string>\"\r\n ]\r\n}\r\n-----011000010111000001101001--")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.kameleoon.com/images/multiple")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request.body = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"image-to-upload\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"params\"\r\n\r\n{\r\n \"siteIds\": [\r\n 123\r\n ],\r\n \"altText\": \"<string>\",\r\n \"description\": \"<string>\",\r\n \"name\": \"<string>\",\r\n \"tags\": [\r\n \"<string>\"\r\n ]\r\n}\r\n-----011000010111000001101001--"
response = http.request(request)
puts response.read_body[
{
"altText": "<string>",
"baseColor": 123,
"colorDepth": 123,
"createdById": 123,
"date": "2023-11-07T05:31:56Z",
"description": "<string>",
"fileName": "<string>",
"fileWeight": 123,
"height": 123,
"id": 123,
"keywords": [
"<string>"
],
"name": "<string>",
"path": "<string>",
"shared": true,
"siteId": 123,
"size": 123,
"source": "<string>",
"sourceUrl": "<string>",
"tags": [
"<string>"
],
"width": 123
}
]{
"code": "<string>",
"impersonator": "<string>",
"message": "<string>",
"name": "<string>",
"sub": "<string>",
"time": 123,
"timestamp": "2023-11-07T05:31:56Z"
}{
"code": "<string>",
"impersonator": "<string>",
"message": "<string>",
"name": "<string>",
"sub": "<string>",
"time": 123,
"timestamp": "2023-11-07T05:31:56Z"
}{
"code": "<string>",
"impersonator": "<string>",
"message": "<string>",
"name": "<string>",
"sub": "<string>",
"time": 123,
"timestamp": "2023-11-07T05:31:56Z"
}{
"code": "<string>",
"impersonator": "<string>",
"message": "<string>",
"name": "<string>",
"sub": "<string>",
"time": 123,
"timestamp": "2023-11-07T05:31:56Z"
}{
"code": "<string>",
"impersonator": "<string>",
"message": "<string>",
"name": "<string>",
"sub": "<string>",
"time": 123,
"timestamp": "2023-11-07T05:31:56Z"
}{
"code": "<string>",
"impersonator": "<string>",
"message": "<string>",
"name": "<string>",
"sub": "<string>",
"time": 123,
"timestamp": "2023-11-07T05:31:56Z"
}{
"code": "<string>",
"impersonator": "<string>",
"message": "<string>",
"name": "<string>",
"sub": "<string>",
"time": 123,
"timestamp": "2023-11-07T05:31:56Z"
}{
"code": "<string>",
"impersonator": "<string>",
"message": "<string>",
"name": "<string>",
"sub": "<string>",
"time": 123,
"timestamp": "2023-11-07T05:31:56Z"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
multipart/form-data
Response
OK
Image base color
Account Id of the image uploader
Date the image was uploaded
Image file name
Image file size in KB
Image format (formats accepted: JPG, JPEG, PNG, GIF, WEBP, SVG, MVG)
Available options:
PNG, JPEG, GIF, SVG, MVG, WEB Image height in pixels
Unique Id of the image
Keyword(s) associated with the image
Image name
Image path
Indicates if the image has been shared
Unique Id of the site your project is associated with
Image size in bytes. Image file size should be maximum 5242880 bytes
Image source
URL or the image source
Image width in pixels
Was this page helpful?
⌘I