curl --request GET \
--url https://app.ohmyho.st/v1/organizations/{organization_id}/credits \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.ohmyho.st/v1/organizations/{organization_id}/credits"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.ohmyho.st/v1/organizations/{organization_id}/credits', 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://app.ohmyho.st/v1/organizations/{organization_id}/credits",
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://app.ohmyho.st/v1/organizations/{organization_id}/credits"
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://app.ohmyho.st/v1/organizations/{organization_id}/credits")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.ohmyho.st/v1/organizations/{organization_id}/credits")
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{
"organization_id": "<string>",
"unit": "microcredits",
"as_of": "2023-11-07T05:31:56Z",
"available_micros": "<string>",
"reserved_micros": "<string>",
"spent_micros": "<string>",
"expired_micros": "<string>",
"platform_overrun_micros": "<string>",
"grace_started_at": "2023-11-07T05:31:56Z",
"grace_expires_at": "2023-11-07T05:31:56Z",
"active_meters": [
"<string>"
],
"rate_cards": [
{
"id": "<string>",
"currency": "USD",
"published_at": "2023-11-07T05:31:56Z",
"effective_from": "2023-11-07T05:31:56Z",
"rates": [
{
"meter": "<string>",
"unit": "<string>",
"units_per_charge": "<string>",
"provider_cost_micros": "<string>",
"credit_micros": "<string>"
}
]
}
]
}{
"type": "<string>",
"title": "<string>",
"status": 499,
"code": "invalid_request",
"request_id": "<string>",
"retryable": true,
"suggested_action": "<string>",
"detail": "<string>",
"instance": "<string>",
"retry_after_seconds": 43200
}{
"type": "<string>",
"title": "<string>",
"status": 499,
"code": "invalid_request",
"request_id": "<string>",
"retryable": true,
"suggested_action": "<string>",
"detail": "<string>",
"instance": "<string>",
"retry_after_seconds": 43200
}{
"type": "https://docs.ohmyho.st/errors/resource-not-found",
"title": "Resource not found",
"status": 404,
"code": "resource_not_found",
"request_id": "req_01J00000000000000000000000",
"retryable": false,
"suggested_action": "Check the resource identifier and your access scope."
}{
"type": "<string>",
"title": "<string>",
"status": 499,
"code": "invalid_request",
"request_id": "<string>",
"retryable": true,
"suggested_action": "<string>",
"detail": "<string>",
"instance": "<string>",
"retry_after_seconds": 43200
}{
"type": "<string>",
"title": "<string>",
"status": 499,
"code": "invalid_request",
"request_id": "<string>",
"retryable": true,
"suggested_action": "<string>",
"detail": "<string>",
"instance": "<string>",
"retry_after_seconds": 43200
}Read the owner's shared organization credit pool
Returns posted credits and reservations, in microcredits (one credit is 1000000 microcredits). Monthly entitlement posting is idempotent. Only the organization Owner may read this balance. active_meters names the currently billed sources; unreported usage is not included. platform_overrun_micros is recorded platform exposure, not customer debt. Remains available at zero credit.
curl --request GET \
--url https://app.ohmyho.st/v1/organizations/{organization_id}/credits \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.ohmyho.st/v1/organizations/{organization_id}/credits"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.ohmyho.st/v1/organizations/{organization_id}/credits', 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://app.ohmyho.st/v1/organizations/{organization_id}/credits",
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://app.ohmyho.st/v1/organizations/{organization_id}/credits"
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://app.ohmyho.st/v1/organizations/{organization_id}/credits")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.ohmyho.st/v1/organizations/{organization_id}/credits")
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{
"organization_id": "<string>",
"unit": "microcredits",
"as_of": "2023-11-07T05:31:56Z",
"available_micros": "<string>",
"reserved_micros": "<string>",
"spent_micros": "<string>",
"expired_micros": "<string>",
"platform_overrun_micros": "<string>",
"grace_started_at": "2023-11-07T05:31:56Z",
"grace_expires_at": "2023-11-07T05:31:56Z",
"active_meters": [
"<string>"
],
"rate_cards": [
{
"id": "<string>",
"currency": "USD",
"published_at": "2023-11-07T05:31:56Z",
"effective_from": "2023-11-07T05:31:56Z",
"rates": [
{
"meter": "<string>",
"unit": "<string>",
"units_per_charge": "<string>",
"provider_cost_micros": "<string>",
"credit_micros": "<string>"
}
]
}
]
}{
"type": "<string>",
"title": "<string>",
"status": 499,
"code": "invalid_request",
"request_id": "<string>",
"retryable": true,
"suggested_action": "<string>",
"detail": "<string>",
"instance": "<string>",
"retry_after_seconds": 43200
}{
"type": "<string>",
"title": "<string>",
"status": 499,
"code": "invalid_request",
"request_id": "<string>",
"retryable": true,
"suggested_action": "<string>",
"detail": "<string>",
"instance": "<string>",
"retry_after_seconds": 43200
}{
"type": "https://docs.ohmyho.st/errors/resource-not-found",
"title": "Resource not found",
"status": 404,
"code": "resource_not_found",
"request_id": "req_01J00000000000000000000000",
"retryable": false,
"suggested_action": "Check the resource identifier and your access scope."
}{
"type": "<string>",
"title": "<string>",
"status": 499,
"code": "invalid_request",
"request_id": "<string>",
"retryable": true,
"suggested_action": "<string>",
"detail": "<string>",
"instance": "<string>",
"retry_after_seconds": 43200
}{
"type": "<string>",
"title": "<string>",
"status": 499,
"code": "invalid_request",
"request_id": "<string>",
"retryable": true,
"suggested_action": "<string>",
"detail": "<string>",
"instance": "<string>",
"retry_after_seconds": 43200
}Authorizations
WorkOS access JWT or a user-owned WorkOS API key. User keys are bound to one organization and restricted to their enabled product permissions. Session-only onboarding and session revocation require an interactive access JWT. No cookie session is assumed.
Headers
Optional caller-provided correlation identifier.
1 - 128Path Parameters
^[0-9A-HJKMNP-TV-Z]{26}$Response
Current organization credit balance.
^[0-9A-HJKMNP-TV-Z]{26}$"microcredits"Non-negative microcredits, at most 9223372036854775807. One credit equals 1000000 microcredits.
^(0|[1-9][0-9]{0,18})$Non-negative microcredits, at most 9223372036854775807. One credit equals 1000000 microcredits.
^(0|[1-9][0-9]{0,18})$Non-negative microcredits, at most 9223372036854775807. One credit equals 1000000 microcredits.
^(0|[1-9][0-9]{0,18})$Non-negative microcredits, at most 9223372036854775807. One credit equals 1000000 microcredits.
^(0|[1-9][0-9]{0,18})$Non-negative microcredits, at most 9223372036854775807. One credit equals 1000000 microcredits.
^(0|[1-9][0-9]{0,18})$First confirmed exhaustion in this continuous period; null while funded.
Seven days after first confirmed exhaustion. Existing services and domains are retained during this grace; no automatic data deletion. Explicit project stop budgets are separate.
^[a-z0-9_.-]{1,128}$Published integer prices, newest first. A published rate is not proof of enabled billing; only active_meters names currently billed sources. Builds retain their accepted quote. Provider cost is a list-price basis before platform allowances, not an invoice.
4Show child attributes
Show child attributes