Get the account's plan, limits and usage
curl --request GET \
--url https://test-api.segmnt.cloud/v1/billing/plan \
--cookie segmnt_session=import requests
url = "https://test-api.segmnt.cloud/v1/billing/plan"
headers = {"cookie": "segmnt_session="}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {cookie: 'segmnt_session='}};
fetch('https://test-api.segmnt.cloud/v1/billing/plan', 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://test-api.segmnt.cloud/v1/billing/plan",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_COOKIE => "segmnt_session=",
]);
$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://test-api.segmnt.cloud/v1/billing/plan"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("cookie", "segmnt_session=")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://test-api.segmnt.cloud/v1/billing/plan")
.header("cookie", "segmnt_session=")
.asString();require 'uri'
require 'net/http'
url = URI("https://test-api.segmnt.cloud/v1/billing/plan")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["cookie"] = 'segmnt_session='
response = http.request(request)
puts response.read_body{
"plan": {
"id": "free",
"name": "<string>"
},
"status": "active",
"currentPeriod": {
"start": "2023-11-07T05:31:56Z",
"end": "2023-11-07T05:31:56Z"
},
"limits": {
"storedSeconds": 123,
"uploadSecondsPerPeriod": 123,
"watchedMinutesPerPeriod": 123,
"verifiedDomains": 123,
"projects": 123,
"maxQuality": "360p",
"whiteLabel": true
},
"usage": {
"storedSeconds": 123,
"watchedMinutes": 123,
"verifiedDomains": 123,
"overageMinutes": 123
}
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "plan_limit_reached",
"detail": "<string>"
}Billing
Get the account's plan, limits and usage
GET
/
v1
/
billing
/
plan
Get the account's plan, limits and usage
curl --request GET \
--url https://test-api.segmnt.cloud/v1/billing/plan \
--cookie segmnt_session=import requests
url = "https://test-api.segmnt.cloud/v1/billing/plan"
headers = {"cookie": "segmnt_session="}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {cookie: 'segmnt_session='}};
fetch('https://test-api.segmnt.cloud/v1/billing/plan', 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://test-api.segmnt.cloud/v1/billing/plan",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_COOKIE => "segmnt_session=",
]);
$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://test-api.segmnt.cloud/v1/billing/plan"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("cookie", "segmnt_session=")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://test-api.segmnt.cloud/v1/billing/plan")
.header("cookie", "segmnt_session=")
.asString();require 'uri'
require 'net/http'
url = URI("https://test-api.segmnt.cloud/v1/billing/plan")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["cookie"] = 'segmnt_session='
response = http.request(request)
puts response.read_body{
"plan": {
"id": "free",
"name": "<string>"
},
"status": "active",
"currentPeriod": {
"start": "2023-11-07T05:31:56Z",
"end": "2023-11-07T05:31:56Z"
},
"limits": {
"storedSeconds": 123,
"uploadSecondsPerPeriod": 123,
"watchedMinutesPerPeriod": 123,
"verifiedDomains": 123,
"projects": 123,
"maxQuality": "360p",
"whiteLabel": true
},
"usage": {
"storedSeconds": 123,
"watchedMinutes": 123,
"verifiedDomains": 123,
"overageMinutes": 123
}
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "plan_limit_reached",
"detail": "<string>"
}Authorizations
Dashboard session cookie, set after SSO sign-in.
Response
Current plan.
Show child attributes
Show child attributes
Available options:
active, pilot, past_due, canceled Show child attributes
Show child attributes
null means no limit.
Show child attributes
Show child attributes
Totals for all projects in the account in the current period.
Show child attributes
Show child attributes