Skip to main content
GET
/
organizations
/
{id}
Get organization by ID
curl --request GET \
  --url https://api.galtea.ai/organizations/{id} \
  --header 'Authorization: Bearer <token>'
import requests

url = "https://api.galtea.ai/organizations/{id}"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.text)
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

fetch('https://api.galtea.ai/organizations/{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_URL => "https://api.galtea.ai/organizations/{id}",
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.galtea.ai/organizations/{id}"

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.galtea.ai/organizations/{id}")
.header("Authorization", "Bearer <token>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.galtea.ai/organizations/{id}")

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": "org_123",
  "name": "Example Organization",
  "remainingSubscriptionCredits": 1000,
  "extraCredits": 500,
  "lastWarningAt": "2023-11-07T05:31:56Z",
  "warningAt": 123,
  "stripeCustomerId": "cus_123",
  "samlEntrypointUrl": "<string>",
  "samlEntityId": "<string>",
  "samlIssuerId": "<string>",
  "samlPublicCertificate": "<string>",
  "samlSignedResponse": true,
  "samlSignedAssertions": true,
  "samlTeamSlug": "<string>",
  "enforceMfa": false,
  "createdAt": "2023-11-07T05:31:56Z",
  "deletedAt": "2023-11-07T05:31:56Z"
}
{
"error": "Error type",
"message": "Error message description"
}
{
"error": "Error type",
"message": "Error message description"
}

Authorizations

Authorization
string
header
required

API key authorization. Pass your API key in the Authorization header as a Bearer token. Both new (gsk_*) and legacy (gsk-) API keys are accepted, e.g. Authorization: Bearer gsk_... or Authorization: Bearer gsk-....

Path Parameters

id
string
required

Organization ID

Response

Organization retrieved successfully

id
string
Example:

"org_123"

name
string
Example:

"Example Organization"

remainingSubscriptionCredits
integer | null
Example:

1000

extraCredits
integer
Example:

500

lastWarningAt
string<date-time> | null
warningAt
integer | null
stripeCustomerId
string | null
Example:

"cus_123"

samlEntrypointUrl
string | null
samlEntityId
string | null
samlIssuerId
string | null
samlPublicCertificate
string | null
samlSignedResponse
boolean | null
samlSignedAssertions
boolean | null
samlTeamSlug
string | null
enforceMfa
boolean
default:false

When true, every member of the organization must complete an MFA challenge to sign in. Settable by Owners (via update) and Admins (via create or update).

createdAt
string<date-time>
deletedAt
string<date-time> | null