Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
curl --request PATCH \
--url http://localhost:3000/v2/orgs/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Acme Corporation",
"domain": "acmecorp.com",
"icon": {
"file": {},
"external": {},
"file_upload": {}
},
"microsoftDomains": [
"contoso.com",
"fabrikam.com"
],
"theme": {
"primaryColor": "#2563eb",
"textColor": "#ffffff"
},
"settings": {
"defaultAgent": "base39-orbit-chat",
"defaultWhatsAppAgent": "base39-orbit-whatsapp",
"homeShortcuts": [
{
"id": "<string>",
"visible": true
}
],
"authentication": {
"emailPasswordEnabled": true,
"googleEnabled": true,
"microsoftEnabled": true,
"passkeyEnabled": true,
"samlEnabled": true,
"require2FA": true
},
"ipRestrictions": {
"enabled": true,
"allowedCidrs": [
"<string>"
]
},
"objectSettings": {
"deal": {
"properties": {},
"relations": {}
}
},
"datasetQueries": [
{
"entityType": "company",
"slug": "serasa_crednet",
"mode": "manual"
}
]
},
"legalName": "Acme Corporation LTDA",
"tradeName": "Acme",
"document": "12345678000190",
"billingAddress": {},
"invoiceEmails": [
"financeiro@acme.com"
],
"ownerUserId": "usr_abc123"
}
'import requests
url = "http://localhost:3000/v2/orgs/{id}"
payload = {
"name": "Acme Corporation",
"domain": "acmecorp.com",
"icon": {
"file": {},
"external": {},
"file_upload": {}
},
"microsoftDomains": ["contoso.com", "fabrikam.com"],
"theme": {
"primaryColor": "#2563eb",
"textColor": "#ffffff"
},
"settings": {
"defaultAgent": "base39-orbit-chat",
"defaultWhatsAppAgent": "base39-orbit-whatsapp",
"homeShortcuts": [
{
"id": "<string>",
"visible": True
}
],
"authentication": {
"emailPasswordEnabled": True,
"googleEnabled": True,
"microsoftEnabled": True,
"passkeyEnabled": True,
"samlEnabled": True,
"require2FA": True
},
"ipRestrictions": {
"enabled": True,
"allowedCidrs": ["<string>"]
},
"objectSettings": { "deal": {
"properties": {},
"relations": {}
} },
"datasetQueries": [
{
"entityType": "company",
"slug": "serasa_crednet",
"mode": "manual"
}
]
},
"legalName": "Acme Corporation LTDA",
"tradeName": "Acme",
"document": "12345678000190",
"billingAddress": {},
"invoiceEmails": ["financeiro@acme.com"],
"ownerUserId": "usr_abc123"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Acme Corporation',
domain: 'acmecorp.com',
icon: {file: {}, external: {}, file_upload: {}},
microsoftDomains: ['contoso.com', 'fabrikam.com'],
theme: {primaryColor: '#2563eb', textColor: '#ffffff'},
settings: {
defaultAgent: 'base39-orbit-chat',
defaultWhatsAppAgent: 'base39-orbit-whatsapp',
homeShortcuts: [{id: '<string>', visible: true}],
authentication: {
emailPasswordEnabled: true,
googleEnabled: true,
microsoftEnabled: true,
passkeyEnabled: true,
samlEnabled: true,
require2FA: true
},
ipRestrictions: {enabled: true, allowedCidrs: ['<string>']},
objectSettings: {deal: {properties: {}, relations: {}}},
datasetQueries: [{entityType: 'company', slug: 'serasa_crednet', mode: 'manual'}]
},
legalName: 'Acme Corporation LTDA',
tradeName: 'Acme',
document: '12345678000190',
billingAddress: {},
invoiceEmails: ['financeiro@acme.com'],
ownerUserId: 'usr_abc123'
})
};
fetch('http://localhost:3000/v2/orgs/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "3000",
CURLOPT_URL => "http://localhost:3000/v2/orgs/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'Acme Corporation',
'domain' => 'acmecorp.com',
'icon' => [
'file' => [
],
'external' => [
],
'file_upload' => [
]
],
'microsoftDomains' => [
'contoso.com',
'fabrikam.com'
],
'theme' => [
'primaryColor' => '#2563eb',
'textColor' => '#ffffff'
],
'settings' => [
'defaultAgent' => 'base39-orbit-chat',
'defaultWhatsAppAgent' => 'base39-orbit-whatsapp',
'homeShortcuts' => [
[
'id' => '<string>',
'visible' => true
]
],
'authentication' => [
'emailPasswordEnabled' => true,
'googleEnabled' => true,
'microsoftEnabled' => true,
'passkeyEnabled' => true,
'samlEnabled' => true,
'require2FA' => true
],
'ipRestrictions' => [
'enabled' => true,
'allowedCidrs' => [
'<string>'
]
],
'objectSettings' => [
'deal' => [
'properties' => [
],
'relations' => [
]
]
],
'datasetQueries' => [
[
'entityType' => 'company',
'slug' => 'serasa_crednet',
'mode' => 'manual'
]
]
],
'legalName' => 'Acme Corporation LTDA',
'tradeName' => 'Acme',
'document' => '12345678000190',
'billingAddress' => [
],
'invoiceEmails' => [
'financeiro@acme.com'
],
'ownerUserId' => 'usr_abc123'
]),
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 := "http://localhost:3000/v2/orgs/{id}"
payload := strings.NewReader("{\n \"name\": \"Acme Corporation\",\n \"domain\": \"acmecorp.com\",\n \"icon\": {\n \"file\": {},\n \"external\": {},\n \"file_upload\": {}\n },\n \"microsoftDomains\": [\n \"contoso.com\",\n \"fabrikam.com\"\n ],\n \"theme\": {\n \"primaryColor\": \"#2563eb\",\n \"textColor\": \"#ffffff\"\n },\n \"settings\": {\n \"defaultAgent\": \"base39-orbit-chat\",\n \"defaultWhatsAppAgent\": \"base39-orbit-whatsapp\",\n \"homeShortcuts\": [\n {\n \"id\": \"<string>\",\n \"visible\": true\n }\n ],\n \"authentication\": {\n \"emailPasswordEnabled\": true,\n \"googleEnabled\": true,\n \"microsoftEnabled\": true,\n \"passkeyEnabled\": true,\n \"samlEnabled\": true,\n \"require2FA\": true\n },\n \"ipRestrictions\": {\n \"enabled\": true,\n \"allowedCidrs\": [\n \"<string>\"\n ]\n },\n \"objectSettings\": {\n \"deal\": {\n \"properties\": {},\n \"relations\": {}\n }\n },\n \"datasetQueries\": [\n {\n \"entityType\": \"company\",\n \"slug\": \"serasa_crednet\",\n \"mode\": \"manual\"\n }\n ]\n },\n \"legalName\": \"Acme Corporation LTDA\",\n \"tradeName\": \"Acme\",\n \"document\": \"12345678000190\",\n \"billingAddress\": {},\n \"invoiceEmails\": [\n \"financeiro@acme.com\"\n ],\n \"ownerUserId\": \"usr_abc123\"\n}")
req, _ := http.NewRequest("PATCH", 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.patch("http://localhost:3000/v2/orgs/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Acme Corporation\",\n \"domain\": \"acmecorp.com\",\n \"icon\": {\n \"file\": {},\n \"external\": {},\n \"file_upload\": {}\n },\n \"microsoftDomains\": [\n \"contoso.com\",\n \"fabrikam.com\"\n ],\n \"theme\": {\n \"primaryColor\": \"#2563eb\",\n \"textColor\": \"#ffffff\"\n },\n \"settings\": {\n \"defaultAgent\": \"base39-orbit-chat\",\n \"defaultWhatsAppAgent\": \"base39-orbit-whatsapp\",\n \"homeShortcuts\": [\n {\n \"id\": \"<string>\",\n \"visible\": true\n }\n ],\n \"authentication\": {\n \"emailPasswordEnabled\": true,\n \"googleEnabled\": true,\n \"microsoftEnabled\": true,\n \"passkeyEnabled\": true,\n \"samlEnabled\": true,\n \"require2FA\": true\n },\n \"ipRestrictions\": {\n \"enabled\": true,\n \"allowedCidrs\": [\n \"<string>\"\n ]\n },\n \"objectSettings\": {\n \"deal\": {\n \"properties\": {},\n \"relations\": {}\n }\n },\n \"datasetQueries\": [\n {\n \"entityType\": \"company\",\n \"slug\": \"serasa_crednet\",\n \"mode\": \"manual\"\n }\n ]\n },\n \"legalName\": \"Acme Corporation LTDA\",\n \"tradeName\": \"Acme\",\n \"document\": \"12345678000190\",\n \"billingAddress\": {},\n \"invoiceEmails\": [\n \"financeiro@acme.com\"\n ],\n \"ownerUserId\": \"usr_abc123\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:3000/v2/orgs/{id}")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Acme Corporation\",\n \"domain\": \"acmecorp.com\",\n \"icon\": {\n \"file\": {},\n \"external\": {},\n \"file_upload\": {}\n },\n \"microsoftDomains\": [\n \"contoso.com\",\n \"fabrikam.com\"\n ],\n \"theme\": {\n \"primaryColor\": \"#2563eb\",\n \"textColor\": \"#ffffff\"\n },\n \"settings\": {\n \"defaultAgent\": \"base39-orbit-chat\",\n \"defaultWhatsAppAgent\": \"base39-orbit-whatsapp\",\n \"homeShortcuts\": [\n {\n \"id\": \"<string>\",\n \"visible\": true\n }\n ],\n \"authentication\": {\n \"emailPasswordEnabled\": true,\n \"googleEnabled\": true,\n \"microsoftEnabled\": true,\n \"passkeyEnabled\": true,\n \"samlEnabled\": true,\n \"require2FA\": true\n },\n \"ipRestrictions\": {\n \"enabled\": true,\n \"allowedCidrs\": [\n \"<string>\"\n ]\n },\n \"objectSettings\": {\n \"deal\": {\n \"properties\": {},\n \"relations\": {}\n }\n },\n \"datasetQueries\": [\n {\n \"entityType\": \"company\",\n \"slug\": \"serasa_crednet\",\n \"mode\": \"manual\"\n }\n ]\n },\n \"legalName\": \"Acme Corporation LTDA\",\n \"tradeName\": \"Acme\",\n \"document\": \"12345678000190\",\n \"billingAddress\": {},\n \"invoiceEmails\": [\n \"financeiro@acme.com\"\n ],\n \"ownerUserId\": \"usr_abc123\"\n}"
response = http.request(request)
puts response.read_body{
"object": "page",
"id": "p_abc123",
"createdAt": "2024-01-15T10:30:00.000Z",
"updatedAt": "2024-01-15T14:45:00.000Z",
"name": "Acme Corp",
"slug": "acme",
"billing": "stripe",
"invoiceEmails": [
"<string>"
],
"createdBy": {
"object": "user",
"id": "u_abc123",
"apiKeyId": "bsk_abc123"
},
"updatedBy": {
"object": "user",
"id": "u_abc123",
"apiKeyId": "bsk_abc123"
},
"legalName": "<string>",
"tradeName": "<string>",
"status": "draft",
"domain": "<string>",
"allow_auto_join": true,
"microsoftTenants": [
{
"domain": "contoso.com",
"tenantId": "36691401-5cfd-4754-a328-acba3782dee8"
}
],
"stripeCustomerId": "<string>",
"stripeSubscriptionId": "<string>",
"kongCustomerId": "<string>",
"trialEndedAt": "2023-11-07T05:31:56Z",
"icon": {
"type": "emoji",
"emoji": "page_icon",
"external": {
"url": "https://example.com/image.jpg"
},
"file_upload": {
"id": "fu_abc123"
},
"domain": "acme.com",
"file": {
"url": "https://s3.amazonaws.com/...",
"expiryTime": "2024-01-15T10:30:00.000Z"
},
"lucide": "file-text",
"brand": "github",
"dicebear": {
"style": "notionists-neutral",
"seed": "0256de50-f90c-49a8-81f0-3988b2b89d8d",
"backgroundColor": "b6e3f4,b6e3f4",
"options": {
"brows": "<string>",
"eyes": "<string>",
"glasses": "<string>",
"lips": "<string>",
"nose": "<string>",
"flip": true,
"rotate": 123,
"scale": 123,
"radius": 123,
"size": 123,
"backgroundType": "solid",
"backgroundRotation": [
123
],
"translateX": 123,
"translateY": 123,
"clip": true,
"randomizeIds": true
}
},
"background": "blue",
"empty": true,
"updatedBy": "dataset:empresas"
},
"theme": {
"primaryColor": "#2563eb",
"textColor": "#ffffff"
},
"settings": {
"defaultAgent": "base39-orbit-chat",
"defaultWhatsAppAgent": "base39-orbit-whatsapp",
"homeShortcuts": [
{
"type": "bundle",
"id": "<string>",
"visible": true
}
],
"authentication": {
"emailPasswordEnabled": true,
"googleEnabled": true,
"microsoftEnabled": true,
"passkeyEnabled": true,
"samlEnabled": true,
"require2FA": true
},
"ipRestrictions": {
"enabled": true,
"allowedCidrs": [
"<string>"
]
},
"objectSettings": {
"deal": {
"properties": {},
"relations": {}
}
},
"datasetQueries": [
{
"entityType": "company",
"slug": "serasa_crednet",
"mode": "manual"
}
]
},
"params": {},
"owner": {
"object": "user",
"id": "user_123"
},
"billingAddress": {
"line1": "<string>",
"number": "<string>",
"line2": "<string>",
"neighborhood": "<string>",
"city": "<string>",
"state": "<string>",
"postalCode": "<string>",
"country": "<string>",
"phoneNumber": "<string>"
},
"document": "<string>",
"defaultPaymentMethod": "<string>",
"trialDaysRemaining": 12
}curl --request PATCH \
--url http://localhost:3000/v2/orgs/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Acme Corporation",
"domain": "acmecorp.com",
"icon": {
"file": {},
"external": {},
"file_upload": {}
},
"microsoftDomains": [
"contoso.com",
"fabrikam.com"
],
"theme": {
"primaryColor": "#2563eb",
"textColor": "#ffffff"
},
"settings": {
"defaultAgent": "base39-orbit-chat",
"defaultWhatsAppAgent": "base39-orbit-whatsapp",
"homeShortcuts": [
{
"id": "<string>",
"visible": true
}
],
"authentication": {
"emailPasswordEnabled": true,
"googleEnabled": true,
"microsoftEnabled": true,
"passkeyEnabled": true,
"samlEnabled": true,
"require2FA": true
},
"ipRestrictions": {
"enabled": true,
"allowedCidrs": [
"<string>"
]
},
"objectSettings": {
"deal": {
"properties": {},
"relations": {}
}
},
"datasetQueries": [
{
"entityType": "company",
"slug": "serasa_crednet",
"mode": "manual"
}
]
},
"legalName": "Acme Corporation LTDA",
"tradeName": "Acme",
"document": "12345678000190",
"billingAddress": {},
"invoiceEmails": [
"financeiro@acme.com"
],
"ownerUserId": "usr_abc123"
}
'import requests
url = "http://localhost:3000/v2/orgs/{id}"
payload = {
"name": "Acme Corporation",
"domain": "acmecorp.com",
"icon": {
"file": {},
"external": {},
"file_upload": {}
},
"microsoftDomains": ["contoso.com", "fabrikam.com"],
"theme": {
"primaryColor": "#2563eb",
"textColor": "#ffffff"
},
"settings": {
"defaultAgent": "base39-orbit-chat",
"defaultWhatsAppAgent": "base39-orbit-whatsapp",
"homeShortcuts": [
{
"id": "<string>",
"visible": True
}
],
"authentication": {
"emailPasswordEnabled": True,
"googleEnabled": True,
"microsoftEnabled": True,
"passkeyEnabled": True,
"samlEnabled": True,
"require2FA": True
},
"ipRestrictions": {
"enabled": True,
"allowedCidrs": ["<string>"]
},
"objectSettings": { "deal": {
"properties": {},
"relations": {}
} },
"datasetQueries": [
{
"entityType": "company",
"slug": "serasa_crednet",
"mode": "manual"
}
]
},
"legalName": "Acme Corporation LTDA",
"tradeName": "Acme",
"document": "12345678000190",
"billingAddress": {},
"invoiceEmails": ["financeiro@acme.com"],
"ownerUserId": "usr_abc123"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Acme Corporation',
domain: 'acmecorp.com',
icon: {file: {}, external: {}, file_upload: {}},
microsoftDomains: ['contoso.com', 'fabrikam.com'],
theme: {primaryColor: '#2563eb', textColor: '#ffffff'},
settings: {
defaultAgent: 'base39-orbit-chat',
defaultWhatsAppAgent: 'base39-orbit-whatsapp',
homeShortcuts: [{id: '<string>', visible: true}],
authentication: {
emailPasswordEnabled: true,
googleEnabled: true,
microsoftEnabled: true,
passkeyEnabled: true,
samlEnabled: true,
require2FA: true
},
ipRestrictions: {enabled: true, allowedCidrs: ['<string>']},
objectSettings: {deal: {properties: {}, relations: {}}},
datasetQueries: [{entityType: 'company', slug: 'serasa_crednet', mode: 'manual'}]
},
legalName: 'Acme Corporation LTDA',
tradeName: 'Acme',
document: '12345678000190',
billingAddress: {},
invoiceEmails: ['financeiro@acme.com'],
ownerUserId: 'usr_abc123'
})
};
fetch('http://localhost:3000/v2/orgs/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "3000",
CURLOPT_URL => "http://localhost:3000/v2/orgs/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'Acme Corporation',
'domain' => 'acmecorp.com',
'icon' => [
'file' => [
],
'external' => [
],
'file_upload' => [
]
],
'microsoftDomains' => [
'contoso.com',
'fabrikam.com'
],
'theme' => [
'primaryColor' => '#2563eb',
'textColor' => '#ffffff'
],
'settings' => [
'defaultAgent' => 'base39-orbit-chat',
'defaultWhatsAppAgent' => 'base39-orbit-whatsapp',
'homeShortcuts' => [
[
'id' => '<string>',
'visible' => true
]
],
'authentication' => [
'emailPasswordEnabled' => true,
'googleEnabled' => true,
'microsoftEnabled' => true,
'passkeyEnabled' => true,
'samlEnabled' => true,
'require2FA' => true
],
'ipRestrictions' => [
'enabled' => true,
'allowedCidrs' => [
'<string>'
]
],
'objectSettings' => [
'deal' => [
'properties' => [
],
'relations' => [
]
]
],
'datasetQueries' => [
[
'entityType' => 'company',
'slug' => 'serasa_crednet',
'mode' => 'manual'
]
]
],
'legalName' => 'Acme Corporation LTDA',
'tradeName' => 'Acme',
'document' => '12345678000190',
'billingAddress' => [
],
'invoiceEmails' => [
'financeiro@acme.com'
],
'ownerUserId' => 'usr_abc123'
]),
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 := "http://localhost:3000/v2/orgs/{id}"
payload := strings.NewReader("{\n \"name\": \"Acme Corporation\",\n \"domain\": \"acmecorp.com\",\n \"icon\": {\n \"file\": {},\n \"external\": {},\n \"file_upload\": {}\n },\n \"microsoftDomains\": [\n \"contoso.com\",\n \"fabrikam.com\"\n ],\n \"theme\": {\n \"primaryColor\": \"#2563eb\",\n \"textColor\": \"#ffffff\"\n },\n \"settings\": {\n \"defaultAgent\": \"base39-orbit-chat\",\n \"defaultWhatsAppAgent\": \"base39-orbit-whatsapp\",\n \"homeShortcuts\": [\n {\n \"id\": \"<string>\",\n \"visible\": true\n }\n ],\n \"authentication\": {\n \"emailPasswordEnabled\": true,\n \"googleEnabled\": true,\n \"microsoftEnabled\": true,\n \"passkeyEnabled\": true,\n \"samlEnabled\": true,\n \"require2FA\": true\n },\n \"ipRestrictions\": {\n \"enabled\": true,\n \"allowedCidrs\": [\n \"<string>\"\n ]\n },\n \"objectSettings\": {\n \"deal\": {\n \"properties\": {},\n \"relations\": {}\n }\n },\n \"datasetQueries\": [\n {\n \"entityType\": \"company\",\n \"slug\": \"serasa_crednet\",\n \"mode\": \"manual\"\n }\n ]\n },\n \"legalName\": \"Acme Corporation LTDA\",\n \"tradeName\": \"Acme\",\n \"document\": \"12345678000190\",\n \"billingAddress\": {},\n \"invoiceEmails\": [\n \"financeiro@acme.com\"\n ],\n \"ownerUserId\": \"usr_abc123\"\n}")
req, _ := http.NewRequest("PATCH", 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.patch("http://localhost:3000/v2/orgs/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Acme Corporation\",\n \"domain\": \"acmecorp.com\",\n \"icon\": {\n \"file\": {},\n \"external\": {},\n \"file_upload\": {}\n },\n \"microsoftDomains\": [\n \"contoso.com\",\n \"fabrikam.com\"\n ],\n \"theme\": {\n \"primaryColor\": \"#2563eb\",\n \"textColor\": \"#ffffff\"\n },\n \"settings\": {\n \"defaultAgent\": \"base39-orbit-chat\",\n \"defaultWhatsAppAgent\": \"base39-orbit-whatsapp\",\n \"homeShortcuts\": [\n {\n \"id\": \"<string>\",\n \"visible\": true\n }\n ],\n \"authentication\": {\n \"emailPasswordEnabled\": true,\n \"googleEnabled\": true,\n \"microsoftEnabled\": true,\n \"passkeyEnabled\": true,\n \"samlEnabled\": true,\n \"require2FA\": true\n },\n \"ipRestrictions\": {\n \"enabled\": true,\n \"allowedCidrs\": [\n \"<string>\"\n ]\n },\n \"objectSettings\": {\n \"deal\": {\n \"properties\": {},\n \"relations\": {}\n }\n },\n \"datasetQueries\": [\n {\n \"entityType\": \"company\",\n \"slug\": \"serasa_crednet\",\n \"mode\": \"manual\"\n }\n ]\n },\n \"legalName\": \"Acme Corporation LTDA\",\n \"tradeName\": \"Acme\",\n \"document\": \"12345678000190\",\n \"billingAddress\": {},\n \"invoiceEmails\": [\n \"financeiro@acme.com\"\n ],\n \"ownerUserId\": \"usr_abc123\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:3000/v2/orgs/{id}")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Acme Corporation\",\n \"domain\": \"acmecorp.com\",\n \"icon\": {\n \"file\": {},\n \"external\": {},\n \"file_upload\": {}\n },\n \"microsoftDomains\": [\n \"contoso.com\",\n \"fabrikam.com\"\n ],\n \"theme\": {\n \"primaryColor\": \"#2563eb\",\n \"textColor\": \"#ffffff\"\n },\n \"settings\": {\n \"defaultAgent\": \"base39-orbit-chat\",\n \"defaultWhatsAppAgent\": \"base39-orbit-whatsapp\",\n \"homeShortcuts\": [\n {\n \"id\": \"<string>\",\n \"visible\": true\n }\n ],\n \"authentication\": {\n \"emailPasswordEnabled\": true,\n \"googleEnabled\": true,\n \"microsoftEnabled\": true,\n \"passkeyEnabled\": true,\n \"samlEnabled\": true,\n \"require2FA\": true\n },\n \"ipRestrictions\": {\n \"enabled\": true,\n \"allowedCidrs\": [\n \"<string>\"\n ]\n },\n \"objectSettings\": {\n \"deal\": {\n \"properties\": {},\n \"relations\": {}\n }\n },\n \"datasetQueries\": [\n {\n \"entityType\": \"company\",\n \"slug\": \"serasa_crednet\",\n \"mode\": \"manual\"\n }\n ]\n },\n \"legalName\": \"Acme Corporation LTDA\",\n \"tradeName\": \"Acme\",\n \"document\": \"12345678000190\",\n \"billingAddress\": {},\n \"invoiceEmails\": [\n \"financeiro@acme.com\"\n ],\n \"ownerUserId\": \"usr_abc123\"\n}"
response = http.request(request)
puts response.read_body{
"object": "page",
"id": "p_abc123",
"createdAt": "2024-01-15T10:30:00.000Z",
"updatedAt": "2024-01-15T14:45:00.000Z",
"name": "Acme Corp",
"slug": "acme",
"billing": "stripe",
"invoiceEmails": [
"<string>"
],
"createdBy": {
"object": "user",
"id": "u_abc123",
"apiKeyId": "bsk_abc123"
},
"updatedBy": {
"object": "user",
"id": "u_abc123",
"apiKeyId": "bsk_abc123"
},
"legalName": "<string>",
"tradeName": "<string>",
"status": "draft",
"domain": "<string>",
"allow_auto_join": true,
"microsoftTenants": [
{
"domain": "contoso.com",
"tenantId": "36691401-5cfd-4754-a328-acba3782dee8"
}
],
"stripeCustomerId": "<string>",
"stripeSubscriptionId": "<string>",
"kongCustomerId": "<string>",
"trialEndedAt": "2023-11-07T05:31:56Z",
"icon": {
"type": "emoji",
"emoji": "page_icon",
"external": {
"url": "https://example.com/image.jpg"
},
"file_upload": {
"id": "fu_abc123"
},
"domain": "acme.com",
"file": {
"url": "https://s3.amazonaws.com/...",
"expiryTime": "2024-01-15T10:30:00.000Z"
},
"lucide": "file-text",
"brand": "github",
"dicebear": {
"style": "notionists-neutral",
"seed": "0256de50-f90c-49a8-81f0-3988b2b89d8d",
"backgroundColor": "b6e3f4,b6e3f4",
"options": {
"brows": "<string>",
"eyes": "<string>",
"glasses": "<string>",
"lips": "<string>",
"nose": "<string>",
"flip": true,
"rotate": 123,
"scale": 123,
"radius": 123,
"size": 123,
"backgroundType": "solid",
"backgroundRotation": [
123
],
"translateX": 123,
"translateY": 123,
"clip": true,
"randomizeIds": true
}
},
"background": "blue",
"empty": true,
"updatedBy": "dataset:empresas"
},
"theme": {
"primaryColor": "#2563eb",
"textColor": "#ffffff"
},
"settings": {
"defaultAgent": "base39-orbit-chat",
"defaultWhatsAppAgent": "base39-orbit-whatsapp",
"homeShortcuts": [
{
"type": "bundle",
"id": "<string>",
"visible": true
}
],
"authentication": {
"emailPasswordEnabled": true,
"googleEnabled": true,
"microsoftEnabled": true,
"passkeyEnabled": true,
"samlEnabled": true,
"require2FA": true
},
"ipRestrictions": {
"enabled": true,
"allowedCidrs": [
"<string>"
]
},
"objectSettings": {
"deal": {
"properties": {},
"relations": {}
}
},
"datasetQueries": [
{
"entityType": "company",
"slug": "serasa_crednet",
"mode": "manual"
}
]
},
"params": {},
"owner": {
"object": "user",
"id": "user_123"
},
"billingAddress": {
"line1": "<string>",
"number": "<string>",
"line2": "<string>",
"neighborhood": "<string>",
"city": "<string>",
"state": "<string>",
"postalCode": "<string>",
"country": "<string>",
"phoneNumber": "<string>"
},
"document": "<string>",
"defaultPaymentMethod": "<string>",
"trialDaysRemaining": 12
}OAuth2 Authorization Code flow
Organization ID
Organization name
"Acme Corporation"
Organization email domain
"acmecorp.com"
Icon for the organization
Show child attributes
["contoso.com", "fabrikam.com"]
Theme settings
Show child attributes
Organization settings
Show child attributes
"Acme Corporation LTDA"
"Acme"
"12345678000190"
10["financeiro@acme.com"]
Organization owner user ID
"usr_abc123"
Organization updated successfully
Object type
"page"
Unique identifier
"p_abc123"
Creation timestamp
"2024-01-15T10:30:00.000Z"
Last update timestamp
"2024-01-15T14:45:00.000Z"
"Acme Corp"
"acme"
stripe, kong 10Principal who created this object
Show child attributes
{
"object": "user",
"id": "u_abc123",
"apiKeyId": "bsk_abc123"
}
Principal who last updated this object
Show child attributes
{
"object": "user",
"id": "u_abc123",
"apiKeyId": "bsk_abc123"
}
draft, trialing, active, incomplete, incomplete_expired, past_due, canceled, unpaid, paused Show child attributes
Show child attributes
Configurações de tema da organização
Show child attributes
Configurações da organização
Show child attributes
Organization parameters
Show child attributes
Endereço de faturamento
Show child attributes
Dias restantes de trial
12