Billing Account API
The Notehub billing account API provides RESTful methods that can be used to retrieve data related to Notehub billing accounts.
| Name | HTTP Request |
|---|---|
| Get Billing Accounts | GET /v1/billing-accounts |
| Get Billing Account | GET /v1/billing-accounts/{billingAccountUID} |
| Get Billing Account Balance History | GET /v1/billing-accounts/{billingAccountUID}/balance-history |
Get Billing Accounts Notehub
Get an array of Notehub billing accounts associated with a generated authentication token.
| HTTP Method: | GET |
| URL: | https://api.notefile.net/v1/billing-accounts |
| Minimum Notehub project-level role: | viewer |
| Required HTTP Headers: | Authorization: Bearer <token>, where the token is a valid authentication token. |
curl -X GET
-L 'https://api.notefile.net/v1/billing-accounts'
-H 'Authorization: Bearer <access_token>'import * as NotehubJs from "@blues-inc/notehub-js";
let defaultClient = NotehubJs.ApiClient.instance;
// Configure Bearer access token for authorization: personalAccessToken
let personalAccessToken = defaultClient.authentications["personalAccessToken"];
personalAccessToken.accessToken = "YOUR ACCESS TOKEN";
let apiInstance = new NotehubJs.BillingAccountApi();
apiInstance.getBillingAccounts().then(
(data) => {
console.log(
"API called successfully. Returned data: " + JSON.stringify(data)
);
},
(error) => {
console.error(error);
}
);import notehub_py
from notehub_py.models.get_billing_accounts200_response import GetBillingAccounts200Response
from notehub_py.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.notefile.net
configuration = notehub_py.Configuration(
host = "https://api.notefile.net"
)
# Configure Bearer authorization: personalAccessToken
configuration = notehub_py.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with notehub_py.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = notehub_py.BillingAccountApi(api_client)
try:
api_response = api_instance.get_billing_accounts()
print("The response of BillingAccountApi->get_billing_accounts:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling BillingAccountApi->get_billing_accounts: %s\n" % e)Response Members
uid
string
The globally-unique identifier of the billing account.
name
string
The name of the billing account.
role
The role of the billing account:
billing_admin Full administrative privileges to purchase credits, setup
auto-recharge and invite members.
billing_manager Access to invite members is restricted.
project_creator Access is limited to creating projects within a billing
account.
{
"billing_accounts": [
{
"uid": "00000000-0000-0000-0000-000000000000",
"name": "Jane's Billing Account",
"role": "billing_admin"
},
{
"uid": "00000000-0000-0000-0000-000000000000",
"name": "John's Billing Account",
"role": "billing_manager"
}
]
}Get Billing Account Notehub
Get information about a single Notehub billing account by its BillingAccountUID.
| HTTP Method: | GET |
| URL: | https://api.notefile.net/v1/billing-accounts/{billingAccountUID} |
| Path Parameters: |
|
| Minimum Notehub project-level role: | viewer |
| Required HTTP Headers: | Authorization: Bearer <token>, where the token is a valid authentication token. |
curl -X GET
-L 'https://api.notefile.net/v1/billing-accounts/<billingAccountUID>'
-H 'Authorization: Bearer <access_token>'Response Members
uid
string
The globally-unique identifier of the billing account.
name
string
The name of the billing account.
owner
string
The name of the owner of the billing account.
suspended
boolean
Whether or not the billing account is suspended.
plan
object
An object containing the billing account's current plan information.
plan.type
string
The type of plan associated with this billing account. One of "Enterprise" or
"Essentials".
plan.current_balance
integer
The event capacity remaining on the plan.
plan.start_date
string (date)
The start date of the current plan period.
plan.end_date
string (date)
For enterprise accounts, the end date of the current plan period.
plan.event_capacity
integer
For enterprise accounts, the total event capacity for the current plan period.
{
"uid": "00000000-0000-0000-0000-000000000000",
"name": "Jane's Billing Account",
"owner": "jane@example.com",
"suspended": false,
"plan": {
"type": "Essentials",
"current_balance": 5000,
"start_date": "2026-01-01T00:00:00Z"
}
}Get Billing Account Balance History Notehub
Get the event balance history for a Notehub billing account.
| HTTP Method: | GET |
| URL: | https://api.notefile.net/v1/billing-accounts/{billingAccountUID}/balance-history |
| Path Parameters: |
|
| Minimum Notehub project-level role: | viewer |
| Required HTTP Headers: | Authorization: Bearer <token>, where the token is a valid authentication token. |
startDate
string (optional)
Start date for filtering results, in ISO 8601 date-time format.
endDate
string (optional)
End date for filtering results, in ISO 8601 date-time format.
curl -X GET
-L 'https://api.notefile.net/v1/billing-accounts/<billingAccountUID>/balance-history'
-H 'Authorization: Bearer <access_token>'Response Members
data
array of objects
An array of objects containing event balance history. Each object contains the following fields:
data.period
string (date)
The start of the time period for this balance record.
data.remaining_event_capacity
integer
The number of events remaining in the billing account's capacity at the end of this period.
data.total_event_capacity_used
integer
The total number of events consumed from the billing account's capacity during this period.
{
"data": [
{
"period": "2026-01-01T00:00:00Z",
"remaining_event_capacity": 15000,
"total_event_capacity_used": 5000
},
{
"period": "2026-01-02T00:00:00Z",
"remaining_event_capacity": 10000,
"total_event_capacity_used": 5000
},
{
"period": "2026-01-03T00:00:00Z",
"remaining_event_capacity": 5000,
"total_event_capacity_used": 5000
}
]
}