Billing
Inspect costs and credits, configure auto-reload and create payments.
Billing is per organization and admin-only, with ?org= selecting it. Restricted keys also need billing scopes. Project-limited keys cannot run organization billing, except costs with an explicit permitted projectId, still as an admin. REST supports payments; MCP does not buy credits or change auto-reload.
Requires billing:read (View balance, invoices, charges, credits, payment methods and cost breakdowns).
Errors specific to this operation:
400
org_required: The caller reaches more than one organization and named none; details.orgs lists their slugs403
key_project_restricted: The key is limited to specific projects, and this acts on the organization
An API key from Account settings, e.g. kn_...
Slug of the organization to act in (see orgs.list); needed when the caller reaches more than one
OK
The request body, query or headers are invalid (invalid_request, invalid_idempotency_key, ...)
The API key is missing, malformed, unknown, revoked or expired
The key lacks a required permission (insufficient_scope), is limited to other projects or to projects while the call acts on the organization (key_project_restricted), the caller's role on the resource is too low (forbidden), or the account is frozen
No such resource, or the caller cannot see it
Too many requests; see the X-RateLimit-* headers and Retry-After
Something failed on our side; the request id is in the body
A service we depend on (the runtime, GitHub) did not answer; retry shortly
The feature is not enabled on this server (github_not_configured), or a service we depend on is down; retry later
A service we depend on did not answer in time; retry shortly
GET /v1/billing/balance HTTP/1.1
Host: api.kinesis.network
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"balanceCents": 1,
"promoBalanceCents": 1,
"currency": "text",
"overLimitCents": 1,
"status": null,
"mode": "text",
"frozen": true,
"autoReload": {
"enabled": true,
"thresholdCents": null,
"targetCents": null
}
}Requires billing:read (View balance, invoices, charges, credits, payment methods and cost breakdowns).
Errors specific to this operation:
400
org_required: The caller reaches more than one organization and named none; details.orgs lists their slugs
An API key from Account settings, e.g. kn_...
Slug of the organization to act in (see orgs.list); needed when the caller reaches more than one
First day, YYYY-MM-DD
^\d{4}-\d{2}-\d{2}$Last day, YYYY-MM-DD
^\d{4}-\d{2}-\d{2}$Limit to one project
^[0-9a-fA-F]{24}$Limit to one app
^[0-9a-fA-F]{24}$OK
The request body, query or headers are invalid (invalid_request, invalid_idempotency_key, ...)
The API key is missing, malformed, unknown, revoked or expired
The key lacks a required permission (insufficient_scope), is limited to other projects or to projects while the call acts on the organization (key_project_restricted), the caller's role on the resource is too low (forbidden), or the account is frozen
No such resource, or the caller cannot see it
Too many requests; see the X-RateLimit-* headers and Retry-After
Something failed on our side; the request id is in the body
A service we depend on (the runtime, GitHub) did not answer; retry shortly
The feature is not enabled on this server (github_not_configured), or a service we depend on is down; retry later
A service we depend on did not answer in time; retry shortly
GET /v1/billing/costs HTTP/1.1
Host: api.kinesis.network
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"start": "2026-01-01T00:00:00.000Z",
"end": "2026-01-01T00:00:00.000Z",
"currency": "text",
"totalCost": 1,
"byProject": [
{
"projectId": "text",
"projectName": "text",
"cost": 1
}
],
"byApp": [
{
"appId": "text",
"appName": "text",
"projectId": "text",
"cost": 1
}
],
"byResource": [
{
"type": "text",
"cost": 1,
"usage": 1,
"unit": "text"
}
],
"daily": [
{
"date": "text",
"cost": 1
}
]
}Requires billing:write (Change auto-reload, payment methods and node protection, redeem vouchers, add credits from the saved card).
Errors specific to this operation:
409
no_payment_method: No card is on file; the user adds one in the dashboard (billingUrl)400
org_required: The caller reaches more than one organization and named none; details.orgs lists their slugs403
key_project_restricted: The key is limited to specific projects, and this acts on the organization
An API key from Account settings, e.g. kn_...
Slug of the organization to act in (see orgs.list); needed when the caller reaches more than one
Reload automatically when the balance drops below the threshold
Balance that triggers a reload, in US cents; required when enabling
Balance after a reload, in US cents, 500 to 50000 above the threshold; required when enabling
OK
The request body, query or headers are invalid (invalid_request, invalid_idempotency_key, ...)
The API key is missing, malformed, unknown, revoked or expired
The key lacks a required permission (insufficient_scope), is limited to other projects or to projects while the call acts on the organization (key_project_restricted), the caller's role on the resource is too low (forbidden), or the account is frozen
No such resource, or the caller cannot see it
The resource is in a state that does not allow the action, or an idempotency key was reused
The request body exceeds the limit given in the body
Too many requests; see the X-RateLimit-* headers and Retry-After
Something failed on our side; the request id is in the body
A service we depend on (the runtime, GitHub) did not answer; retry shortly
The feature is not enabled on this server (github_not_configured), or a service we depend on is down; retry later
A service we depend on did not answer in time; retry shortly
PATCH /v1/billing/auto-reload HTTP/1.1
Host: api.kinesis.network
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 51
{
"enabled": true,
"thresholdCents": 1,
"targetCents": 1
}{
"enabled": true,
"thresholdCents": null,
"targetCents": null
}Requires billing:write (Change auto-reload, payment methods and node protection, redeem vouchers, add credits from the saved card).
Errors specific to this operation:
400
amount_too_large: The amount exceeds the organization's per-transaction maximum (maxCents)409
no_payment_method: No card is on file; the user adds one in the dashboard (billingUrl)403
first_payment_in_dashboard: The organization has never paid on-session; the first payment happens in the dashboard (billingUrl)429
topup_limit: At most 10 API top-ups per day (resetAt)402
card_declined: The issuer declined the charge (declineCode)402
authentication_required: The issuer wants authentication, which needs a browser; pay in the dashboard (billingUrl)402
blocked_by_risk: The charge was blocked by fraud screening409
idempotency_conflict: The idempotencyKey was used before with different parameters409
topup_in_progress: A charge with this idempotencyKey is still running400
org_required: The caller reaches more than one organization and named none; details.orgs lists their slugs403
key_project_restricted: The key is limited to specific projects, and this acts on the organization
An API key from Account settings, e.g. kn_...
Slug of the organization to act in (see orgs.list); needed when the caller reaches more than one
Amount to charge, in US cents (at least 500)
Client token; a retry with the same token returns the original charge instead of making a second one and does not count as another top-up for the day
OK
The request body, query or headers are invalid (invalid_request, invalid_idempotency_key, ...)
The API key is missing, malformed, unknown, revoked or expired
The balance or the card does not cover the action: insufficient_balance, balance_over_limit, card_declined, authentication_required or blocked_by_risk
The key lacks a required permission (insufficient_scope), is limited to other projects or to projects while the call acts on the organization (key_project_restricted), the caller's role on the resource is too low (forbidden), or the account is frozen
No such resource, or the caller cannot see it
The resource is in a state that does not allow the action, or an idempotency key was reused
The request body exceeds the limit given in the body
Too many requests; see the X-RateLimit-* headers and Retry-After
Something failed on our side; the request id is in the body
A service we depend on (the runtime, GitHub) did not answer; retry shortly
The feature is not enabled on this server (github_not_configured), or a service we depend on is down; retry later
A service we depend on did not answer in time; retry shortly
POST /v1/billing/topups HTTP/1.1
Host: api.kinesis.network
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 41
{
"amountCents": 1,
"idempotencyKey": "text"
}{
"id": "text",
"status": "succeeded",
"amountCents": 1,
"credited": true,
"createdAt": "2026-01-01T00:00:00.000Z"
}Requires billing:read (View balance, invoices, charges, credits, payment methods and cost breakdowns).
Errors specific to this operation:
400
org_required: The caller reaches more than one organization and named none; details.orgs lists their slugs403
key_project_restricted: The key is limited to specific projects, and this acts on the organization
An API key from Account settings, e.g. kn_...
Top-up id returned when it was created
^pi_[A-Za-z0-9]+$Slug of the organization to act in (see orgs.list); needed when the caller reaches more than one
OK
The request body, query or headers are invalid (invalid_request, invalid_idempotency_key, ...)
The API key is missing, malformed, unknown, revoked or expired
The key lacks a required permission (insufficient_scope), is limited to other projects or to projects while the call acts on the organization (key_project_restricted), the caller's role on the resource is too low (forbidden), or the account is frozen
No such resource, or the caller cannot see it
Too many requests; see the X-RateLimit-* headers and Retry-After
Something failed on our side; the request id is in the body
A service we depend on (the runtime, GitHub) did not answer; retry shortly
The feature is not enabled on this server (github_not_configured), or a service we depend on is down; retry later
A service we depend on did not answer in time; retry shortly
GET /v1/billing/topups/{topupId} HTTP/1.1
Host: api.kinesis.network
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"id": "text",
"status": "succeeded",
"amountCents": 1,
"credited": true,
"createdAt": "2026-01-01T00:00:00.000Z"
}Create a hosted payment page for adding credits by card; nothing is charged until the user completes it
Requires billing:write (Change auto-reload, payment methods and node protection, redeem vouchers, add credits from the saved card).
Errors specific to this operation:
400
amount_too_large: The amount exceeds the organization's per-transaction maximum (maxCents)409
no_customer: The organization has no payment profile yet (billingUrl)400
org_required: The caller reaches more than one organization and named none; details.orgs lists their slugs403
key_project_restricted: The key is limited to specific projects, and this acts on the organization
An API key from Account settings, e.g. kn_...
Slug of the organization to act in (see orgs.list); needed when the caller reaches more than one
Amount the page will charge, in US cents (at least 500)
Where the user lands after paying; defaults to the dashboard billing page
Where the user lands after backing out; defaults to the dashboard billing page
Created
The request body, query or headers are invalid (invalid_request, invalid_idempotency_key, ...)
The API key is missing, malformed, unknown, revoked or expired
The key lacks a required permission (insufficient_scope), is limited to other projects or to projects while the call acts on the organization (key_project_restricted), the caller's role on the resource is too low (forbidden), or the account is frozen
No such resource, or the caller cannot see it
The resource is in a state that does not allow the action, or an idempotency key was reused
The request body exceeds the limit given in the body
Too many requests; see the X-RateLimit-* headers and Retry-After
Something failed on our side; the request id is in the body
A service we depend on (the runtime, GitHub) did not answer; retry shortly
The feature is not enabled on this server (github_not_configured), or a service we depend on is down; retry later
A service we depend on did not answer in time; retry shortly
POST /v1/billing/checkout-sessions HTTP/1.1
Host: api.kinesis.network
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 86
{
"amountCents": 1,
"successUrl": "https://example.com",
"cancelUrl": "https://example.com"
}{
"id": "text",
"url": "text",
"amountCents": 1,
"expiresAt": "2026-01-01T00:00:00.000Z"
}List the organization's monthly invoices, newest first. Optionally for one month, status or date range
Requires billing:read (View balance, invoices, charges, credits, payment methods and cost breakdowns).
Errors specific to this operation:
400
org_required: The caller reaches more than one organization and named none; details.orgs lists their slugs403
key_project_restricted: The key is limited to specific projects, and this acts on the organization
An API key from Account settings, e.g. kn_...
Slug of the organization to act in (see orgs.list); needed when the caller reaches more than one
Invoices of one year
Invoices of one month (with year)
Invoices in this state
Billing periods starting on or after this day, YYYY-MM-DD
^\d{4}-\d{2}-\d{2}$Billing periods ending on or before this day, YYYY-MM-DD
^\d{4}-\d{2}-\d{2}$OK
The request body, query or headers are invalid (invalid_request, invalid_idempotency_key, ...)
The API key is missing, malformed, unknown, revoked or expired
The key lacks a required permission (insufficient_scope), is limited to other projects or to projects while the call acts on the organization (key_project_restricted), the caller's role on the resource is too low (forbidden), or the account is frozen
No such resource, or the caller cannot see it
Too many requests; see the X-RateLimit-* headers and Retry-After
Something failed on our side; the request id is in the body
A service we depend on (the runtime, GitHub) did not answer; retry shortly
The feature is not enabled on this server (github_not_configured), or a service we depend on is down; retry later
A service we depend on did not answer in time; retry shortly
GET /v1/billing/invoices HTTP/1.1
Host: api.kinesis.network
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"invoices": [
{
"number": "text",
"period": {
"start": "text",
"end": "text"
},
"status": "draft",
"partialMonth": true,
"currency": "text",
"totalCents": 1,
"amountDueCents": 1,
"closingBalanceCents": 1,
"createdOn": "text",
"updatedOn": "text"
}
]
}Get one invoice with its statement summary, itemized usage and the payments and credits of the period
Requires billing:read (View balance, invoices, charges, credits, payment methods and cost breakdowns).
Errors specific to this operation:
400
org_required: The caller reaches more than one organization and named none; details.orgs lists their slugs403
key_project_restricted: The key is limited to specific projects, and this acts on the organization
An API key from Account settings, e.g. kn_...
Invoice number
Slug of the organization to act in (see orgs.list); needed when the caller reaches more than one
OK
The request body, query or headers are invalid (invalid_request, invalid_idempotency_key, ...)
The API key is missing, malformed, unknown, revoked or expired
The key lacks a required permission (insufficient_scope), is limited to other projects or to projects while the call acts on the organization (key_project_restricted), the caller's role on the resource is too low (forbidden), or the account is frozen
No such resource, or the caller cannot see it
Too many requests; see the X-RateLimit-* headers and Retry-After
Something failed on our side; the request id is in the body
A service we depend on (the runtime, GitHub) did not answer; retry shortly
The feature is not enabled on this server (github_not_configured), or a service we depend on is down; retry later
A service we depend on did not answer in time; retry shortly
GET /v1/billing/invoices/{invoiceNumber} HTTP/1.1
Host: api.kinesis.network
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"number": "text",
"period": {
"start": "text",
"end": "text"
},
"status": "draft",
"partialMonth": true,
"currency": "text",
"totalCents": 1,
"amountDueCents": 1,
"closingBalanceCents": 1,
"createdOn": "text",
"updatedOn": "text",
"customer": {
"email": "text",
"name": null,
"billingEmail": null
},
"statement": {
"openingBalanceCents": 1,
"closingBalanceCents": 1,
"amountDueCents": 1,
"paymentsCents": 1,
"promosCents": 1,
"refundsCents": 1,
"adjustmentsCents": 1,
"usageCents": 1,
"taxCents": 1,
"taxRateBps": 1
},
"items": [
{
"resource": "text",
"detail": null,
"csp": null,
"region": null,
"zone": null,
"kcRegion": null,
"quantity": 1,
"unit": "text",
"unitPrice": 1,
"amount": 1
}
],
"credits": [
{
"ledgerEntryId": "text",
"type": "text",
"at": "text",
"amountCents": 1,
"label": "text",
"paymentMethod": {
"brand": null,
"last4": null
}
}
],
"finalizedOn": "text",
"paidOn": "text"
}Requires billing:read (View balance, invoices, charges, credits, payment methods and cost breakdowns).
Errors specific to this operation:
400
org_required: The caller reaches more than one organization and named none; details.orgs lists their slugs403
key_project_restricted: The key is limited to specific projects, and this acts on the organization
An API key from Account settings, e.g. kn_...
Invoice number
Slug of the organization to act in (see orgs.list); needed when the caller reaches more than one
OK
The request body, query or headers are invalid (invalid_request, invalid_idempotency_key, ...)
The API key is missing, malformed, unknown, revoked or expired
The key lacks a required permission (insufficient_scope), is limited to other projects or to projects while the call acts on the organization (key_project_restricted), the caller's role on the resource is too low (forbidden), or the account is frozen
No such resource, or the caller cannot see it
Too many requests; see the X-RateLimit-* headers and Retry-After
Something failed on our side; the request id is in the body
A service we depend on (the runtime, GitHub) did not answer; retry shortly
The feature is not enabled on this server (github_not_configured), or a service we depend on is down; retry later
A service we depend on did not answer in time; retry shortly
GET /v1/billing/invoices/{invoiceNumber}/pdf HTTP/1.1
Host: api.kinesis.network
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
binaryUsage charges summed per day or per hour, newest first. From the ledger, with the split between serverless apps, dedicated servers and spot leases
Requires billing:read (View balance, invoices, charges, credits, payment methods and cost breakdowns).
Errors specific to this operation:
400
org_required: The caller reaches more than one organization and named none; details.orgs lists their slugs403
key_project_restricted: The key is limited to specific projects, and this acts on the organization
An API key from Account settings, e.g. kn_...
Slug of the organization to act in (see orgs.list); needed when the caller reaches more than one
Sum per day (default) or per hour
First day to include, YYYY-MM-DD
^\d{4}-\d{2}-\d{2}$Last day to include, YYYY-MM-DD
^\d{4}-\d{2}-\d{2}$IANA time zone the days are counted in, e.g. America/Los_Angeles; UTC by default
Items per page, 1 to 200 (default 50)
nextCursor from the previous page; omit for the first page
OK
The request body, query or headers are invalid (invalid_request, invalid_idempotency_key, ...)
The API key is missing, malformed, unknown, revoked or expired
The key lacks a required permission (insufficient_scope), is limited to other projects or to projects while the call acts on the organization (key_project_restricted), the caller's role on the resource is too low (forbidden), or the account is frozen
No such resource, or the caller cannot see it
Too many requests; see the X-RateLimit-* headers and Retry-After
Something failed on our side; the request id is in the body
A service we depend on (the runtime, GitHub) did not answer; retry shortly
The feature is not enabled on this server (github_not_configured), or a service we depend on is down; retry later
A service we depend on did not answer in time; retry shortly
GET /v1/billing/charges HTTP/1.1
Host: api.kinesis.network
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"charges": [
{
"period": "2026-01-01T00:00:00.000Z",
"amountCents": 1,
"appsCents": 1,
"serversCents": 1,
"spotCents": 1,
"currency": "text"
}
],
"nextCursor": null
}Ledger entries that added or removed credit, newest first. Payments, promotional credit, refunds, adjustments
Requires billing:read (View balance, invoices, charges, credits, payment methods and cost breakdowns).
Errors specific to this operation:
400
org_required: The caller reaches more than one organization and named none; details.orgs lists their slugs403
key_project_restricted: The key is limited to specific projects, and this acts on the organization
An API key from Account settings, e.g. kn_...
Slug of the organization to act in (see orgs.list); needed when the caller reaches more than one
Only entries of this type
First day to include, YYYY-MM-DD (UTC)
^\d{4}-\d{2}-\d{2}$Last day to include, YYYY-MM-DD (UTC)
^\d{4}-\d{2}-\d{2}$Items per page, 1 to 200 (default 50)
nextCursor from the previous page; omit for the first page
OK
The request body, query or headers are invalid (invalid_request, invalid_idempotency_key, ...)
The API key is missing, malformed, unknown, revoked or expired
The key lacks a required permission (insufficient_scope), is limited to other projects or to projects while the call acts on the organization (key_project_restricted), the caller's role on the resource is too low (forbidden), or the account is frozen
No such resource, or the caller cannot see it
Too many requests; see the X-RateLimit-* headers and Retry-After
Something failed on our side; the request id is in the body
A service we depend on (the runtime, GitHub) did not answer; retry shortly
The feature is not enabled on this server (github_not_configured), or a service we depend on is down; retry later
A service we depend on did not answer in time; retry shortly
GET /v1/billing/credits HTTP/1.1
Host: api.kinesis.network
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"entries": [
{
"id": "text",
"at": "2026-01-01T00:00:00.000Z",
"type": "credit_topup",
"amountCents": 1,
"currency": "text",
"status": "text",
"paymentMethod": {
"brand": null,
"last4": null
},
"note": null
}
],
"nextCursor": null
}Requires billing:read (View balance, invoices, charges, credits, payment methods and cost breakdowns).
Errors specific to this operation:
400
org_required: The caller reaches more than one organization and named none; details.orgs lists their slugs403
key_project_restricted: The key is limited to specific projects, and this acts on the organization
An API key from Account settings, e.g. kn_...
Slug of the organization to act in (see orgs.list); needed when the caller reaches more than one
OK
The request body, query or headers are invalid (invalid_request, invalid_idempotency_key, ...)
The API key is missing, malformed, unknown, revoked or expired
The key lacks a required permission (insufficient_scope), is limited to other projects or to projects while the call acts on the organization (key_project_restricted), the caller's role on the resource is too low (forbidden), or the account is frozen
No such resource, or the caller cannot see it
Too many requests; see the X-RateLimit-* headers and Retry-After
Something failed on our side; the request id is in the body
A service we depend on (the runtime, GitHub) did not answer; retry shortly
The feature is not enabled on this server (github_not_configured), or a service we depend on is down; retry later
A service we depend on did not answer in time; retry shortly
GET /v1/billing/payment-methods HTTP/1.1
Host: api.kinesis.network
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"paymentMethods": [
{
"id": "text",
"brand": null,
"last4": null,
"expMonth": 1,
"expYear": 1,
"default": true,
"addedAt": "2026-01-01T00:00:00.000Z"
}
]
}Requires billing:write (Change auto-reload, payment methods and node protection, redeem vouchers, add credits from the saved card).
Errors specific to this operation:
404
not_found: No saved card has this id400
org_required: The caller reaches more than one organization and named none; details.orgs lists their slugs403
key_project_restricted: The key is limited to specific projects, and this acts on the organization
An API key from Account settings, e.g. kn_...
Payment method id from the list
Slug of the organization to act in (see orgs.list); needed when the caller reaches more than one
OK
The request body, query or headers are invalid (invalid_request, invalid_idempotency_key, ...)
The API key is missing, malformed, unknown, revoked or expired
The key lacks a required permission (insufficient_scope), is limited to other projects or to projects while the call acts on the organization (key_project_restricted), the caller's role on the resource is too low (forbidden), or the account is frozen
No such resource, or the caller cannot see it
The resource is in a state that does not allow the action, or an idempotency key was reused
The request body exceeds the limit given in the body
Too many requests; see the X-RateLimit-* headers and Retry-After
Something failed on our side; the request id is in the body
A service we depend on (the runtime, GitHub) did not answer; retry shortly
The feature is not enabled on this server (github_not_configured), or a service we depend on is down; retry later
A service we depend on did not answer in time; retry shortly
POST /v1/billing/payment-methods/{paymentMethodId}/default HTTP/1.1
Host: api.kinesis.network
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"paymentMethods": [
{
"id": "text",
"brand": null,
"last4": null,
"expMonth": 1,
"expYear": 1,
"default": true,
"addedAt": "2026-01-01T00:00:00.000Z"
}
]
}Remove a saved card. A removed default is replaced by the next saved card; auto-reload is switched off when no card is left.
Requires billing:write (Change auto-reload, payment methods and node protection, redeem vouchers, add credits from the saved card).
Errors specific to this operation:
404
not_found: No saved card has this id400
org_required: The caller reaches more than one organization and named none; details.orgs lists their slugs403
key_project_restricted: The key is limited to specific projects, and this acts on the organization
An API key from Account settings, e.g. kn_...
Payment method id from the list
Slug of the organization to act in (see orgs.list); needed when the caller reaches more than one
OK
The request body, query or headers are invalid (invalid_request, invalid_idempotency_key, ...)
The API key is missing, malformed, unknown, revoked or expired
The key lacks a required permission (insufficient_scope), is limited to other projects or to projects while the call acts on the organization (key_project_restricted), the caller's role on the resource is too low (forbidden), or the account is frozen
No such resource, or the caller cannot see it
The resource is in a state that does not allow the action, or an idempotency key was reused
Too many requests; see the X-RateLimit-* headers and Retry-After
Something failed on our side; the request id is in the body
A service we depend on (the runtime, GitHub) did not answer; retry shortly
The feature is not enabled on this server (github_not_configured), or a service we depend on is down; retry later
A service we depend on did not answer in time; retry shortly
DELETE /v1/billing/payment-methods/{paymentMethodId} HTTP/1.1
Host: api.kinesis.network
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"paymentMethods": [
{
"id": "text",
"brand": null,
"last4": null,
"expMonth": 1,
"expYear": 1,
"default": true,
"addedAt": "2026-01-01T00:00:00.000Z"
}
],
"autoReloadDisabled": true
}Requires billing:write (Change auto-reload, payment methods and node protection, redeem vouchers, add credits from the saved card).
Errors specific to this operation:
404
voucher_not_found: No voucher has this code400
voucher_rejected: The voucher is inactive, used up, not yet valid, or restricted to other accounts429
too_many_attempts: More than five codes tried in a minute400
org_required: The caller reaches more than one organization and named none; details.orgs lists their slugs403
key_project_restricted: The key is limited to specific projects, and this acts on the organization
An API key from Account settings, e.g. kn_...
Slug of the organization to act in (see orgs.list); needed when the caller reaches more than one
The voucher code
OK
The request body, query or headers are invalid (invalid_request, invalid_idempotency_key, ...)
The API key is missing, malformed, unknown, revoked or expired
The key lacks a required permission (insufficient_scope), is limited to other projects or to projects while the call acts on the organization (key_project_restricted), the caller's role on the resource is too low (forbidden), or the account is frozen
No such resource, or the caller cannot see it
The resource is in a state that does not allow the action, or an idempotency key was reused
The request body exceeds the limit given in the body
Too many requests; see the X-RateLimit-* headers and Retry-After
Something failed on our side; the request id is in the body
A service we depend on (the runtime, GitHub) did not answer; retry shortly
The feature is not enabled on this server (github_not_configured), or a service we depend on is down; retry later
A service we depend on did not answer in time; retry shortly
POST /v1/billing/vouchers/redeem HTTP/1.1
Host: api.kinesis.network
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 15
{
"code": "text"
}{
"amountCents": 1,
"redemptionsRemaining": 1
}Read the organization's node protection setting. Whether its dedicated servers are hibernated automatically when the balance is about to run out, and at how many hours of runway
Requires billing:read (View balance, invoices, charges, credits, payment methods and cost breakdowns).
Errors specific to this operation:
400
org_required: The caller reaches more than one organization and named none; details.orgs lists their slugs403
key_project_restricted: The key is limited to specific projects, and this acts on the organization
An API key from Account settings, e.g. kn_...
Slug of the organization to act in (see orgs.list); needed when the caller reaches more than one
OK
The request body, query or headers are invalid (invalid_request, invalid_idempotency_key, ...)
The API key is missing, malformed, unknown, revoked or expired
The key lacks a required permission (insufficient_scope), is limited to other projects or to projects while the call acts on the organization (key_project_restricted), the caller's role on the resource is too low (forbidden), or the account is frozen
No such resource, or the caller cannot see it
Too many requests; see the X-RateLimit-* headers and Retry-After
Something failed on our side; the request id is in the body
A service we depend on (the runtime, GitHub) did not answer; retry shortly
The feature is not enabled on this server (github_not_configured), or a service we depend on is down; retry later
A service we depend on did not answer in time; retry shortly
GET /v1/billing/node-protection HTTP/1.1
Host: api.kinesis.network
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"enabled": true,
"thresholdHours": 1,
"hibernatedAt": "2026-01-01T00:00:00.000Z",
"deprovisionedAt": "2026-01-01T00:00:00.000Z"
}Turn node protection on with a runway threshold, or off. On: when the balance would run out within thresholdHours at the current spend rate, the organization's dedicated servers are hibernated (storage only) until credits are added.
Requires billing:write (Change auto-reload, payment methods and node protection, redeem vouchers, add credits from the saved card).
Errors specific to this operation:
400
org_required: The caller reaches more than one organization and named none; details.orgs lists their slugs403
key_project_restricted: The key is limited to specific projects, and this acts on the organization
An API key from Account settings, e.g. kn_...
Slug of the organization to act in (see orgs.list); needed when the caller reaches more than one
Turn protection on or off
Hours of runway that trigger hibernation, 2 to 48; required when enabling
OK
The request body, query or headers are invalid (invalid_request, invalid_idempotency_key, ...)
The API key is missing, malformed, unknown, revoked or expired
The key lacks a required permission (insufficient_scope), is limited to other projects or to projects while the call acts on the organization (key_project_restricted), the caller's role on the resource is too low (forbidden), or the account is frozen
No such resource, or the caller cannot see it
The resource is in a state that does not allow the action, or an idempotency key was reused
The request body exceeds the limit given in the body
Too many requests; see the X-RateLimit-* headers and Retry-After
Something failed on our side; the request id is in the body
A service we depend on (the runtime, GitHub) did not answer; retry shortly
The feature is not enabled on this server (github_not_configured), or a service we depend on is down; retry later
A service we depend on did not answer in time; retry shortly
PATCH /v1/billing/node-protection HTTP/1.1
Host: api.kinesis.network
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 35
{
"enabled": true,
"thresholdHours": 1
}{
"enabled": true,
"thresholdHours": 1,
"hibernatedAt": "2026-01-01T00:00:00.000Z",
"deprovisionedAt": "2026-01-01T00:00:00.000Z"
}Was this helpful?
