List Sub-Organizations
Returns all sub-organizations belonging to the specified organization.
curl --request GET \
--url https://api.useinvent.com/orgs/{org_id}/orgs \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.useinvent.com/orgs/{org_id}/orgs"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.useinvent.com/orgs/{org_id}/orgs', 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.useinvent.com/orgs/{org_id}/orgs",
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.useinvent.com/orgs/{org_id}/orgs"
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.useinvent.com/orgs/{org_id}/orgs")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.useinvent.com/orgs/{org_id}/orgs")
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[
{
"id": "<string>",
"name": "<string>",
"logo_url": "<string>",
"balance": 123,
"promo_balance": 123,
"billing": {
"auto_recharge": {
"enabled": true,
"recharge_threshold": 252.5,
"recharge_amount": 252.5
},
"use_parent_balance": true,
"spending_cap": {
"enabled": true,
"amount": 50000,
"reset_at": "2023-11-07T05:31:56Z"
},
"payment_method": {
"type": "<string>",
"payment_method_id": "<string>",
"brand": "<string>",
"last4": "<string>",
"inactive": true,
"failed_at": "2023-11-07T05:31:56Z",
"failed_message": "<string>"
},
"last_low_balance_notification_at": "2023-11-07T05:31:56Z",
"last_out_of_balance_notification_at": "2023-11-07T05:31:56Z",
"last_spending_cap_notification_at": "2023-11-07T05:31:56Z"
},
"members": [
{
"id": "<string>",
"name": "<string>",
"email": "jsmith@example.com",
"avatar": "<string>",
"org_id": "<string>",
"user_id": "<string>",
"preferences": {
"notifications": {
"assigned_to_me": {
"enabled": true,
"notified_at": "2023-11-07T05:31:56Z"
},
"billing": {
"enabled": true,
"notified_at": "2023-11-07T05:31:56Z"
}
},
"canned_responses": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"text": "<string>",
"name": "<string>"
}
]
},
"roles": [
{
"id": "<string>",
"name": "<string>",
"description": "<string>",
"permissions": []
}
],
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"seen_at": "2023-11-07T05:31:56Z"
}
],
"spending_cap_used": 123,
"created_at": "2023-11-07T05:31:56Z",
"features": {
"enterprise": true,
"allow_overdraft": true,
"workflows": true,
"enable_japifon": true,
"slack_access": true,
"emails": true,
"templates": true,
"org_chats": true
},
"config": {
"email": "jsmith@example.com",
"address": "<string>",
"terms_url": "<string>",
"privacy_url": "<string>",
"access": {
"session_ttl_seconds": 0,
"allow_google": true,
"allow_microsoft": true,
"allow_email_code": true,
"allow_invites": true
},
"modules": {
"enable_inbox": true,
"enable_analytics": true,
"enable_assistants": true,
"enable_knowledge_base": true,
"enable_broadcasts": true,
"enable_workflows": true,
"enable_audience": true,
"enable_tables": true,
"enable_pages": true,
"enable_balance_credits": true
}
}
}
]Authorizations
Bearer token authentication using your API key
Path Parameters
The ID of the org
Query Parameters
Page number
Number of items to take
Next page token (Only used on special endpoints)
Response
List of sub-organizations with their plan, balance, members, and features.
Unique identifier of the sub-organization
Name of the sub-organization
URL of the sub-organization logo
Type of subscription plan
free, business Current credit balance
Current promotional credit balance
Schema for updating payment configuration
Show child attributes
Show child attributes
Members of the sub-organization
Show child attributes
Show child attributes
Amount spent in the current month
Timestamp when the sub-organization was created
Org gate-keeping features configuration
Show child attributes
Show child attributes
Organization configuration settings
Show child attributes
Show child attributes
Was this page helpful?
curl --request GET \
--url https://api.useinvent.com/orgs/{org_id}/orgs \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.useinvent.com/orgs/{org_id}/orgs"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.useinvent.com/orgs/{org_id}/orgs', 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.useinvent.com/orgs/{org_id}/orgs",
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.useinvent.com/orgs/{org_id}/orgs"
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.useinvent.com/orgs/{org_id}/orgs")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.useinvent.com/orgs/{org_id}/orgs")
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[
{
"id": "<string>",
"name": "<string>",
"logo_url": "<string>",
"balance": 123,
"promo_balance": 123,
"billing": {
"auto_recharge": {
"enabled": true,
"recharge_threshold": 252.5,
"recharge_amount": 252.5
},
"use_parent_balance": true,
"spending_cap": {
"enabled": true,
"amount": 50000,
"reset_at": "2023-11-07T05:31:56Z"
},
"payment_method": {
"type": "<string>",
"payment_method_id": "<string>",
"brand": "<string>",
"last4": "<string>",
"inactive": true,
"failed_at": "2023-11-07T05:31:56Z",
"failed_message": "<string>"
},
"last_low_balance_notification_at": "2023-11-07T05:31:56Z",
"last_out_of_balance_notification_at": "2023-11-07T05:31:56Z",
"last_spending_cap_notification_at": "2023-11-07T05:31:56Z"
},
"members": [
{
"id": "<string>",
"name": "<string>",
"email": "jsmith@example.com",
"avatar": "<string>",
"org_id": "<string>",
"user_id": "<string>",
"preferences": {
"notifications": {
"assigned_to_me": {
"enabled": true,
"notified_at": "2023-11-07T05:31:56Z"
},
"billing": {
"enabled": true,
"notified_at": "2023-11-07T05:31:56Z"
}
},
"canned_responses": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"text": "<string>",
"name": "<string>"
}
]
},
"roles": [
{
"id": "<string>",
"name": "<string>",
"description": "<string>",
"permissions": []
}
],
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"seen_at": "2023-11-07T05:31:56Z"
}
],
"spending_cap_used": 123,
"created_at": "2023-11-07T05:31:56Z",
"features": {
"enterprise": true,
"allow_overdraft": true,
"workflows": true,
"enable_japifon": true,
"slack_access": true,
"emails": true,
"templates": true,
"org_chats": true
},
"config": {
"email": "jsmith@example.com",
"address": "<string>",
"terms_url": "<string>",
"privacy_url": "<string>",
"access": {
"session_ttl_seconds": 0,
"allow_google": true,
"allow_microsoft": true,
"allow_email_code": true,
"allow_invites": true
},
"modules": {
"enable_inbox": true,
"enable_analytics": true,
"enable_assistants": true,
"enable_knowledge_base": true,
"enable_broadcasts": true,
"enable_workflows": true,
"enable_audience": true,
"enable_tables": true,
"enable_pages": true,
"enable_balance_credits": true
}
}
}
]