curl --request GET \
--url https://api.trycarhub.com/mgmt/v1/org \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.trycarhub.com/mgmt/v1/org"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.trycarhub.com/mgmt/v1/org', 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.trycarhub.com/mgmt/v1/org",
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.trycarhub.com/mgmt/v1/org"
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.trycarhub.com/mgmt/v1/org")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.trycarhub.com/mgmt/v1/org")
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_2XnV8pQmLd4T",
"object": "organization",
"name": "Garage Dupont SAS",
"slug": "garage-dupont",
"plan": {
"id": "scale",
"name": "Scale",
"monthly_credits": 1,
"storage_quota_bytes": 2,
"renews_at": 1755300000,
"status": "active"
},
"credits": {
"live": 18450,
"test": 1000
},
"billing_country": "<string>",
"currency": "<string>",
"created": 1755300000,
"tax_id": "FR40303265045",
"storage_retention_days": 30
}Retrieve the active organisation
The organisation carried by the JWT’s org_id claim: plan, credit balances (live and
test are separate purses), billing country and storage retention.
Minimum role: member.
curl --request GET \
--url https://api.trycarhub.com/mgmt/v1/org \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.trycarhub.com/mgmt/v1/org"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.trycarhub.com/mgmt/v1/org', 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.trycarhub.com/mgmt/v1/org",
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.trycarhub.com/mgmt/v1/org"
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.trycarhub.com/mgmt/v1/org")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.trycarhub.com/mgmt/v1/org")
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_2XnV8pQmLd4T",
"object": "organization",
"name": "Garage Dupont SAS",
"slug": "garage-dupont",
"plan": {
"id": "scale",
"name": "Scale",
"monthly_credits": 1,
"storage_quota_bytes": 2,
"renews_at": 1755300000,
"status": "active"
},
"credits": {
"live": 18450,
"test": 1000
},
"billing_country": "<string>",
"currency": "<string>",
"created": 1755300000,
"tax_id": "FR40303265045",
"storage_retention_days": 30
}Authorizations
Short-lived JWT issued by the CarHub auth service (Better Auth), verified against its
JWKS. Claims: sub (user), org_id (active organisation) and role
(owner | admin | member | billing_manager). Used by the dashboard for /mgmt/v1/… only — it is never
accepted on /v1/….
Response
The active organisation.
The billing and isolation unit: credits, plan, keys, jobs and usage all hang off it. Users come and go; the organisation and its keys stay.
"org_2XnV8pQmLd4T"
"organization""Garage Dupont SAS"
"garage-dupont"
Show child attributes
Show child attributes
Two independent credit balances. Live inference draws on live and test keys on test; neither can fund the other.
Show child attributes
Show child attributes
Frozen at creation from the billing address, never from an IP. Selects the price book and the tax treatment.
^[A-Z]{2}$Settlement currency. One thousand credits equal one USD.
^[A-Z]{3}$Epoch seconds, UTC.
1755300000
VAT or tax identifier, validated where the jurisdiction allows it.
"FR40303265045"
How long inputs and outputs live in storage before being purged.
30