Replace an agent billing plan
curl --request PUT \
--url https://api.hyperline.co/v1/agents/plans/{plan_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"rate_card_id": "<string>",
"markup_percent": "<string>",
"overage_markup_percent": "<string>",
"overage_rate_card_id": "<string>",
"windows": [
{
"key": "<string>",
"duration_minutes": 263520,
"included_units": "<string>"
}
],
"per_seat_credits": "<string>",
"grant_rollover_enabled": true,
"settlement_interval_minutes": 22350,
"settlement_schedule": "calendar_month"
}
'import requests
url = "https://api.hyperline.co/v1/agents/plans/{plan_id}"
payload = {
"name": "<string>",
"rate_card_id": "<string>",
"markup_percent": "<string>",
"overage_markup_percent": "<string>",
"overage_rate_card_id": "<string>",
"windows": [
{
"key": "<string>",
"duration_minutes": 263520,
"included_units": "<string>"
}
],
"per_seat_credits": "<string>",
"grant_rollover_enabled": True,
"settlement_interval_minutes": 22350,
"settlement_schedule": "calendar_month"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
rate_card_id: '<string>',
markup_percent: '<string>',
overage_markup_percent: '<string>',
overage_rate_card_id: '<string>',
windows: [{key: '<string>', duration_minutes: 263520, included_units: '<string>'}],
per_seat_credits: '<string>',
grant_rollover_enabled: true,
settlement_interval_minutes: 22350,
settlement_schedule: 'calendar_month'
})
};
fetch('https://api.hyperline.co/v1/agents/plans/{plan_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.hyperline.co/v1/agents/plans/{plan_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'rate_card_id' => '<string>',
'markup_percent' => '<string>',
'overage_markup_percent' => '<string>',
'overage_rate_card_id' => '<string>',
'windows' => [
[
'key' => '<string>',
'duration_minutes' => 263520,
'included_units' => '<string>'
]
],
'per_seat_credits' => '<string>',
'grant_rollover_enabled' => true,
'settlement_interval_minutes' => 22350,
'settlement_schedule' => 'calendar_month'
]),
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://api.hyperline.co/v1/agents/plans/{plan_id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"rate_card_id\": \"<string>\",\n \"markup_percent\": \"<string>\",\n \"overage_markup_percent\": \"<string>\",\n \"overage_rate_card_id\": \"<string>\",\n \"windows\": [\n {\n \"key\": \"<string>\",\n \"duration_minutes\": 263520,\n \"included_units\": \"<string>\"\n }\n ],\n \"per_seat_credits\": \"<string>\",\n \"grant_rollover_enabled\": true,\n \"settlement_interval_minutes\": 22350,\n \"settlement_schedule\": \"calendar_month\"\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api.hyperline.co/v1/agents/plans/{plan_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"rate_card_id\": \"<string>\",\n \"markup_percent\": \"<string>\",\n \"overage_markup_percent\": \"<string>\",\n \"overage_rate_card_id\": \"<string>\",\n \"windows\": [\n {\n \"key\": \"<string>\",\n \"duration_minutes\": 263520,\n \"included_units\": \"<string>\"\n }\n ],\n \"per_seat_credits\": \"<string>\",\n \"grant_rollover_enabled\": true,\n \"settlement_interval_minutes\": 22350,\n \"settlement_schedule\": \"calendar_month\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.hyperline.co/v1/agents/plans/{plan_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"rate_card_id\": \"<string>\",\n \"markup_percent\": \"<string>\",\n \"overage_markup_percent\": \"<string>\",\n \"overage_rate_card_id\": \"<string>\",\n \"windows\": [\n {\n \"key\": \"<string>\",\n \"duration_minutes\": 263520,\n \"included_units\": \"<string>\"\n }\n ],\n \"per_seat_credits\": \"<string>\",\n \"grant_rollover_enabled\": true,\n \"settlement_interval_minutes\": 22350,\n \"settlement_schedule\": \"calendar_month\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"name": "<string>",
"mode": "wallet",
"rate_card": {
"id": "<string>",
"name": "<string>",
"denomination": "credits",
"currency": "<string>",
"description": "<string>",
"fallback_per_usd": "<string>",
"rows": [
{
"id": "<string>",
"kind": "llm",
"provider": "<string>",
"model": "<string>",
"rate_per_m_input": "<string>",
"rate_per_m_output": "<string>",
"rate_unit": "<string>",
"rate_per_m_cached_input": "<string>",
"rate_per_m_cache_write": "<string>",
"dimensions": [
{
"key": "<string>",
"rate": "<string>",
"per": "1m"
}
]
}
],
"attached_product_id": "<string>",
"using_policy_count": 123,
"using_policies": [
{
"customer_id": "<string>",
"customer_name": "<string>",
"agent_slug": "<string>"
}
],
"using_plan_count": 123
},
"windows": [
{
"key": "<string>",
"duration_minutes": 263520,
"included_units": "<string>"
}
],
"markup_percent": "<string>",
"overage_mode": "refuse",
"overage_markup_percent": "<string>",
"overage_rate_card_id": "<string>",
"settlement_interval_minutes": 123,
"settlement_schedule": "calendar_month",
"per_seat_credits": "<string>",
"grant_rollover_enabled": true,
"billing_item_ids": [
"<string>"
],
"price_configuration_ids": [
"<string>"
],
"using_policy_count": 123,
"is_default": true
}{
"message": "<string>"
}Agents
Replace an agent billing plan
Whole-plan replacement, never a field merge: a field left out means ‘this plan does not state that’, not ‘keep what was there’. Editing a plan spends nothing, refunds nothing and resets no window — it changes what the NEXT call costs for every scope on the plan. mode cannot be changed. Turning overage_mode to metered mints the plan’s invoice container first when it has none.
PUT
/
v1
/
agents
/
plans
/
{plan_id}
Replace an agent billing plan
curl --request PUT \
--url https://api.hyperline.co/v1/agents/plans/{plan_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"rate_card_id": "<string>",
"markup_percent": "<string>",
"overage_markup_percent": "<string>",
"overage_rate_card_id": "<string>",
"windows": [
{
"key": "<string>",
"duration_minutes": 263520,
"included_units": "<string>"
}
],
"per_seat_credits": "<string>",
"grant_rollover_enabled": true,
"settlement_interval_minutes": 22350,
"settlement_schedule": "calendar_month"
}
'import requests
url = "https://api.hyperline.co/v1/agents/plans/{plan_id}"
payload = {
"name": "<string>",
"rate_card_id": "<string>",
"markup_percent": "<string>",
"overage_markup_percent": "<string>",
"overage_rate_card_id": "<string>",
"windows": [
{
"key": "<string>",
"duration_minutes": 263520,
"included_units": "<string>"
}
],
"per_seat_credits": "<string>",
"grant_rollover_enabled": True,
"settlement_interval_minutes": 22350,
"settlement_schedule": "calendar_month"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
rate_card_id: '<string>',
markup_percent: '<string>',
overage_markup_percent: '<string>',
overage_rate_card_id: '<string>',
windows: [{key: '<string>', duration_minutes: 263520, included_units: '<string>'}],
per_seat_credits: '<string>',
grant_rollover_enabled: true,
settlement_interval_minutes: 22350,
settlement_schedule: 'calendar_month'
})
};
fetch('https://api.hyperline.co/v1/agents/plans/{plan_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.hyperline.co/v1/agents/plans/{plan_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'rate_card_id' => '<string>',
'markup_percent' => '<string>',
'overage_markup_percent' => '<string>',
'overage_rate_card_id' => '<string>',
'windows' => [
[
'key' => '<string>',
'duration_minutes' => 263520,
'included_units' => '<string>'
]
],
'per_seat_credits' => '<string>',
'grant_rollover_enabled' => true,
'settlement_interval_minutes' => 22350,
'settlement_schedule' => 'calendar_month'
]),
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://api.hyperline.co/v1/agents/plans/{plan_id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"rate_card_id\": \"<string>\",\n \"markup_percent\": \"<string>\",\n \"overage_markup_percent\": \"<string>\",\n \"overage_rate_card_id\": \"<string>\",\n \"windows\": [\n {\n \"key\": \"<string>\",\n \"duration_minutes\": 263520,\n \"included_units\": \"<string>\"\n }\n ],\n \"per_seat_credits\": \"<string>\",\n \"grant_rollover_enabled\": true,\n \"settlement_interval_minutes\": 22350,\n \"settlement_schedule\": \"calendar_month\"\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api.hyperline.co/v1/agents/plans/{plan_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"rate_card_id\": \"<string>\",\n \"markup_percent\": \"<string>\",\n \"overage_markup_percent\": \"<string>\",\n \"overage_rate_card_id\": \"<string>\",\n \"windows\": [\n {\n \"key\": \"<string>\",\n \"duration_minutes\": 263520,\n \"included_units\": \"<string>\"\n }\n ],\n \"per_seat_credits\": \"<string>\",\n \"grant_rollover_enabled\": true,\n \"settlement_interval_minutes\": 22350,\n \"settlement_schedule\": \"calendar_month\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.hyperline.co/v1/agents/plans/{plan_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"rate_card_id\": \"<string>\",\n \"markup_percent\": \"<string>\",\n \"overage_markup_percent\": \"<string>\",\n \"overage_rate_card_id\": \"<string>\",\n \"windows\": [\n {\n \"key\": \"<string>\",\n \"duration_minutes\": 263520,\n \"included_units\": \"<string>\"\n }\n ],\n \"per_seat_credits\": \"<string>\",\n \"grant_rollover_enabled\": true,\n \"settlement_interval_minutes\": 22350,\n \"settlement_schedule\": \"calendar_month\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"name": "<string>",
"mode": "wallet",
"rate_card": {
"id": "<string>",
"name": "<string>",
"denomination": "credits",
"currency": "<string>",
"description": "<string>",
"fallback_per_usd": "<string>",
"rows": [
{
"id": "<string>",
"kind": "llm",
"provider": "<string>",
"model": "<string>",
"rate_per_m_input": "<string>",
"rate_per_m_output": "<string>",
"rate_unit": "<string>",
"rate_per_m_cached_input": "<string>",
"rate_per_m_cache_write": "<string>",
"dimensions": [
{
"key": "<string>",
"rate": "<string>",
"per": "1m"
}
]
}
],
"attached_product_id": "<string>",
"using_policy_count": 123,
"using_policies": [
{
"customer_id": "<string>",
"customer_name": "<string>",
"agent_slug": "<string>"
}
],
"using_plan_count": 123
},
"windows": [
{
"key": "<string>",
"duration_minutes": 263520,
"included_units": "<string>"
}
],
"markup_percent": "<string>",
"overage_mode": "refuse",
"overage_markup_percent": "<string>",
"overage_rate_card_id": "<string>",
"settlement_interval_minutes": 123,
"settlement_schedule": "calendar_month",
"per_seat_credits": "<string>",
"grant_rollover_enabled": true,
"billing_item_ids": [
"<string>"
],
"price_configuration_ids": [
"<string>"
],
"using_policy_count": 123,
"is_default": true
}{
"message": "<string>"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Body
application/json
Replace plan payload
Required string length:
1 - 120Minimum string length:
1Available options:
refuse, metered Pattern:
^\d+(\.\d+)?$Pattern:
^\d+(\.\d+)?$Minimum string length:
1Required array length:
1 - 8 elementsShow child attributes
Show child attributes
Pattern:
^\d+(\.\d+)?$Required range:
60 <= x <= 44640Available options:
calendar_month Response
Available options:
wallet, credits, windows Show child attributes
Show child attributes
Show child attributes
Show child attributes
Available options:
refuse, metered Available options:
calendar_month Was this page helpful?
⌘I

