cURL
curl --request PUT \
--url 'https://api.minimo.it/public/v1/tenants/restaurant_4812/subscriptions' \
--header 'Authorization: Bearer YOUR_MINIMO_KEY' \
--header 'Content-Type: application/json' \
--data '{"subscriptions": [{"email": "anna@example.com", "status": "subscribed", "source": "booking", "firstName": "Anna", "evidence": {"ref": "booking:9921", "consentText": "I want offers and news from Trattoria da Mario by email.", "consentedAt": "2026-11-08T19:30:00+01:00"}}]}'const res = await fetch('https://api.minimo.it/public/v1/tenants/restaurant_4812/subscriptions', {
method: 'PUT',
headers: {
Authorization: 'Bearer YOUR_MINIMO_KEY',
'Content-Type': 'application/json',
},
body: JSON.stringify({"subscriptions": [{"email": "anna@example.com", "status": "subscribed", "source": "booking", "firstName": "Anna", "evidence": {"ref": "booking:9921", "consentText": "I want offers and news from Trattoria da Mario by email.", "consentedAt": "2026-11-08T19:30:00+01:00"}}]}),
});
const { data } = await res.json();
console.log(data);import requests
res = requests.put(
'https://api.minimo.it/public/v1/tenants/restaurant_4812/subscriptions',
headers={'Authorization': 'Bearer YOUR_MINIMO_KEY'},
json={"subscriptions": [{"email": "anna@example.com", "status": "subscribed", "source": "booking", "firstName": "Anna", "evidence": {"ref": "booking:9921", "consentText": "I want offers and news from Trattoria da Mario by email.", "consentedAt": "2026-11-08T19:30:00+01:00"}}]},
)
print(res.status_code, res.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.minimo.it/public/v1/tenants/{tenant}/subscriptions",
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([
'subscriptions' => [
[
'email' => 'anna@example.com',
'status' => 'subscribed',
'source' => 'booking',
'firstName' => 'Anna',
'evidence' => [
'ref' => 'booking:9921',
'consentText' => 'I want offers and news from Trattoria da Mario by email.',
'consentedAt' => '2026-11-08T19:30:00+01:00'
]
]
]
]),
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/tenants/{tenant}/subscriptions"
payload := strings.NewReader("{\n \"subscriptions\": [\n {\n \"email\": \"anna@example.com\",\n \"status\": \"subscribed\",\n \"source\": \"booking\",\n \"firstName\": \"Anna\",\n \"evidence\": {\n \"ref\": \"booking:9921\",\n \"consentText\": \"I want offers and news from Trattoria da Mario by email.\",\n \"consentedAt\": \"2026-11-08T19:30:00+01:00\"\n }\n }\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/tenants/{tenant}/subscriptions")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"subscriptions\": [\n {\n \"email\": \"anna@example.com\",\n \"status\": \"subscribed\",\n \"source\": \"booking\",\n \"firstName\": \"Anna\",\n \"evidence\": {\n \"ref\": \"booking:9921\",\n \"consentText\": \"I want offers and news from Trattoria da Mario by email.\",\n \"consentedAt\": \"2026-11-08T19:30:00+01:00\"\n }\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.minimo.it/public/v1/tenants/{tenant}/subscriptions")
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 \"subscriptions\": [\n {\n \"email\": \"anna@example.com\",\n \"status\": \"subscribed\",\n \"source\": \"booking\",\n \"firstName\": \"Anna\",\n \"evidence\": {\n \"ref\": \"booking:9921\",\n \"consentText\": \"I want offers and news from Trattoria da Mario by email.\",\n \"consentedAt\": \"2026-11-08T19:30:00+01:00\"\n }\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": {
"tenant": "restaurant_4812",
"results": [
{
"index": 0,
"email": "anna@example.com",
"contactId": 4521,
"outcome": "subscribed",
"error": null,
"code": null
}
]
}
}{
"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."
}{
"status": "FAIL",
"message": "INVALID_PARAMETERS",
"userMessage": "Set the origins allowed to embed the widgets first."
}Tenants
Record Guest Consent
Record the marketing consent a guest gave to one restaurant, with evidence
PUT
/
public
/
v1
/
tenants
/
{tenant}
/
subscriptions
cURL
curl --request PUT \
--url 'https://api.minimo.it/public/v1/tenants/restaurant_4812/subscriptions' \
--header 'Authorization: Bearer YOUR_MINIMO_KEY' \
--header 'Content-Type: application/json' \
--data '{"subscriptions": [{"email": "anna@example.com", "status": "subscribed", "source": "booking", "firstName": "Anna", "evidence": {"ref": "booking:9921", "consentText": "I want offers and news from Trattoria da Mario by email.", "consentedAt": "2026-11-08T19:30:00+01:00"}}]}'const res = await fetch('https://api.minimo.it/public/v1/tenants/restaurant_4812/subscriptions', {
method: 'PUT',
headers: {
Authorization: 'Bearer YOUR_MINIMO_KEY',
'Content-Type': 'application/json',
},
body: JSON.stringify({"subscriptions": [{"email": "anna@example.com", "status": "subscribed", "source": "booking", "firstName": "Anna", "evidence": {"ref": "booking:9921", "consentText": "I want offers and news from Trattoria da Mario by email.", "consentedAt": "2026-11-08T19:30:00+01:00"}}]}),
});
const { data } = await res.json();
console.log(data);import requests
res = requests.put(
'https://api.minimo.it/public/v1/tenants/restaurant_4812/subscriptions',
headers={'Authorization': 'Bearer YOUR_MINIMO_KEY'},
json={"subscriptions": [{"email": "anna@example.com", "status": "subscribed", "source": "booking", "firstName": "Anna", "evidence": {"ref": "booking:9921", "consentText": "I want offers and news from Trattoria da Mario by email.", "consentedAt": "2026-11-08T19:30:00+01:00"}}]},
)
print(res.status_code, res.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.minimo.it/public/v1/tenants/{tenant}/subscriptions",
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([
'subscriptions' => [
[
'email' => 'anna@example.com',
'status' => 'subscribed',
'source' => 'booking',
'firstName' => 'Anna',
'evidence' => [
'ref' => 'booking:9921',
'consentText' => 'I want offers and news from Trattoria da Mario by email.',
'consentedAt' => '2026-11-08T19:30:00+01:00'
]
]
]
]),
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/tenants/{tenant}/subscriptions"
payload := strings.NewReader("{\n \"subscriptions\": [\n {\n \"email\": \"anna@example.com\",\n \"status\": \"subscribed\",\n \"source\": \"booking\",\n \"firstName\": \"Anna\",\n \"evidence\": {\n \"ref\": \"booking:9921\",\n \"consentText\": \"I want offers and news from Trattoria da Mario by email.\",\n \"consentedAt\": \"2026-11-08T19:30:00+01:00\"\n }\n }\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/tenants/{tenant}/subscriptions")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"subscriptions\": [\n {\n \"email\": \"anna@example.com\",\n \"status\": \"subscribed\",\n \"source\": \"booking\",\n \"firstName\": \"Anna\",\n \"evidence\": {\n \"ref\": \"booking:9921\",\n \"consentText\": \"I want offers and news from Trattoria da Mario by email.\",\n \"consentedAt\": \"2026-11-08T19:30:00+01:00\"\n }\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.minimo.it/public/v1/tenants/{tenant}/subscriptions")
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 \"subscriptions\": [\n {\n \"email\": \"anna@example.com\",\n \"status\": \"subscribed\",\n \"source\": \"booking\",\n \"firstName\": \"Anna\",\n \"evidence\": {\n \"ref\": \"booking:9921\",\n \"consentText\": \"I want offers and news from Trattoria da Mario by email.\",\n \"consentedAt\": \"2026-11-08T19:30:00+01:00\"\n }\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": {
"tenant": "restaurant_4812",
"results": [
{
"index": 0,
"email": "anna@example.com",
"contactId": 4521,
"outcome": "subscribed",
"error": null,
"code": null
}
]
}
}{
"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."
}{
"status": "FAIL",
"message": "INVALID_PARAMETERS",
"userMessage": "Set the origins allowed to embed the widgets first."
}Guide: Consent, unsubscribe and preferences. Errors: Errors and limits.