Getting Started

Quickstart

Make your first API call to Corebill in under 2 minutes.

Prerequisites

  1. A Corebill account at app.corebill.io
  2. At least one company created in your organization
  3. An API key (generate one in Settings > Developers)

Step 1: Install the SDK (optional)

If you're using Node.js, install the official SDK:

Bash
1npm install @corebill/sdk

Step 2: Check your company

Each API key is created inside one company, so every request is scoped to it automatically. Optionally, list the companies of your organization to confirm which one the key belongs to.

1curl "https://api.corebill.io/v1/companies" \
2 -H "Authorization: Bearer sk_live_your_api_key"

You never pass a company ID: the key already knows its company. To work with another company, create an API key inside that company from Developers > API Keys.

Keys created before company-scoped keys existed return api_key_company_missing. Re-issue them from the dashboard.

Step 3: Create a customer

1curl -X POST "https://api.corebill.io/v1/customers" \
2 -H "Authorization: Bearer sk_live_your_api_key" \
3 -H "Content-Type: application/json" \
4 -d '{
5 "name": "Acme Corp",
6 "country": "US",
7 "email": "billing@acme.com",
8 "currency": "USD"
9 }'

Step 4: Create an invoice

1curl -X POST "https://api.corebill.io/v1/invoices" \
2 -H "Authorization: Bearer sk_live_your_api_key" \
3 -H "Content-Type: application/json" \
4 -d '{
5 "customer_id": "cus_a1b2c3d4e5f6",
6 "due_date": "2026-07-15",
7 "tax_rate": 16,
8 "line_items": [
9 {
10 "item_name": "Web Development",
11 "description": "Frontend implementation",
12 "quantity": 40,
13 "unit": "hour",
14 "unit_price": 75
15 },
16 {
17 "item_name": "UI Design",
18 "quantity": 1,
19 "unit": "project",
20 "unit_price": 2000
21 }
22 ]
23 }'

Response:

JSON
1{
2 "id": "inv_x1y2z3a4b5c6",
3 "invoice_number": "INV-2026-000001",
4 "status": "draft",
5 "subtotal": 5000,
6 "tax_rate": 16,
7 "tax_amount": 800,
8 "total": 5800,
9 "amount_due": 5800,
10 "line_items": [...]
11}

Next steps