Returns the Organization details.
curl --request GET \
--url https://api.totoy.ai/v1/organization \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.totoy.ai/v1/organization"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.totoy.ai/v1/organization', 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://api.totoy.ai/v1/organization",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.totoy.ai/v1/organization"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.totoy.ai/v1/organization")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.totoy.ai/v1/organization")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"organization_id": "org_sjd823ndpaxy8223ndm0paq53",
"name": "Totoy GmbH",
"created_at": "2023-07-05T12:34:13Z",
"updated_at": "2024-07-05T12:34:13Z",
"limits": {
"assistant_messages": 100000,
"document_sources_pages": 50000,
"text_sources": 50000,
"projects": 10,
"knowledge_bases": 10,
"type": "hard"
},
"usage": {
"assistant_messages": {
"knowledge_bases_chats": 13542,
"explanations": 12653,
"total": 26195
},
"projects": 7,
"knowledge_bases": 7,
"text_sources": 3756,
"document_sources_pages": 2534
}
}{
"type": "https://docs.totoy.ai/probs/out-of-credit",
"title": "You do not have enough credit.",
"status": 403,
"detail": "You do not have enough credit to perform this operation.",
"instance": "/projects/pj_avX7imfLaPcQnv5ckvGlOEBA9"
}{
"type": "https://docs.totoy.ai/probs/out-of-credit",
"title": "You do not have enough credit.",
"status": 403,
"detail": "You do not have enough credit to perform this operation.",
"instance": "/projects/pj_avX7imfLaPcQnv5ckvGlOEBA9"
}Organization
Returns the Organization details.
GET
/
organization
Returns the Organization details.
curl --request GET \
--url https://api.totoy.ai/v1/organization \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.totoy.ai/v1/organization"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.totoy.ai/v1/organization', 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://api.totoy.ai/v1/organization",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.totoy.ai/v1/organization"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.totoy.ai/v1/organization")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.totoy.ai/v1/organization")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"organization_id": "org_sjd823ndpaxy8223ndm0paq53",
"name": "Totoy GmbH",
"created_at": "2023-07-05T12:34:13Z",
"updated_at": "2024-07-05T12:34:13Z",
"limits": {
"assistant_messages": 100000,
"document_sources_pages": 50000,
"text_sources": 50000,
"projects": 10,
"knowledge_bases": 10,
"type": "hard"
},
"usage": {
"assistant_messages": {
"knowledge_bases_chats": 13542,
"explanations": 12653,
"total": 26195
},
"projects": 7,
"knowledge_bases": 7,
"text_sources": 3756,
"document_sources_pages": 2534
}
}{
"type": "https://docs.totoy.ai/probs/out-of-credit",
"title": "You do not have enough credit.",
"status": 403,
"detail": "You do not have enough credit to perform this operation.",
"instance": "/projects/pj_avX7imfLaPcQnv5ckvGlOEBA9"
}{
"type": "https://docs.totoy.ai/probs/out-of-credit",
"title": "You do not have enough credit.",
"status": 403,
"detail": "You do not have enough credit to perform this operation.",
"instance": "/projects/pj_avX7imfLaPcQnv5ckvGlOEBA9"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Response
OK
The Organization object represents an organization in the system.
The unique identifier of an Organization
Maximum string length:
29Pattern:
^org_[a-zA-Z0-9]{25}$Example:
"org_sjd823ndpaxy8223ndm0paq53"
The Organization's name.
Maximum string length:
256Example:
"Totoy GmbH"
Date-time of when the Organization was created, in ISO 8601 format
Example:
"2023-07-05T12:34:13Z"
Date-time of when the Organization was last modified, in ISO 8601 format
Example:
"2024-07-05T12:34:13Z"
The usage limits of the Organization.
Show child attributes
Show child attributes
Example:
{
"assistant_messages": 100000,
"document_sources_pages": 50000,
"text_sources": 50000,
"projects": 10,
"knowledge_bases": 10,
"type": "hard"
}
The usage of the Organization.
Show child attributes
Show child attributes
Example:
{
"assistant_messages": {
"knowledge_bases_chats": 13542,
"explanations": 12653,
"total": 26195
},
"projects": 7,
"knowledge_bases": 7,
"text_sources": 3756,
"document_sources_pages": 2534
}
Wether the Organization is active or suspended.
Available options:
active, suspended Example:
"active"