Organizations
List organizations
List organizations the authenticated user belongs to. Use the organization ID in subsequent API paths.
GET
/
organizations
/
List organizations
curl --request GET \
--url https://api.initdesk.com/organizations/ \
--header 'X-Initdesk-Token: <api-key>'import requests
url = "https://api.initdesk.com/organizations/"
headers = {"X-Initdesk-Token": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Initdesk-Token': '<api-key>'}};
fetch('https://api.initdesk.com/organizations/', 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.initdesk.com/organizations/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-Initdesk-Token: <api-key>"
],
]);
$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.initdesk.com/organizations/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Initdesk-Token", "<api-key>")
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.initdesk.com/organizations/")
.header("X-Initdesk-Token", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.initdesk.com/organizations/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Initdesk-Token"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"count": 123,
"results": [
{
"id": 123,
"public_id": "<string>",
"name": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"created_by": {
"id": 123,
"email": "jsmith@example.com",
"name": "<string>"
},
"support_email": "jsmith@example.com",
"deletion_plan": {
"inactivity_detected_at": "2023-11-07T05:31:56Z",
"deletion_at": "2023-11-07T05:31:56Z"
},
"subscription": {
"plan_name": "<string>",
"plan_metric": "<string>",
"renews_at": "2023-11-07T05:31:56Z",
"ends_at": "2023-11-07T05:31:56Z",
"trial_ends_at": "2023-11-07T05:31:56Z",
"trial_days_remaining": 123,
"has_access_enabled": true
},
"customer_max_inactivity_period": 0,
"customer_inactivity_reminder_period": 0,
"site_url": "<string>",
"description": "<string>",
"email_from_name": "<string>",
"email_subject_prefix": "<string>",
"enable_csat": true,
"enable_auto_tagging": true,
"enable_cc_email_routing": true
}
],
"next": "http://api.example.org/accounts/?page=4",
"previous": "http://api.example.org/accounts/?page=2"
}Authorizations
Query Parameters
Which field to use when ordering the results.
A page number within the paginated result set.
Number of results to return per page.
Was this page helpful?
⌘I
List organizations
curl --request GET \
--url https://api.initdesk.com/organizations/ \
--header 'X-Initdesk-Token: <api-key>'import requests
url = "https://api.initdesk.com/organizations/"
headers = {"X-Initdesk-Token": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Initdesk-Token': '<api-key>'}};
fetch('https://api.initdesk.com/organizations/', 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.initdesk.com/organizations/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-Initdesk-Token: <api-key>"
],
]);
$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.initdesk.com/organizations/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Initdesk-Token", "<api-key>")
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.initdesk.com/organizations/")
.header("X-Initdesk-Token", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.initdesk.com/organizations/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Initdesk-Token"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"count": 123,
"results": [
{
"id": 123,
"public_id": "<string>",
"name": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"created_by": {
"id": 123,
"email": "jsmith@example.com",
"name": "<string>"
},
"support_email": "jsmith@example.com",
"deletion_plan": {
"inactivity_detected_at": "2023-11-07T05:31:56Z",
"deletion_at": "2023-11-07T05:31:56Z"
},
"subscription": {
"plan_name": "<string>",
"plan_metric": "<string>",
"renews_at": "2023-11-07T05:31:56Z",
"ends_at": "2023-11-07T05:31:56Z",
"trial_ends_at": "2023-11-07T05:31:56Z",
"trial_days_remaining": 123,
"has_access_enabled": true
},
"customer_max_inactivity_period": 0,
"customer_inactivity_reminder_period": 0,
"site_url": "<string>",
"description": "<string>",
"email_from_name": "<string>",
"email_subject_prefix": "<string>",
"enable_csat": true,
"enable_auto_tagging": true,
"enable_cc_email_routing": true
}
],
"next": "http://api.example.org/accounts/?page=4",
"previous": "http://api.example.org/accounts/?page=2"
}