API · v2.0.0
Fleet API
For Max, Ulti and anyone else on the fleet: quotes, proposals, invoices, subscriptions and payment links across brands and Stripe accounts, without the UI.
Authentication
Create a token in Settings with a label (for example "Max") and scopes. It is shown once. Send it as a bearer header on every call. Every call is written to the audit log with the token label, endpoint, time and IP.
export KB_TOKEN=kb_... curl https://billing.kyberapps.com/api/v1/me -H "Authorization: Bearer $KB_TOKEN"
Rate limit per token: 60 burst, then 1 request per second. 429 carries Retry-After. Idempotency-Key on POST replays the stored response for 1 key + token + path.
Scopes
| read | List and read everything, including proposal acceptance status. |
| quotes:write | Create and update organizations and quotes; mark quotes sent. |
| proposals:write | Create proposals from quotes, edit them, mark sent. |
| invoices:write | Create Stripe or manual invoices, send, mark paid. |
| subscriptions:write | Create subscriptions from accepted proposals, sync, set brand. |
| links:write | Create and deactivate payment links. |
| crm:write | Create and update deals (including moving stages) and tasks. |
| prospects:write | Push researched schools, districts and staff into the prospect Review queue (fleet research import). |
| admin | Everything, including Stripe account sync. |
Conventions
JSON bodies. Money is integer cents (unit_cents, total_cents); on quote lines you may send unit_price in dollars instead. Dates are YYYY-MM-DD. Timestamps are UTC ISO 8601. Errors are {"error": "..."} with honest status codes: 400, 401, 403, 404, 405, 409, 422, 429, 502, 503.
The whole flow in five calls
ORG=$(curl -s https://billing.kyberapps.com/api/v1/orgs -H "Authorization: Bearer $KB_TOKEN" -H "Content-Type: application/json" -d '{"name":"Sample Academy","type":"school","enrollment":900}' | python3 -c 'import sys,json;print(json.load(sys.stdin)["id"])')
Q=$(curl -s https://billing.kyberapps.com/api/v1/quotes -H "Authorization: Bearer $KB_TOKEN" -H "Content-Type: application/json" -d "{\"org_id\":$ORG,\"lines\":[{\"product\":\"KyberCopy\",\"qty\":1}]}" | python3 -c 'import sys,json;print(json.load(sys.stdin)["id"])')
curl -s -X POST https://billing.kyberapps.com/api/v1/quotes/$Q/send -H "Authorization: Bearer $KB_TOKEN" # share_url for the customer
P=$(curl -s https://billing.kyberapps.com/api/v1/proposals -H "Authorization: Bearer $KB_TOKEN" -H "Content-Type: application/json" -d "{\"quote_id\":$Q,\"send\":true}" | python3 -c 'import sys,json;print(json.load(sys.stdin)["id"])')
curl -s https://billing.kyberapps.com/api/v1/proposals/$P/status -H "Authorization: Bearer $KB_TOKEN" # poll until status=accepted
curl -s https://billing.kyberapps.com/api/v1/invoices -H "Authorization: Bearer $KB_TOKEN" -H "Content-Type: application/json" -d "{\"proposal_id\":$P,\"send\":true}"Webhooks
Add an endpoint in Settings, Webhooks (or POST /api/v1/webhook-endpoints). Each event is POSTed as JSON {id, type, created, api_version, data: {object_type, object}} with headers Kyber-Event-Id, Kyber-Event-Type, Kyber-Delivery and Kyber-Signature: t=<unix seconds>,v1=<hex HMAC-SHA256 of "<t>.<raw body>" keyed with the endpoint secret>. Reject a signature older than 5 minutes. Answer 2xx within 8 seconds; anything else is retried after 1, 5, 30, 120 and 720 minutes (6 tries). 15 failed deliveries in a row turn the endpoint off. The same event id can arrive twice: deduplicate on it.
# Python: verify a delivery
import hmac, hashlib, time
def verify(secret, raw_body, header):
parts = dict(p.split("=", 1) for p in header.split(","))
if abs(time.time() - int(parts["t"])) > 300: return False
mac = hmac.new(secret.encode(), (parts["t"] + ".").encode() + raw_body, hashlib.sha256).hexdigest()
return hmac.compare_digest(mac, parts["v1"])
| Event | When |
|---|---|
| customer.created | A customer was added (screen, API, import). |
| customer.updated | A customer's details changed. |
| quote.created | A draft quote was made. |
| quote.sent | A quote was marked sent. |
| quote.accepted | The customer accepted or signed a quote. |
| quote.declined | The customer declined a quote. |
| quote.changes_requested | The customer asked for changes on a quote. |
| proposal.sent | A proposal was marked sent. |
| proposal.signed | The customer accepted and signed a proposal. |
| proposal.declined | The customer declined a proposal. |
| invoice.created | An invoice was made (draft or a PO/check invoice). |
| invoice.issued | A draft invoice was issued and is now open. |
| invoice.paid | An invoice is paid in full. |
| invoice.voided | An invoice was voided. |
| invoice.viewed | The customer opened an invoice for the first time. |
| payment.received | A check, wire or other payment was recorded and applied. |
| credit_note.issued | A credit note was issued on an invoice. |
| deal.created | A deal was added to the pipeline. |
| deal.stage_changed | A deal moved to another open stage. |
| deal.won | A deal was won. |
| deal.lost | A deal was lost. |
| task.created | A task was added. |
| task.completed | A task was ticked done. |
Endpoints
Who am I
Returns the token label and scopes.
curl https://billing.kyberapps.com/api/v1/me -H "Authorization: Bearer $KB_TOKEN"
Pricing rules
The pricing rules as data: KyberCopy bands, KyberGate floor and bands, manual products, multi-year discounts.
curl https://billing.kyberapps.com/api/v1/pricing-rules -H "Authorization: Bearer $KB_TOKEN"
Suggest a line
Default description, unit and unit price for a product. requires_price=true means the price must be supplied manually.
curl https://billing.kyberapps.com/api/v1/pricing-rules/suggest?product=KyberCopy&qty=1&enrollment=900 -H "Authorization: Bearer $KB_TOKEN"
Agreement text
Current Master Subscription Agreement text and version.
curl https://billing.kyberapps.com/api/v1/terms -H "Authorization: Bearer $KB_TOKEN"
List organizations
Each org carries tags (list of strings). tag= narrows to one segment (case-insensitive).
curl https://billing.kyberapps.com/api/v1/orgs?search=&tag= -H "Authorization: Bearer $KB_TOKEN"
List tags
Every customer tag with how many customers carry it, most used first.
curl https://billing.kyberapps.com/api/v1/tags -H "Authorization: Bearer $KB_TOKEN"
Create organization
type is school, district or other. contacts is a list of {name,email,phone,role}. products is a list of product names.
curl -X POST https://billing.kyberapps.com/api/v1/orgs \
-H "Authorization: Bearer $KB_TOKEN" -H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{"name": "Sample Academy", "type": "school", "address": "1 Main St, Albany, NY", "enrollment": 900, "contacts": [{"name": "Dana Lee", "email": "dlee@sample.edu", "phone": "", "role": "IT Director"}], "products": ["KyberCopy"], "tax_exempt": true, "tax_exempt_no": "EX-12345", "tags": ["Renewal 2027"]}'Get organization
Includes the org's quotes, proposals and invoices.
curl https://billing.kyberapps.com/api/v1/orgs/1 -H "Authorization: Bearer $KB_TOKEN"
Update organization
Send only the fields you want to change. tags replaces the customer's tags with exactly this list (max 20, 32 characters each).
curl -X PATCH https://billing.kyberapps.com/api/v1/orgs/1 \
-H "Authorization: Bearer $KB_TOKEN" -H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{"enrollment": 1200, "tags": ["Renewal 2027", "Board approval"]}'List quotes
status: draft, sent, accepted, expired, declined, converted.
curl https://billing.kyberapps.com/api/v1/quotes?org_id=&status= -H "Authorization: Bearer $KB_TOKEN"
Create quote
Lines: product (KyberGate, KyberAccess, KyberWatch, KyberCopy), description (optional, defaulted), qty, unit, unit_cents or unit_price (dollars), years, term_start, term_end, is_pilot. KyberCopy price is defaulted from the org's enrollment band when unit_cents is omitted. KyberGate never below 500 cents. KyberAccess and KyberWatch need a manual price. discount_type: none, percent (discount_percent, e.g. 10) or fixed (discount_amount in dollars). multi_year_percent: 0, 10 or 15. valid_until defaults to 30 days.
curl -X POST https://billing.kyberapps.com/api/v1/quotes \
-H "Authorization: Bearer $KB_TOKEN" -H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{"org_id": 1, "lines": [{"product": "KyberCopy", "qty": 1, "term_start": "2026-11-01", "term_end": "2027-10-31"}, {"product": "KyberGate", "qty": 800, "unit_price": "5.50", "description": "KyberGate Basic, per device, annual"}], "discount_type": "percent", "discount_percent": 10, "notes": "Pricing held through the validity date."}'Get quote
Includes share_path (/q/<token>) for the customer-facing page.
curl https://billing.kyberapps.com/api/v1/quotes/1 -H "Authorization: Bearer $KB_TOKEN"
Update quote
Same fields as create. Pass status: declined to decline. Accepted or converted quotes are locked.
curl -X PATCH https://billing.kyberapps.com/api/v1/quotes/1 \
-H "Authorization: Bearer $KB_TOKEN" -H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{"lines": [{"product": "KyberCopy", "qty": 2, "unit_price": "3600"}]}'Mark quote sent
Sets status=sent and returns share_url. Nothing is emailed; deliver the link yourself.
curl -X POST https://billing.kyberapps.com/api/v1/quotes/1/send \
-H "Authorization: Bearer $KB_TOKEN" -H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{}'Duplicate quote
New draft with a new number.
curl -X POST https://billing.kyberapps.com/api/v1/quotes/1/duplicate \
-H "Authorization: Bearer $KB_TOKEN" -H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{}'Quote versions
Every saved revision (v1, v2, ...) newest first, each with its lines, total and the changes from the one before.
curl https://billing.kyberapps.com/api/v1/quotes/1/versions -H "Authorization: Bearer $KB_TOKEN"
Invoice a quote
Creates a draft native invoice from the quote's chosen lines (multi-year lines for all years, same discount as a fixed amount) and marks the quote converted. Nothing is emailed.
curl -X POST https://billing.kyberapps.com/api/v1/quotes/1/invoice \
-H "Authorization: Bearer $KB_TOKEN" -H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{}'List proposals
curl https://billing.kyberapps.com/api/v1/proposals?org_id=&status= -H "Authorization: Bearer $KB_TOKEN"
Create proposal from quote
Snapshots the quote and org, drafts the cover letter, attaches the current agreement text. payment_terms: net30 (PO, Stripe send_invoice) or card (hosted invoice, charge automatically). send: true also marks it sent.
curl -X POST https://billing.kyberapps.com/api/v1/proposals \
-H "Authorization: Bearer $KB_TOKEN" -H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{"quote_id": 1, "payment_terms": "net30", "po_number": "", "send": true}'Get proposal
Includes share_url and the quote snapshot.
curl https://billing.kyberapps.com/api/v1/proposals/1 -H "Authorization: Bearer $KB_TOKEN"
Proposal status
Acceptance details: accepted_name, accepted_title, accepted_email, accepted_at (UTC), accepted_ip.
curl https://billing.kyberapps.com/api/v1/proposals/1/status -H "Authorization: Bearer $KB_TOKEN"
Update proposal
cover_letter, payment_terms, po_number, term_start, term_end, status (sent/declined). Locked after acceptance.
curl -X PATCH https://billing.kyberapps.com/api/v1/proposals/1 \
-H "Authorization: Bearer $KB_TOKEN" -H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{"po_number": "PO-2026-118"}'Mark proposal sent
Returns share_url. Nothing is emailed.
curl -X POST https://billing.kyberapps.com/api/v1/proposals/1/send \
-H "Authorization: Bearer $KB_TOKEN" -H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{}'List invoices
Also returns stripe_connected and stripe_test_mode.
curl https://billing.kyberapps.com/api/v1/invoices?org_id=&status= -H "Authorization: Bearer $KB_TOKEN"
Create invoice from accepted proposal
With Stripe connected: creates a draft Stripe invoice from the proposal snapshot (send_invoice net-30 for PO, charge_automatically for card). send: true finalizes and sends it. Without Stripe, or for check/PO tracking, pass manual: true to create a local invoice record (amount defaults to the proposal total).
curl -X POST https://billing.kyberapps.com/api/v1/invoices \
-H "Authorization: Bearer $KB_TOKEN" -H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{"proposal_id": 1, "send": false}'Get invoice
curl https://billing.kyberapps.com/api/v1/invoices/1 -H "Authorization: Bearer $KB_TOKEN"
Finalize and send Stripe invoice
curl -X POST https://billing.kyberapps.com/api/v1/invoices/1/send \
-H "Authorization: Bearer $KB_TOKEN" -H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{}'Mark paid (check or PO)
method: check, ach, po, other. reference: check number or remittance id.
curl -X POST https://billing.kyberapps.com/api/v1/invoices/1/mark-paid \
-H "Authorization: Bearer $KB_TOKEN" -H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{"method": "check", "reference": "chk 10422"}'List received payments
Checks, wires and other payments received by hand. applied_cents, refunded_cents and unapplied_cents (customer credit) per receipt.
curl https://billing.kyberapps.com/api/v1/receipts?org_id=&status= -H "Authorization: Bearer $KB_TOKEN"
Record a received payment
One payment applied across the customer's invoices. method: check, wire, ach, card, other. applications: [{invoice_id, amount_cents}], or apply_oldest_first: true. What is not applied is kept as customer credit. received_on defaults to today.
curl -X POST https://billing.kyberapps.com/api/v1/receipts \
-H "Authorization: Bearer $KB_TOKEN" -H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{"org_id": 1, "amount_cents": 170000, "method": "check", "reference": "CHK 1042", "applications": [{"invoice_id": 7, "amount_cents": 150000}]}'Get received payment
With applications, refunds that drew on it, and receipt_url (the customer's receipt page).
curl https://billing.kyberapps.com/api/v1/receipts/1 -H "Authorization: Bearer $KB_TOKEN"
Void received payment
Bounced check or entered twice: every application is cancelled and the invoices reopen. Refused while a credit refund draws on it.
curl -X POST https://billing.kyberapps.com/api/v1/receipts/1/void \
-H "Authorization: Bearer $KB_TOKEN" -H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{"reason": "check bounced"}'Customer credit
credit_cents and the received payments it sits on, oldest first.
curl https://billing.kyberapps.com/api/v1/orgs/1/credit -H "Authorization: Bearer $KB_TOKEN"
Apply customer credit
applications: [{invoice_id, amount_cents}]. Oldest credit is used first.
curl -X POST https://billing.kyberapps.com/api/v1/orgs/1/credit/apply \
-H "Authorization: Bearer $KB_TOKEN" -H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{"applications": [{"invoice_id": 9, "amount_cents": 20000}]}'List credit refunds
Customer credit paid back out.
curl https://billing.kyberapps.com/api/v1/credit-refunds?org_id= -H "Authorization: Bearer $KB_TOKEN"
Refund customer credit
Record credit paid back to the customer. method: check, ach, wire, card, other. Nothing moves money; it records what you sent. Cannot exceed the customer's credit.
curl -X POST https://billing.kyberapps.com/api/v1/credit-refunds \
-H "Authorization: Bearer $KB_TOKEN" -H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{"org_id": 1, "amount_cents": 20000, "method": "check", "reference": "CHK 5511"}'Get credit refund
With the received payments it drew on and refund_url (the customer's refund advice page; add /pdf for the PDF).
curl https://billing.kyberapps.com/api/v1/credit-refunds/1 -H "Authorization: Bearer $KB_TOKEN"
Email refund advice
Emails the customer's billing contact a link to the refund advice with the PDF attached (held on the server while MAIL_MODE=log).
curl -X POST https://billing.kyberapps.com/api/v1/credit-refunds/1/email \
-H "Authorization: Bearer $KB_TOKEN" -H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{}'List payments
The payments ledger: card, ACH and bank payments through Stripe, checks and wires recorded by hand, credit applied. Each has receipt_url (the customer's receipt page).
curl https://billing.kyberapps.com/api/v1/payments?org_id=&invoice_id=&status= -H "Authorization: Bearer $KB_TOKEN"
Get payment
One ledger row with receipt_url.
curl https://billing.kyberapps.com/api/v1/payments/1 -H "Authorization: Bearer $KB_TOKEN"
Void credit refund
The check was never mailed: the amount is customer credit again.
curl -X POST https://billing.kyberapps.com/api/v1/credit-refunds/1/void \
-H "Authorization: Bearer $KB_TOKEN" -H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{"reason": "never mailed"}'List subscriptions
Annual plans mirrored from Stripe, per brand and per Stripe account. amount_cents is the annualised value; next_invoice_at is the renewal date.
curl https://billing.kyberapps.com/api/v1/subscriptions?org_id=&status=&brand=&account= -H "Authorization: Bearer $KB_TOKEN"
Create subscription from accepted proposal
The proposal's quote must have billing_mode=subscription (or pass it anyway to bill an accepted quote annually). Creates the Stripe subscription on the proposal's account (annual, N-year interval for multi-year lines), the first invoice follows Stripe's collection method. Nothing is emailed.
curl -X POST https://billing.kyberapps.com/api/v1/subscriptions \
-H "Authorization: Bearer $KB_TOKEN" -H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{"proposal_id": 1}'Get subscription
curl https://billing.kyberapps.com/api/v1/subscriptions/1 -H "Authorization: Bearer $KB_TOKEN"
Set subscription brand
brand: kyberapps, kybergate, kyberaccess, kyberwatch, kybercopy or unassigned.
curl -X PATCH https://billing.kyberapps.com/api/v1/subscriptions/1 \
-H "Authorization: Bearer $KB_TOKEN" -H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{"brand": "kybergate"}'Sync subscription from Stripe
curl -X POST https://billing.kyberapps.com/api/v1/subscriptions/1/sync \
-H "Authorization: Bearer $KB_TOKEN" -H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{}'List payment links
curl https://billing.kyberapps.com/api/v1/payment-links?brand=&account=&org_id= -H "Authorization: Bearer $KB_TOKEN"
Create payment link
Stripe-hosted pay page. account (label) defaults to the brand's account. unit_cents or unit_price; qty; recurring: empty (one-off), month or year; product optional (KyberGate, KyberCopy, ...).
curl -X POST https://billing.kyberapps.com/api/v1/payment-links \
-H "Authorization: Bearer $KB_TOKEN" -H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{"brand": "kybergate", "description": "KyberGate \u00b7 1,200 devices \u00b7 2026-27", "unit_price": "6000", "qty": 1, "recurring": "", "org_id": 1}'Get payment link
curl https://billing.kyberapps.com/api/v1/payment-links/1 -H "Authorization: Bearer $KB_TOKEN"
Deactivate payment link
curl -X POST https://billing.kyberapps.com/api/v1/payment-links/1/deactivate \
-H "Authorization: Bearer $KB_TOKEN" -H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{}'Customer portal session
Short-lived Stripe customer-portal URL for the org (invoice history, payment methods, billing details; cancel is off). account optional.
curl -X POST https://billing.kyberapps.com/api/v1/orgs/1/portal \
-H "Authorization: Bearer $KB_TOKEN" -H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{"account": "kyber-systems"}'List Stripe accounts
Label, Stripe account id, display name, default brand, mode, connected, webhook secret set, last sync. Never returns keys.
curl https://billing.kyberapps.com/api/v1/stripe-accounts -H "Authorization: Bearer $KB_TOKEN"
Sync one Stripe account
id is the label or numeric id. full: true also walks products and quotes (the Import existing action). Read-only against Stripe.
curl -X POST https://billing.kyberapps.com/api/v1/stripe-accounts/1/sync \
-H "Authorization: Bearer $KB_TOKEN" -H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{"full": false}'List brands
Every brand with legal name, address, support email, website, tax id, accent, logo URL, price family, invoice prefix, its own Stripe account (or null) and bills_from (the account its money goes to: its own, else the umbrella's; null when its own account is disconnected).
curl https://billing.kyberapps.com/api/v1/brands?archived=1 -H "Authorization: Bearer $KB_TOKEN"
Get brand
One brand plus usage counts (customers, quotes, proposals, invoices, subscriptions, payment links, products).
curl https://billing.kyberapps.com/api/v1/brands/{key} -H "Authorization: Bearer $KB_TOKEN"Create brand
key (optional, from name), name, tagline, legal_name, accent (hex, 3:1 on white), family, support_email, website, address, tax_id, default_terms, payment_text. Connect its Stripe account in Settings, Brands.
curl -X POST https://billing.kyberapps.com/api/v1/brands \
-H "Authorization: Bearer $KB_TOKEN" -H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{"name": "KyberLearn", "accent": "#5B3FD6", "support_email": "hello@kyberapps.com"}'Update or archive brand
Any brand field; archived: true hides it from pickers and keeps history (the umbrella cannot be archived).
curl -X PATCH https://billing.kyberapps.com/api/v1/brands/{key} \
-H "Authorization: Bearer $KB_TOKEN" -H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{"tagline": "Learning platform", "archived": false}'Import researched prospects
Fleet research import. accounts: up to 200 schools or districts, each with up to 50 people. Any field may be a plain value or {value, source_url, confidence (0 to 1), found_at (YYYY-MM-DD), notes}; account-level source_url, confidence, found_at and research_notes are the default for its fields and people. Everything lands in the Review queue (/prospects/review); nothing is created or emailed until a person accepts it. Student-pattern and personal mailbox addresses are dropped and counted in blocked_people. Bad accounts come back per index with status invalid and do not stop the rest. Send an Idempotency-Key to retry safely. Schema: GET /api/v1/prospects/import/schema.
curl -X POST https://billing.kyberapps.com/api/v1/prospects/import \
-H "Authorization: Bearer $KB_TOKEN" -H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{"batch": {"ref": "ny-westchester-2026-11", "brand": "kybergate", "brief": "Westchester public districts, tech directors"}, "accounts": [{"name": "Sample Union Free School District", "type": "district", "nces_id": "3600001", "state": "NY", "county": "Westchester", "website": "sampleufsd.org", "enrollment": 4200, "locale": "suburb", "source_url": "https://nces.ed.gov/ccd/districtsearch/", "confidence": 0.9, "found_at": "2026-11-25", "people": [{"name": "Dana Lee", "title": "Director of Technology", "email": {"value": "dlee@sampleufsd.org", "source_url": "https://sampleufsd.org/staff", "confidence": 0.8}}]}]}'Prospect import JSON schema
The JSON schema for the import body, with the sourcing rules.
curl https://billing.kyberapps.com/api/v1/prospects/import/schema -H "Authorization: Bearer $KB_TOKEN"
Does this prospect exist?
Check before researching or importing: companies that look like this school or district (same NCES ID or website, staff email domain, same or similar name in the state), strongest first, each with why and a level (exact, likely, possible). Different NCES IDs, states, counties, school levels or a school versus a district never match.
curl https://billing.kyberapps.com/api/v1/prospects/match?name=&state=&website=&nces_id=&type= -H "Authorization: Bearer $KB_TOKEN"
Import batch status
Counts for one import batch: accounts, people, blocked, invalid, and how many are pending, accepted and rejected.
curl https://billing.kyberapps.com/api/v1/prospects/batches/1 -H "Authorization: Bearer $KB_TOKEN"
List credit notes
Issued and void credit notes with lines, amounts applied, refunded and kept as credit, and credit_note_url (the customer's copy).
curl https://billing.kyberapps.com/api/v1/credit-notes?org_id=&invoice_id= -H "Authorization: Bearer $KB_TOKEN"
Get credit note
One credit note with its lines and where the money went.
curl https://billing.kyberapps.com/api/v1/credit-notes/1 -H "Authorization: Bearer $KB_TOKEN"
Issue credit note
On an issued invoice. Either lines: [{line (index on the invoice), qty}], amount_cents with description, or full: true for everything left. apply_cents (default: as much as is due) goes on the invoice; refund_cents with refund_method (check, ach, wire, other) records money sent back; the rest is customer credit. reason: returned, billing_error, discount, duplicate, other. Card refunds through Stripe are made on the invoice page.
curl -X POST https://billing.kyberapps.com/api/v1/credit-notes \
-H "Authorization: Bearer $KB_TOKEN" -H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{"invoice_id": 7, "amount_cents": 25000, "description": "Goodwill credit, outage in October", "reason": "discount"}'List deals
Pipeline deals with stage, value, weighted value, probability, owner, expected close and idle days. status: open, won, lost. Also returns the stages.
curl https://billing.kyberapps.com/api/v1/deals?status=&org_id=&owner_id=&brand= -H "Authorization: Bearer $KB_TOKEN"
Deal stages
Pipeline stages in board order with kind (open, won, lost) and probability.
curl https://billing.kyberapps.com/api/v1/deal-stages -H "Authorization: Bearer $KB_TOKEN"
Get deal
One deal with its last 100 events (stage moves, edits, quotes, tasks).
curl https://billing.kyberapps.com/api/v1/deals/1 -H "Authorization: Bearer $KB_TOKEN"
Create deal
title and org_id are required. value in dollars (or omitted to estimate from products), stage_id (default the first stage), owner_id, expected_close (YYYY-MM-DD), probability, source, notes, contact_ids.
curl -X POST https://billing.kyberapps.com/api/v1/deals \
-H "Authorization: Bearer $KB_TOKEN" -H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{"title": "District renewal 2027", "org_id": 1, "value": "18000", "expected_close": "2027-03-31", "source": "Existing customer"}'Update or move deal
Any deal field; stage_id or stage (key or name) moves it. Moving to a Lost stage needs lost_reason. Fires deal.stage_changed, deal.won or deal.lost.
curl -X PATCH https://billing.kyberapps.com/api/v1/deals/1 \
-H "Authorization: Bearer $KB_TOKEN" -H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{"stage": "won"}'List tasks
Tasks with due date, owner, priority, the record they belong to and bucket (overdue, today, upcoming, nodate, done).
curl https://billing.kyberapps.com/api/v1/tasks?status=&owner_id=&record_type=&record_id= -H "Authorization: Bearer $KB_TOKEN"
Get task
curl https://billing.kyberapps.com/api/v1/tasks/1 -H "Authorization: Bearer $KB_TOKEN"
Create task
title is required. due_date, due_time (HH:MM), owner_id, priority (low, normal, high), record_type (deal, customer, contact, quote, invoice, proposal) with record_id.
curl -X POST https://billing.kyberapps.com/api/v1/tasks \
-H "Authorization: Bearer $KB_TOKEN" -H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{"title": "Call about the renewal", "due_date": "2026-12-01", "priority": "high", "record_type": "customer", "record_id": 1}'Update or complete task
Any task field; done: true ticks it (fires task.completed), done: false reopens it.
curl -X PATCH https://billing.kyberapps.com/api/v1/tasks/1 \
-H "Authorization: Bearer $KB_TOKEN" -H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{"done": true}'List events
Everything that fired a webhook, newest first, kept even when no endpoint listens. type filters (invoice.paid, or invoice.* for a group). Page with before=<next_before>.
curl https://billing.kyberapps.com/api/v1/events?type=&limit=&before= -H "Authorization: Bearer $KB_TOKEN"
Get event
One event by evt_ id, with the object as it was when it happened.
curl https://billing.kyberapps.com/api/v1/events/1 -H "Authorization: Bearer $KB_TOKEN"
List webhook endpoints
Each endpoint with its events, status and the last 24 hours of deliveries. Also returns every event type.
curl https://billing.kyberapps.com/api/v1/webhook-endpoints -H "Authorization: Bearer $KB_TOKEN"
Create webhook endpoint
url must be public https on port 443. events: list of event types or ["*"] for all. The response carries secret once; verify each delivery with it (see Webhooks below).
curl -X POST https://billing.kyberapps.com/api/v1/webhook-endpoints \
-H "Authorization: Bearer $KB_TOKEN" -H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{"url": "https://hooks.example.com/kyber", "events": ["invoice.paid", "proposal.signed"], "description": "Accounting sync"}'Get webhook endpoint
With its last 50 deliveries.
curl https://billing.kyberapps.com/api/v1/webhook-endpoints/1 -H "Authorization: Bearer $KB_TOKEN"
Update webhook endpoint
url, events, description, status (active or disabled). Turning it back on resets the failure count.
curl -X PATCH https://billing.kyberapps.com/api/v1/webhook-endpoints/1 \
-H "Authorization: Bearer $KB_TOKEN" -H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{"status": "active"}'Send test event
Sends a webhook.test event now and returns the result.
curl -X POST https://billing.kyberapps.com/api/v1/webhook-endpoints/1/test \
-H "Authorization: Bearer $KB_TOKEN" -H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{}'Delete webhook endpoint
Deletes the endpoint and its delivery log. Events stay.
curl -X POST https://billing.kyberapps.com/api/v1/webhook-endpoints/1/delete \
-H "Authorization: Bearer $KB_TOKEN" -H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{}'Dashboard numbers
MRR, ARR, open, overdue, paid YTD, active subscriptions, pilots: total, per brand and per Stripe account.
curl https://billing.kyberapps.com/api/v1/dashboard?brand=&account= -H "Authorization: Bearer $KB_TOKEN"