Update Organization
curl --request PUT \
--url https://api.trieve.ai/api/organization \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--header 'TR-Organization: <tr-organization>' \
--data '
{
"name": "<string>",
"partner_configuration": "<unknown>"
}
'import requests
url = "https://api.trieve.ai/api/organization"
payload = {
"name": "<string>",
"partner_configuration": "<unknown>"
}
headers = {
"TR-Organization": "<tr-organization>",
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {
'TR-Organization': '<tr-organization>',
Authorization: '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({name: '<string>', partner_configuration: '<unknown>'})
};
fetch('https://api.trieve.ai/api/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.trieve.ai/api/organization",
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([
'name' => '<string>',
'partner_configuration' => '<unknown>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json",
"TR-Organization: <tr-organization>"
],
]);
$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.trieve.ai/api/organization"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"partner_configuration\": \"<unknown>\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("TR-Organization", "<tr-organization>")
req.Header.Add("Authorization", "<api-key>")
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.trieve.ai/api/organization")
.header("TR-Organization", "<tr-organization>")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"partner_configuration\": \"<unknown>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.trieve.ai/api/organization")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["TR-Organization"] = '<tr-organization>'
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"partner_configuration\": \"<unknown>\"\n}"
response = http.request(request)
puts response.read_body{
"created_at": "2021-01-01 00:00:00.000",
"id": "e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3",
"name": "Trieve",
"partner_configuration": {
"COMPANY_NAME": "Trieve",
"DEMO_DOMAIN": "demos.trieve.ai",
"FAVICON_URL": "https://cdn.trieve.ai/favicon.ico"
},
"registerable": true,
"updated_at": "2021-01-01 00:00:00.000"
}{
"message": "Bad Request"
}Organization
Update Organization
Update an organization. Only the owner of the organization can update it.
PUT
/
api
/
organization
Update Organization
curl --request PUT \
--url https://api.trieve.ai/api/organization \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--header 'TR-Organization: <tr-organization>' \
--data '
{
"name": "<string>",
"partner_configuration": "<unknown>"
}
'import requests
url = "https://api.trieve.ai/api/organization"
payload = {
"name": "<string>",
"partner_configuration": "<unknown>"
}
headers = {
"TR-Organization": "<tr-organization>",
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {
'TR-Organization': '<tr-organization>',
Authorization: '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({name: '<string>', partner_configuration: '<unknown>'})
};
fetch('https://api.trieve.ai/api/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.trieve.ai/api/organization",
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([
'name' => '<string>',
'partner_configuration' => '<unknown>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json",
"TR-Organization: <tr-organization>"
],
]);
$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.trieve.ai/api/organization"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"partner_configuration\": \"<unknown>\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("TR-Organization", "<tr-organization>")
req.Header.Add("Authorization", "<api-key>")
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.trieve.ai/api/organization")
.header("TR-Organization", "<tr-organization>")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"partner_configuration\": \"<unknown>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.trieve.ai/api/organization")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["TR-Organization"] = '<tr-organization>'
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"partner_configuration\": \"<unknown>\"\n}"
response = http.request(request)
puts response.read_body{
"created_at": "2021-01-01 00:00:00.000",
"id": "e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3",
"name": "Trieve",
"partner_configuration": {
"COMPANY_NAME": "Trieve",
"DEMO_DOMAIN": "demos.trieve.ai",
"FAVICON_URL": "https://cdn.trieve.ai/favicon.ico"
},
"registerable": true,
"updated_at": "2021-01-01 00:00:00.000"
}{
"message": "Bad Request"
}Authorizations
Headers
The organization id to use for the request
Body
application/json
The organization data that you want to update
Response
Updated organization object
Timestamp of the creation of the dataset
Flag to indicate if the organization has been deleted. Deletes are handled async after the flag is set so as to avoid expensive search index compaction.
Unique identifier of the dataset, auto-generated uuid created by Trieve
Name of the organization
Configuration of the organization for the Trieve partner program. Contact partnerships@trieve.ai for more details.
Timestamp of the last update of the dataset
Flag to indicate whether or not new users may join the organization. Default is true.
Was this page helpful?