Generazione Nuovo Account Trilly da Partner
curl --request POST \
--url https://backend.trilly.chat/api/client/create \
--header 'Content-Type: application/json' \
--data '
{
"name": "Mario Rossi",
"email": "cliente@example.com",
"password": "passwordSicura!",
"phone": "3331122334",
"account_type": "full"
}
'import requests
url = "https://backend.trilly.chat/api/client/create"
payload = {
"name": "Mario Rossi",
"email": "cliente@example.com",
"password": "passwordSicura!",
"phone": "3331122334",
"account_type": "full"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Mario Rossi',
email: 'cliente@example.com',
password: 'passwordSicura!',
phone: '3331122334',
account_type: 'full'
})
};
fetch('https://backend.trilly.chat/api/client/create', 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://backend.trilly.chat/api/client/create",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'Mario Rossi',
'email' => 'cliente@example.com',
'password' => 'passwordSicura!',
'phone' => '3331122334',
'account_type' => 'full'
]),
CURLOPT_HTTPHEADER => [
"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://backend.trilly.chat/api/client/create"
payload := strings.NewReader("{\n \"name\": \"Mario Rossi\",\n \"email\": \"cliente@example.com\",\n \"password\": \"passwordSicura!\",\n \"phone\": \"3331122334\",\n \"account_type\": \"full\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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.post("https://backend.trilly.chat/api/client/create")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Mario Rossi\",\n \"email\": \"cliente@example.com\",\n \"password\": \"passwordSicura!\",\n \"phone\": \"3331122334\",\n \"account_type\": \"full\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://backend.trilly.chat/api/client/create")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Mario Rossi\",\n \"email\": \"cliente@example.com\",\n \"password\": \"passwordSicura!\",\n \"phone\": \"3331122334\",\n \"account_type\": \"full\"\n}"
response = http.request(request)
puts response.read_body{
"id_client": "abc123def456",
"id_sessione": "sess789ghi012",
"api_key": "xyz-unique-apikey",
"nome_account": "Mario Rossi",
"telefono": "3331122334",
"email_di_login": "cliente@example.com",
"account_type": "full",
"timestamp": "2025-04-16T12:00:00Z"
}Partners
Generazione Nuovo Account Trilly da Partner
Questa chiamata consente ai partner di creare nuovi account cliente associati al proprio Account Partner. In seguito alla creazione, vengono generati e restituiti automaticamente API Key, ID Cliente e ID sessione; inoltre il cliente apparirà nella Dashboard Partner.
Email e password, se non verranno forniti dal Partner ai singoli clienti per accesso individuale a Trilly (tipicamente in caso di White Label), potranno essere “di fantasia” (ma la email deve avere il formato con @).
In caso di successo, verranno restituiti i dettagli del nuovo account cliente, inclusi l’ID cliente, l’ID sessione, e la nuova API Key.
POST
/
api
/
client
/
create
Generazione Nuovo Account Trilly da Partner
curl --request POST \
--url https://backend.trilly.chat/api/client/create \
--header 'Content-Type: application/json' \
--data '
{
"name": "Mario Rossi",
"email": "cliente@example.com",
"password": "passwordSicura!",
"phone": "3331122334",
"account_type": "full"
}
'import requests
url = "https://backend.trilly.chat/api/client/create"
payload = {
"name": "Mario Rossi",
"email": "cliente@example.com",
"password": "passwordSicura!",
"phone": "3331122334",
"account_type": "full"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Mario Rossi',
email: 'cliente@example.com',
password: 'passwordSicura!',
phone: '3331122334',
account_type: 'full'
})
};
fetch('https://backend.trilly.chat/api/client/create', 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://backend.trilly.chat/api/client/create",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'Mario Rossi',
'email' => 'cliente@example.com',
'password' => 'passwordSicura!',
'phone' => '3331122334',
'account_type' => 'full'
]),
CURLOPT_HTTPHEADER => [
"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://backend.trilly.chat/api/client/create"
payload := strings.NewReader("{\n \"name\": \"Mario Rossi\",\n \"email\": \"cliente@example.com\",\n \"password\": \"passwordSicura!\",\n \"phone\": \"3331122334\",\n \"account_type\": \"full\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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.post("https://backend.trilly.chat/api/client/create")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Mario Rossi\",\n \"email\": \"cliente@example.com\",\n \"password\": \"passwordSicura!\",\n \"phone\": \"3331122334\",\n \"account_type\": \"full\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://backend.trilly.chat/api/client/create")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Mario Rossi\",\n \"email\": \"cliente@example.com\",\n \"password\": \"passwordSicura!\",\n \"phone\": \"3331122334\",\n \"account_type\": \"full\"\n}"
response = http.request(request)
puts response.read_body{
"id_client": "abc123def456",
"id_sessione": "sess789ghi012",
"api_key": "xyz-unique-apikey",
"nome_account": "Mario Rossi",
"telefono": "3331122334",
"email_di_login": "cliente@example.com",
"account_type": "full",
"timestamp": "2025-04-16T12:00:00Z"
}Query Parameters
API Key del Partner.
Body
application/json
Nome dell'account cliente.
Email associata all'account (deve rispettare il formato email).
Password del cliente.
Numero di telefono associato al cliente.
Tipologia dell'account.
test: 100 crediti e scadenza account dopo 14 giorni dalla creazione.baby: 2000 crediti a refill annuale.full: nessuna limitazione (account attuali).
Available options:
test, baby, full Response
200 - application/json
OK
ID del cliente.
ID della sessione.
API Key assegnata al nuovo account cliente.
Nome dell'account cliente.
Numero di telefono associato.
Email usata per il login cliente.
Tipologia dell'account creato.
Data e ora chiamata (fuso orario UTC).

