Copia e incolla nel tuo codice
Script pronti per il backend. Sostituisci YOUR_API_KEY e l’email di destinazione, poi invia.
Prima di tutto
Crea una chiave in Chiavi API
con lo scope necessario (es. email:send).
Chiama le API solo dal server — mai dal browser.
Base URL: https://api.unlimitedgo.it/v1
Invio email da un form di contatto
Al submit del form, il tuo backend chiama POST /v1/commands/email.send.
Risposta attesa: 202 (email in coda). Non passare tenant_id.
<?php
// send-form-email.php — chiama questo file al submit del form (server-side)
$apiKey = getenv('UGO_API_KEY') ?: 'YOUR_API_KEY';
$name = trim($_POST['name'] ?? '');
$email = trim($_POST['email'] ?? '');
$message = trim($_POST['message'] ?? '');
$payload = json_encode([
'to' => 'info@tuaazienda.it', // dove vuoi ricevere le richieste
'reply_to' => $email, // email del cliente (dal form)
'sender_name' => 'Form sito web',
'subject' => 'Nuova richiesta da ' . $name,
'body' => '<p><strong>Nome:</strong> ' . htmlspecialchars($name) . '</p>'
. '<p><strong>Email:</strong> ' . htmlspecialchars($email) . '</p>'
. '<p><strong>Messaggio:</strong><br>' . nl2br(htmlspecialchars($message)) . '</p>',
]);
$ch = curl_init('https://api.unlimitedgo.it/v1/commands/email.send');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => true,
CURLOPT_POSTFIELDS => $payload,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . $apiKey,
'Content-Type: application/json',
'Idempotency-Key: ' . bin2hex(random_bytes(16)),
],
]);
$response = curl_exec($ch);
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
// 202 = accettata (invio asincrono). Opzionale: leggi correlation_id e consulta GET /v1/runs/{id}
header('Content-Type: application/json');
http_response_code($httpCode ?: 500);
echo $response;
// send-form-email.js — Node / Express (server-side). Non esporre la chiave nel browser.
import crypto from 'crypto';
const API_KEY = process.env.UGO_API_KEY || 'YOUR_API_KEY';
const API_URL = 'https://api.unlimitedgo.it/v1/commands/email.send';
export async function sendFormEmail({ name, email, message }) {
const res = await fetch(API_URL, {
method: 'POST',
headers: {
'Authorization': `Bearer ${API_KEY}`,
'Content-Type': 'application/json',
'Idempotency-Key': crypto.randomUUID(),
},
body: JSON.stringify({
to: 'info@tuaazienda.it',
reply_to: email,
sender_name: 'Form sito web',
subject: `Nuova richiesta da ${name}`,
body: `<p><strong>Nome:</strong> ${name}</p>
<p><strong>Email:</strong> ${email}</p>
<p><strong>Messaggio:</strong><br>${message}</p>`,
}),
});
const data = await res.json();
// 202 → { status: 'accepted', correlation_id: '...' }
return { ok: res.status === 202, status: res.status, data };
}
// Esempio Express:
// app.post('/api/contact', async (req, res) => {
// const result = await sendFormEmail(req.body);
// res.status(result.status).json(result.data);
// });
curl -X POST "https://api.unlimitedgo.it/v1/commands/email.send" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{
"to": "info@tuaazienda.it",
"reply_to": "cliente@email.com",
"sender_name": "Form sito web",
"subject": "Nuova richiesta da Mario Rossi",
"body": "<p>Nome: Mario Rossi</p><p>Messaggio: Vorrei un preventivo</p>"
}'
Crea una prenotazione da form
Stesso schema: backend → POST /v1/reservations con scope reservations:create.
<?php
$apiKey = getenv('UGO_API_KEY') ?: 'YOUR_API_KEY';
$payload = json_encode([
'customer_name' => trim($_POST['name'] ?? ''),
'phone' => trim($_POST['phone'] ?? ''),
'email' => trim($_POST['email'] ?? ''),
'booking_date' => trim($_POST['date'] ?? ''), // YYYY-MM-DD
'booking_time' => trim($_POST['time'] ?? ''), // HH:MM
'people' => (int) ($_POST['people'] ?? 2),
'notes' => trim($_POST['notes'] ?? ''),
]);
$ch = curl_init('https://api.unlimitedgo.it/v1/reservations');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => true,
CURLOPT_POSTFIELDS => $payload,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . $apiKey,
'Content-Type: application/json',
'Idempotency-Key: ' . bin2hex(random_bytes(16)),
],
]);
$response = curl_exec($ch);
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
header('Content-Type: application/json');
http_response_code($httpCode ?: 500);
echo $response;
import crypto from 'crypto';
const API_KEY = process.env.UGO_API_KEY || 'YOUR_API_KEY';
export async function createReservation(body) {
const res = await fetch('https://api.unlimitedgo.it/v1/reservations', {
method: 'POST',
headers: {
'Authorization': `Bearer ${API_KEY}`,
'Content-Type': 'application/json',
'Idempotency-Key': crypto.randomUUID(),
},
body: JSON.stringify({
customer_name: body.name,
phone: body.phone,
email: body.email,
booking_date: body.date,
booking_time: body.time,
people: Number(body.people || 2),
notes: body.notes || '',
}),
});
return { status: res.status, data: await res.json() };
}
- Chiave API in variabile d’ambiente (
UGO_API_KEY) - Header
Authorization: Bearer … - Su ogni POST:
Idempotency-Keyunivoco Content-Type: application/json- Niente
tenant_idnel body
Prompt Cursor / Codex / Claude
Copia il prompt, aprilo nel tuo IDE AI e lascia che implementi l’integrazione delle API key UGO nel progetto.
- Crea una chiave in Chiavi API (scope es.
email:send). - Copia il prompt qui sotto.
- Incollalo in Cursor, Codex o Claude (chat Agent) sul tuo repository.
- Quando chiede la chiave, mettila in
UGO_API_KEY(env), non nel codice.
Implementa l'integrazione delle API UGO (Unlimited Go) in questo progetto.
## Obiettivo
Collega le API key UGO al codice esistente (form di contatto / prenotazioni / backend) in modo production-ready, senza esporre la chiave al browser.
## Credenziali e config
1. Usa la variabile d'ambiente `UGO_API_KEY` (non hardcodare la chiave nel repo).
2. Base URL: `https://api.unlimitedgo.it/v1`
3. Auth header: `Authorization: Bearer ${UGO_API_KEY}`
4. Alternativa ammessa: `X-API-Key: ${UGO_API_KEY}`
5. Su ogni richiesta POST aggiungi sempre:
- `Content-Type: application/json`
- `Idempotency-Key: <uuid univoco>` (nuovo per ogni submit)
6. NON inviare mai `tenant_id` nel body: l'isolamento è automatico dalla API key portal.
## Cosa implementare
1. Aggiungi `.env` / config con `UGO_API_KEY=` (e documenta dove inserire la chiave creata su https://api.unlimitedgo.it/developers/keys).
2. Crea un piccolo client/helper server-side (PHP o Node, in base allo stack del repo) per chiamare UGO.
3. Collega il form di contatto esistente (o creane uno minimale) a:
`POST https://api.unlimitedgo.it/v1/commands/email.send`
Body esempio:
{
"to": "info@tuaazienda.it",
"reply_to": "<email dal form>",
"sender_name": "Form sito web",
"subject": "Nuova richiesta da <nome>",
"body": "<html con i campi del form>"
}
Scope richiesto sulla chiave: `email:send`
Risposta attesa: HTTP 202 con `{ "status": "accepted", "correlation_id": "..." }`
4. (Opzionale se nel progetto c'è un form prenotazioni) Collega anche:
`POST https://api.unlimitedgo.it/v1/reservations`
con campi: customer_name, phone, email, booking_date, booking_time, people, notes
Scope: `reservations:create`
5. Gestisci errori HTTP (401/403/4xx/5xx) e mostra un messaggio chiaro all'utente.
6. Non chiamare mai le API UGO dal frontend: solo dal backend / route API / server action.
## Vincoli
- Non inventare endpoint diversi da quelli sopra.
- Non committare la API key.
- Riusa lo stack e gli pattern già presenti nel repository.
- Alla fine dimmi: file creati/modificati, come settare `UGO_API_KEY`, e come testare con un submit reale.
Non incollare la API key nel prompt
Il prompt usa già il placeholder env. Dopo l’implementazione, inserisci la chiave solo in .env / secrets del server.
Autenticazione
Per autenticare le tue richieste, includi la chiave API negli header HTTP. Usa uno dei due metodi (non entrambi necessari).
Bearer token
Authorization: Bearer YOUR_API_KEY
X-API-Key
X-API-Key: YOUR_API_KEY
Proteggi la tua chiave
Non condividere mai la chiave API in codice lato client (browser). Usala solo in ambienti server-side sicuri.
Isolamento tenant
Le chiavi create nel portale (key_kind=portal) operano solo sulla tua organizzazione.
Non includere tenant_id nel body o nei query params.
Monitoraggio e contabilizzazione
Ogni chiamata API è tracciata e associata a un correlation_id. Puoi usarlo per verificare l’esito delle operazioni asincrone e per il supporto.
- Audit log — Ogni richiesta viene registrata (metodo, path, status, correlation_id).
- Comandi asincroni — Le chiamate a
email.send,wa.sendeworkflow.triggergenerano un job in coda; lo stato si consulta conGET /v1/runs/{correlation_id}. - Contabilizzazione — Gli invii sono conteggiati per organizzazione (tenant). In Admin del portale sono visibili i volumi (es. ultimi 30 giorni) per report e fatturazione.
Correlation ID
Puoi inviare un X-Correlation-Id nelle richieste per collegare le chiamate ai tuoi log; se omesso, il gateway ne genera uno automaticamente. La risposta 202 dei comandi include sempre il correlation_id da usare con l’endpoint runs.
Status & Health
/v1/status
Health check del gateway.
curl -X GET "https://api.unlimitedgo.it/v1/status"
{
"status": "ok",
"correlation_id": "..."
}
Comandi Asincroni
/v1/commands/email.send
Invia un'email (risposta 202, esito via runs).
Parametri body
curl -X POST "https://api.unlimitedgo.it/v1/commands/email.send" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{"to":"user@example.com","subject":"Oggetto","body":"Testo","sender_name":"Il mio servizio"}'
{
"status": "accepted",
"correlation_id": "..."
}
/v1/commands/wa.send
Invia messaggio WhatsApp (202, esito via runs).
Parametri body
curl -X POST "https://api.unlimitedgo.it/v1/commands/wa.send" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{"to":"+393331234567","template_id":"prenotazione_confermata","components":[{"type":"body","parameters":[{"type":"text","text":"Mario Rossi"},{"type":"text","text":"20:00"}]}]}'
{
"status": "accepted",
"correlation_id": "..."
}
/v1/commands/workflow.trigger
Attiva un workflow (202, esito via runs).
Parametri body
curl -X POST "https://api.unlimitedgo.it/v1/commands/workflow.trigger" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{"workflow_id":123,"payload":{"customer_id":456,"event":"booking_created","booking_id":789}}'
{
"status": "accepted",
"correlation_id": "..."
}
Runs asincrone
/v1/runs/{correlation_id}
Stato di una run asincrona.
curl -X GET "https://api.unlimitedgo.it/v1/runs/CORR_ID" \
-H "Authorization: Bearer YOUR_API_KEY"
{
"status": "done",
"result": "..."
}
Email templates
/v1/email/templates
Elenco template email.
curl -X GET "https://api.unlimitedgo.it/v1/email/templates" \
-H "Authorization: Bearer YOUR_API_KEY"
{
"templates": [
{
"id": 1,
"name": "..."
}
]
}
/v1/email/templates/{id}
Dettaglio template email.
curl -X GET "https://api.unlimitedgo.it/v1/email/templates/1" \
-H "Authorization: Bearer YOUR_API_KEY"
{
"id": 1,
"name": "...",
"subject": "..."
}
/v1/wa/templates
Elenco template WhatsApp.
curl -X GET "https://api.unlimitedgo.it/v1/wa/templates" \
-H "Authorization: Bearer YOUR_API_KEY"
{
"templates": []
}
/v1/wa/status
Stato account WhatsApp.
curl -X GET "https://api.unlimitedgo.it/v1/wa/status" \
-H "Authorization: Bearer YOUR_API_KEY"
{
"accounts": []
}
/v1/wa/onboarding-url
URL di onboarding WhatsApp.
curl -X GET "https://api.unlimitedgo.it/v1/wa/onboarding-url" \
-H "Authorization: Bearer YOUR_API_KEY"
{
"onboarding_url": "..."
}
/v1/wa/sub-accounts
Crea (o recupera) il sub-account Twilio per l'organizzazione associata alla API key. Idempotente: se esiste già restituisce success con already_exists.
Parametri body
curl -X POST "https://api.unlimitedgo.it/v1/wa/sub-accounts" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{}'
{
"success": true,
"account_sid": "AC...",
"already_exists": false
}
Workflow
/v1/workflows
Elenco workflow.
curl -X GET "https://api.unlimitedgo.it/v1/workflows" \
-H "Authorization: Bearer YOUR_API_KEY"
{
"workflows": [
{
"id": 1,
"name": "..."
}
]
}
/v1/workflows/{id}
Dettaglio workflow.
curl -X GET "https://api.unlimitedgo.it/v1/workflows/1" \
-H "Authorization: Bearer YOUR_API_KEY"
{
"id": 1,
"name": "...",
"triggers": []
}
Categorie prenotazione
/v1/booking-categories
Elenco categorie prenotazione.
curl -X GET "https://api.unlimitedgo.it/v1/booking-categories" \
-H "Authorization: Bearer YOUR_API_KEY"
{
"categories": [
{
"id": 1,
"name": "..."
}
]
}
Prenotazioni
/v1/reservations
Elenco prenotazioni con filtri e paginazione.
curl -X GET "https://api.unlimitedgo.it/v1/reservations?page=1&per_page=20" \
-H "Authorization: Bearer YOUR_API_KEY"
{
"reservations": [],
"pagination": {
"page": 1,
"per_page": 20,
"total": 0,
"total_pages": 0
}
}
/v1/reservations/{id}
Dettaglio prenotazione.
curl -X GET "https://api.unlimitedgo.it/v1/reservations/1" \
-H "Authorization: Bearer YOUR_API_KEY"
{
"id": 1,
"type": "...",
"customer_name": "...",
"booking_date": "..."
}
/v1/reservations
Crea prenotazione.
Parametri body
curl -X POST "https://api.unlimitedgo.it/v1/reservations" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{"customer_name":"Mario Rossi","phone":"+393331234567","booking_date":"2026-08-15","booking_time":"20:00","people":2}'
{
"id": 1,
"message": "Reservation created."
}
/v1/reservations/{id}
Aggiorna prenotazione.
Parametri body
curl -X PATCH "https://api.unlimitedgo.it/v1/reservations/1" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"people":4,"notes":"Tavolo esterno"}'
{
"id": 1,
"message": "..."
}
/v1/reservations/{id}/confirm
Conferma prenotazione.
curl -X POST "https://api.unlimitedgo.it/v1/reservations/1/confirm" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{}'
{
"id": 1,
"message": "..."
}
/v1/reservations/{id}/cancel
Annulla prenotazione.
curl -X POST "https://api.unlimitedgo.it/v1/reservations/1/cancel" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{}'
{
"id": 1,
"message": "..."
}
/v1/reservations/{id}/notes
Aggiorna note amministrative.
Parametri body
curl -X PATCH "https://api.unlimitedgo.it/v1/reservations/1/notes" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"admin_notes":"Cliente abituale"}'
{
"id": 1
}
/v1/reservations/{id}
Elimina prenotazione.
curl -X DELETE "https://api.unlimitedgo.it/v1/reservations/1" \
-H "Authorization: Bearer YOUR_API_KEY"
{}
Clienti & Rubrica
/v1/contacts
Elenco contatti con ricerca e paginazione.
curl -X GET "https://api.unlimitedgo.it/v1/contacts?page=1&q=mario" \
-H "Authorization: Bearer YOUR_API_KEY"
{
"contacts": [],
"pagination": []
}
/v1/contacts/{id}
Dettaglio contatto con tag e emoji.
curl -X GET "https://api.unlimitedgo.it/v1/contacts/1" \
-H "Authorization: Bearer YOUR_API_KEY"
{
"id": 1,
"first_name": "...",
"tags": [],
"emojis": []
}
/v1/contacts
Crea contatto.
Parametri body
curl -X POST "https://api.unlimitedgo.it/v1/contacts" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{"first_name":"Mario","last_name":"Rossi","email":"mario@example.com","phone":"+393331234567","consent_gdpr":1}'
{
"id": 1,
"first_name": "..."
}
/v1/contacts/{id}
Aggiorna contatto.
Parametri body
curl -X PATCH "https://api.unlimitedgo.it/v1/contacts/1" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"phone":"+393339999999"}'
{
"id": 1,
"first_name": "..."
}
/v1/contacts/{id}
Elimina contatto.
curl -X DELETE "https://api.unlimitedgo.it/v1/contacts/1" \
-H "Authorization: Bearer YOUR_API_KEY"
{}
/v1/contacts/{id}/tags
Tag del contatto.
curl -X GET "https://api.unlimitedgo.it/v1/contacts/1/tags" \
-H "Authorization: Bearer YOUR_API_KEY"
{
"tags": [
{
"id": 1,
"name": "..."
}
]
}
/v1/contacts/{id}/tags
Sincronizza tag del contatto.
Parametri body
curl -X PUT "https://api.unlimitedgo.it/v1/contacts/1/tags" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"tag_ids":[1,2,3]}'
{
"tags": []
}
/v1/contacts/{id}/emojis
Emoji del contatto.
curl -X GET "https://api.unlimitedgo.it/v1/contacts/1/emojis" \
-H "Authorization: Bearer YOUR_API_KEY"
{
"emojis": [
{
"id": 1,
"name": "..."
}
]
}
/v1/contacts/{id}/emojis
Sincronizza emoji del contatto.
Parametri body
curl -X PUT "https://api.unlimitedgo.it/v1/contacts/1/emojis" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"emoji_ids":[1,2]}'
{
"emojis": []
}
Tag
/v1/tags
Elenco tag.
curl -X GET "https://api.unlimitedgo.it/v1/tags" \
-H "Authorization: Bearer YOUR_API_KEY"
{
"tags": [
{
"id": 1,
"name": "..."
}
]
}
/v1/tags/{id}
Dettaglio tag.
curl -X GET "https://api.unlimitedgo.it/v1/tags/1" \
-H "Authorization: Bearer YOUR_API_KEY"
{
"id": 1,
"name": "..."
}
/v1/tags
Crea tag.
Parametri body
curl -X POST "https://api.unlimitedgo.it/v1/tags" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{"name":"VIP"}'
{
"id": 1,
"name": "..."
}
/v1/tags/{id}
Aggiorna tag.
Parametri body
curl -X PATCH "https://api.unlimitedgo.it/v1/tags/1" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"name":"Cliente abituale"}'
{
"id": 1,
"name": "..."
}
/v1/tags/{id}
Elimina tag.
curl -X DELETE "https://api.unlimitedgo.it/v1/tags/1" \
-H "Authorization: Bearer YOUR_API_KEY"
{}
Mailing list
/v1/mailing-lists
Elenco liste email.
curl -X GET "https://api.unlimitedgo.it/v1/mailing-lists" \
-H "Authorization: Bearer YOUR_API_KEY"
{
"lists": [
{
"id": 1,
"name": "...",
"members_count": 0
}
]
}
/v1/mailing-lists/{id}
Dettaglio lista.
curl -X GET "https://api.unlimitedgo.it/v1/mailing-lists/1" \
-H "Authorization: Bearer YOUR_API_KEY"
{
"id": 1,
"name": "...",
"address": "...",
"members_count": 0
}
/v1/mailing-lists
Crea lista email.
Parametri body
curl -X POST "https://api.unlimitedgo.it/v1/mailing-lists" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{"name":"Newsletter"}'
{
"id": 1,
"name": "...",
"address": "..."
}
/v1/mailing-lists/{id}
Aggiorna lista.
Parametri body
curl -X PATCH "https://api.unlimitedgo.it/v1/mailing-lists/1" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"name":"Promo estate"}'
{
"id": 1,
"name": "..."
}
/v1/mailing-lists/{id}
Elimina lista.
curl -X DELETE "https://api.unlimitedgo.it/v1/mailing-lists/1" \
-H "Authorization: Bearer YOUR_API_KEY"
{}
/v1/mailing-lists/{id}/members
Membri della lista.
curl -X GET "https://api.unlimitedgo.it/v1/mailing-lists/1/members" \
-H "Authorization: Bearer YOUR_API_KEY"
{
"members": [
{
"client_id": 1,
"email": "..."
}
]
}
/v1/mailing-lists/{id}/members
Aggiungi membro (contatto) alla lista.
Parametri body
curl -X POST "https://api.unlimitedgo.it/v1/mailing-lists/1/members" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{"client_id":42}'
{
"message": "Member added"
}
/v1/mailing-lists/{id}/members/{client_id}
Rimuovi membro dalla lista.
curl -X DELETE "https://api.unlimitedgo.it/v1/mailing-lists/1/members/42" \
-H "Authorization: Bearer YOUR_API_KEY"
{}
Autosync
/v1/autosync/bookings
Invia una o più prenotazioni (push da sistema esterno).
curl -X POST "https://api.unlimitedgo.it/v1/autosync/bookings" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{"customer_name":"Mario Rossi","booking_date":"2026-08-15","booking_time":"20:00","people":2}'
{
"created_ids": [
1,
2
],
"count": 2,
"errors": []
}
/v1/autosync/config
Elenco configurazioni autosync del tenant.
curl -X GET "https://api.unlimitedgo.it/v1/autosync/config" \
-H "Authorization: Bearer YOUR_API_KEY"
{
"configs": [
{
"id": 1,
"site_url": "...",
"pixel_token_masked": "****",
"bookings_synced": 0
}
]
}
Social & AI
/v1/social/connections
Stato connessione Meta (Facebook/Instagram).
curl -X GET "https://api.unlimitedgo.it/v1/social/connections" \
-H "Authorization: Bearer YOUR_API_KEY"
{
"connection": {
"page_id": "...",
"ig_username": "..."
},
"health": []
}
/v1/social/onboarding-url
URL OAuth per collegare account Meta.
curl -X GET "https://api.unlimitedgo.it/v1/social/onboarding-url" \
-H "Authorization: Bearer YOUR_API_KEY"
{
"oauth_url": "https:\/\/..."
}
/v1/social/actions
Elenco azioni social (pubblicazioni, scheduling).
curl -X GET "https://api.unlimitedgo.it/v1/social/actions" \
-H "Authorization: Bearer YOUR_API_KEY"
{
"actions": [],
"dead_letter": []
}
/v1/social/actions
Crea azione (pubblicazione FB/IG o schedulata).
Parametri body
curl -X POST "https://api.unlimitedgo.it/v1/social/actions" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{"action_type":"publish_fb","payload":{"message":"Ciao dal tuo locale!"}}'
{
"success": true,
"action_id": 1
}
/v1/social/actions/{id}
Elimina azione (e contenuto su Meta se già pubblicato).
curl -X DELETE "https://api.unlimitedgo.it/v1/social/actions/1" \
-H "Authorization: Bearer YOUR_API_KEY"
{}