Create an agent billing plan
curl --request POST \
--url https://api.hyperline.co/v1/agents/plans \
--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"
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.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
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', 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",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
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"
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("POST", 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.post("https://api.hyperline.co/v1/agents/plans")
.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")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.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
}Agents
Create an agent billing plan
Assemble a new offer. mode is fixed at creation. A windows plan requires at least one window definition; rate_card_id must name a card whose denomination matches the mode. Asking for overage_mode: metered also mints the plan’s hidden invoice container — the pass-through catalog product that carries metered overage onto ordinary invoices — so overage is billable the moment a customer joins.
POST
/
v1
/
agents
/
plans
Create an agent billing plan
curl --request POST \
--url https://api.hyperline.co/v1/agents/plans \
--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"
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.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
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', 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",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
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"
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("POST", 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.post("https://api.hyperline.co/v1/agents/plans")
.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")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.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
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Create plan payload
Required string length:
1 - 120Available options:
wallet, credits, windows Minimum 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
201 - application/json
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

