Clients
Change price
Change what a client pays. It applies from their next invoice.
PATCH
/
v1
/
accounts
/
{id}
/
billing
Change price
curl --request PATCH \
--url https://www.orgo.ai/api/v1/accounts/{id}/billing \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"price_usd": 300
}
'import requests
url = "https://www.orgo.ai/api/v1/accounts/{id}/billing"
payload = { "price_usd": 300 }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({price_usd: 300})
};
fetch('https://www.orgo.ai/api/v1/accounts/{id}/billing', 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://www.orgo.ai/api/v1/accounts/{id}/billing",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'price_usd' => 300
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://www.orgo.ai/api/v1/accounts/{id}/billing"
payload := strings.NewReader("{\n \"price_usd\": 300\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://www.orgo.ai/api/v1/accounts/{id}/billing")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"price_usd\": 300\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.orgo.ai/api/v1/accounts/{id}/billing")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"price_usd\": 300\n}"
response = http.request(request)
puts response.read_body{
"billing": {
"status": "active",
"email": "billing@acme.com",
"price_usd": 300,
"setup_fee_usd": 0,
"ai_usd": 40,
"payment_link_url": null,
"current_period_end": "2026-11-01T09:00:00Z",
"ends_at_period_end": false
}
}Send
price_usd, ai_usd, or both. A paying client moves to the new amount on their next invoice, with no proration. A link not paid yet is replaced at the new price.
Use your account-wide API key. A client’s own key gets 403 here. See Invoicing.
Path parameters
string
required
The client’s
id.Body
number
The new monthly price.
number
The new monthly AI amount.
0 removes it.Response
object
As Get billing.
Example
curl -X PATCH https://www.orgo.ai/api/v1/accounts/$CLIENT_ID/billing \
-H "Authorization: Bearer $ORGO_API_KEY" \
-H "Content-Type: application/json" \
-d '{"price_usd": 300}'
import os
import requests
client_id = os.environ["CLIENT_ID"]
res = requests.patch(
f"https://www.orgo.ai/api/v1/accounts/{client_id}/billing",
headers={"Authorization": f"Bearer {os.environ['ORGO_API_KEY']}"},
json={"price_usd": 300},
)
print(res.json())
const clientId = process.env.CLIENT_ID;
const res = await fetch(`https://www.orgo.ai/api/v1/accounts/${clientId}/billing`, {
method: 'PATCH',
headers: { Authorization: `Bearer ${process.env.ORGO_API_KEY}`, 'Content-Type': 'application/json' },
body: JSON.stringify({"price_usd": 300}),
});
console.log(await res.json());
Response
{
"billing": {
"status": "active",
"email": "billing@acme.com",
"price_usd": 300,
"setup_fee_usd": 0,
"ai_usd": 40,
"payment_link_url": null,
"current_period_end": "2026-11-01T09:00:00Z",
"ends_at_period_end": false
}
}
Errors
| Status | Body | Meaning |
|---|---|---|
401 | { "error": "Invalid API key" } | No key, or not one of yours. |
403 | { "error": "Use your account-wide API key to manage accounts. Workspace keys can’t." } | A client’s own key, or any key scoped to one workspace. |
403 | { "error": "Invoicing is on every paid plan. Upgrade to use it." } | You’re on the Free plan. code is UPGRADE_REQUIRED. |
400 | { "error": "Send price_usd, ai_usd, or both." } | Nothing to change. |
409 | { "error": "This client isn’t being billed. Send them a link first." } | You pay for this client. |
404 | { "error": "Account not found." } | No client with this id is yours. |
409 | { "error": "This account is closed." } | The client is closed. code is ACCOUNT_CLOSED. |
409 | { "error": "This account was transferred to your client." } | The client accepted a transfer and owns it now. code is ACCOUNT_TRANSFERRED. |
Authorizations
API key authentication. Get your key at orgo.ai/workspaces
Path Parameters
The client’s id.
Body
application/json
Response
OK
Show child attributes
Show child attributes
⌘I
Change price
curl --request PATCH \
--url https://www.orgo.ai/api/v1/accounts/{id}/billing \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"price_usd": 300
}
'import requests
url = "https://www.orgo.ai/api/v1/accounts/{id}/billing"
payload = { "price_usd": 300 }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({price_usd: 300})
};
fetch('https://www.orgo.ai/api/v1/accounts/{id}/billing', 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://www.orgo.ai/api/v1/accounts/{id}/billing",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'price_usd' => 300
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://www.orgo.ai/api/v1/accounts/{id}/billing"
payload := strings.NewReader("{\n \"price_usd\": 300\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://www.orgo.ai/api/v1/accounts/{id}/billing")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"price_usd\": 300\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.orgo.ai/api/v1/accounts/{id}/billing")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"price_usd\": 300\n}"
response = http.request(request)
puts response.read_body{
"billing": {
"status": "active",
"email": "billing@acme.com",
"price_usd": 300,
"setup_fee_usd": 0,
"ai_usd": 40,
"payment_link_url": null,
"current_period_end": "2026-11-01T09:00:00Z",
"ends_at_period_end": false
}
}