curl --request GET \
--url https://api.trycarhub.com/mgmt/v1/api-keys \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.trycarhub.com/mgmt/v1/api-keys"
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/api-keys', 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/api-keys",
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/api-keys"
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/api-keys")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.trycarhub.com/mgmt/v1/api-keys")
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{
"data": [
{
"is_staging": false,
"id": "key_9TbR3xLm",
"object": "api_key",
"name": "Production — vehicle worker",
"prefix": "chk_live_a1b2",
"livemode": true,
"scopes": [
"<string>"
],
"created": 1755300000,
"last_used_at": 1755300000,
"revoked_at": 1755300000,
"created_by": "usr_5KpL2wQx",
"expires_at": 1755300000,
"rotates_at": 1755300000
}
],
"has_more": true,
"next_cursor": "<string>"
}List API keys
Keys belong to the organisation, not to the human who created them — revoking a member never breaks production. Secrets are hashed at rest and never returned here: only the readable prefix is.
Minimum role: admin.
curl --request GET \
--url https://api.trycarhub.com/mgmt/v1/api-keys \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.trycarhub.com/mgmt/v1/api-keys"
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/api-keys', 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/api-keys",
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/api-keys"
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/api-keys")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.trycarhub.com/mgmt/v1/api-keys")
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{
"data": [
{
"is_staging": false,
"id": "key_9TbR3xLm",
"object": "api_key",
"name": "Production — vehicle worker",
"prefix": "chk_live_a1b2",
"livemode": true,
"scopes": [
"<string>"
],
"created": 1755300000,
"last_used_at": 1755300000,
"revoked_at": 1755300000,
"created_by": "usr_5KpL2wQx",
"expires_at": 1755300000,
"rotates_at": 1755300000
}
],
"has_more": true,
"next_cursor": "<string>"
}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/….
Query Parameters
Page size.
1 <= x <= 100Opaque cursor from the next_cursor of the previous page. Do not construct or parse it.
255Keep only live (true) or test (false) records. Omitted, both are returned.
Include revoked keys in the listing.
Response
A page of API keys.
Cursor pagination, used by every list in this API. Ask for the next page by passing
next_cursor back as cursor; stop when has_more is false. Cursors are opaque and
stable across inserts — never build one yourself.