cURL
curl --request PUT \
--url 'https://api.minimo.it/public/v1/widgets/settings' \
--header 'Authorization: Bearer YOUR_MINIMO_KEY' \
--header 'Content-Type: application/json' \
--data '{"allowedOrigins": ["https://app.example.com"], "masterTemplateIds": ["TRF4MS9", "RMD2HRS"]}'const res = await fetch('https://api.minimo.it/public/v1/widgets/settings', {
method: 'PUT',
headers: {
Authorization: 'Bearer YOUR_MINIMO_KEY',
'Content-Type': 'application/json',
},
body: JSON.stringify({"allowedOrigins": ["https://app.example.com"], "masterTemplateIds": ["TRF4MS9", "RMD2HRS"]}),
});
const { data } = await res.json();
console.log(data);import requests
res = requests.put(
'https://api.minimo.it/public/v1/widgets/settings',
headers={'Authorization': 'Bearer YOUR_MINIMO_KEY'},
json={"allowedOrigins": ["https://app.example.com"], "masterTemplateIds": ["TRF4MS9", "RMD2HRS"]},
)
print(res.status_code, res.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.minimo.it/public/v1/widgets/settings",
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([
'allowedOrigins' => [
'https://app.example.com',
'http://localhost:3000'
],
'masterTemplateIds' => [
'TRF4MS9',
'RMD2HRS'
]
]),
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://api.minimo.it/public/v1/widgets/settings"
payload := strings.NewReader("{\n \"allowedOrigins\": [\n \"https://app.example.com\",\n \"http://localhost:3000\"\n ],\n \"masterTemplateIds\": [\n \"TRF4MS9\",\n \"RMD2HRS\"\n ]\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://api.minimo.it/public/v1/widgets/settings")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"allowedOrigins\": [\n \"https://app.example.com\",\n \"http://localhost:3000\"\n ],\n \"masterTemplateIds\": [\n \"TRF4MS9\",\n \"RMD2HRS\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.minimo.it/public/v1/widgets/settings")
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 \"allowedOrigins\": [\n \"https://app.example.com\",\n \"http://localhost:3000\"\n ],\n \"masterTemplateIds\": [\n \"TRF4MS9\",\n \"RMD2HRS\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": {
"allowedOrigins": [
"https://app.example.com",
"http://localhost:3000"
],
"masterTemplateIds": [
1201,
1202
],
"masterTemplateUids": [
"TRF4MS9",
"RMD2HRS"
]
}
}{
"status": "FAIL",
"message": "INVALID_PARAMETERS",
"userMessage": "Set the origins allowed to embed the widgets first."
}{
"status": "FAIL",
"message": "INVALID_PARAMETERS",
"userMessage": "Set the origins allowed to embed the widgets first."
}{
"status": "FAIL",
"message": "INVALID_PARAMETERS",
"userMessage": "Set the origins allowed to embed the widgets first."
}Widgets
Update Widget Settings
Set the allowed origins and the master templates. Call it once before the first send with a tenant
PUT
/
public
/
v1
/
widgets
/
settings
cURL
curl --request PUT \
--url 'https://api.minimo.it/public/v1/widgets/settings' \
--header 'Authorization: Bearer YOUR_MINIMO_KEY' \
--header 'Content-Type: application/json' \
--data '{"allowedOrigins": ["https://app.example.com"], "masterTemplateIds": ["TRF4MS9", "RMD2HRS"]}'const res = await fetch('https://api.minimo.it/public/v1/widgets/settings', {
method: 'PUT',
headers: {
Authorization: 'Bearer YOUR_MINIMO_KEY',
'Content-Type': 'application/json',
},
body: JSON.stringify({"allowedOrigins": ["https://app.example.com"], "masterTemplateIds": ["TRF4MS9", "RMD2HRS"]}),
});
const { data } = await res.json();
console.log(data);import requests
res = requests.put(
'https://api.minimo.it/public/v1/widgets/settings',
headers={'Authorization': 'Bearer YOUR_MINIMO_KEY'},
json={"allowedOrigins": ["https://app.example.com"], "masterTemplateIds": ["TRF4MS9", "RMD2HRS"]},
)
print(res.status_code, res.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.minimo.it/public/v1/widgets/settings",
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([
'allowedOrigins' => [
'https://app.example.com',
'http://localhost:3000'
],
'masterTemplateIds' => [
'TRF4MS9',
'RMD2HRS'
]
]),
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://api.minimo.it/public/v1/widgets/settings"
payload := strings.NewReader("{\n \"allowedOrigins\": [\n \"https://app.example.com\",\n \"http://localhost:3000\"\n ],\n \"masterTemplateIds\": [\n \"TRF4MS9\",\n \"RMD2HRS\"\n ]\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://api.minimo.it/public/v1/widgets/settings")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"allowedOrigins\": [\n \"https://app.example.com\",\n \"http://localhost:3000\"\n ],\n \"masterTemplateIds\": [\n \"TRF4MS9\",\n \"RMD2HRS\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.minimo.it/public/v1/widgets/settings")
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 \"allowedOrigins\": [\n \"https://app.example.com\",\n \"http://localhost:3000\"\n ],\n \"masterTemplateIds\": [\n \"TRF4MS9\",\n \"RMD2HRS\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": {
"allowedOrigins": [
"https://app.example.com",
"http://localhost:3000"
],
"masterTemplateIds": [
1201,
1202
],
"masterTemplateUids": [
"TRF4MS9",
"RMD2HRS"
]
}
}{
"status": "FAIL",
"message": "INVALID_PARAMETERS",
"userMessage": "Set the origins allowed to embed the widgets first."
}{
"status": "FAIL",
"message": "INVALID_PARAMETERS",
"userMessage": "Set the origins allowed to embed the widgets first."
}{
"status": "FAIL",
"message": "INVALID_PARAMETERS",
"userMessage": "Set the origins allowed to embed the widgets first."
}Guide: Quickstart. Errors: Errors and limits.
Authorizations
Body
application/json