API Reference

Clients

Create, list, update, and delete clients via the Rebill API. Includes the full client object schema, address structure, and endpoints for fetching client invoices and quotes.

Clients are the businesses or individuals you bill. Every invoice, quote, and recurring invoice must be linked to a client. You can also track credit balances and send statements per client.

List clients

GET /client

Returns all active (non-archived) clients for your account.

curl https://rebill-api-896466068278.africa-south1.run.app/client \
  -H "Authorization: Bearer sk_your_secret_key"

Response:

{
  "clients": [
    {
      "id": "xyz789",
      "name": "Acme Corp",
      "surname": "",
      "email": "accounts@acme.co.za",
      "phone": "+27821234567",
      "credit_amount": 0,
      "billing_address": null,
      "shipping_address": null,
      "custom_fields": {}
    }
  ]
}

Get a client

GET /client/:id

Returns a single client by ID.

Client object

FieldTypeDescription
idstringUnique identifier
public_idstringShort ID used in public-facing statement links
namestringFirst name or company name
surnamestringLast name (if an individual)
emailstringEmail address
phonestringPhone number in E.164 format (+27821234567)
billing_addressobjectBilling address (see Address object)
shipping_addressobjectShipping address (see Address object)
custom_fieldsobjectKey-value pairs of custom fields
credit_amountintegerCurrent credit balance in cents
has_passwordbooleanWhether the client's statement portal is password-protected
invoice_prefixstringCustom prefix for invoice numbers generated for this client
invoice_countintegerTotal number of invoices for this client

Address object

FieldTypeDescription
street_1stringStreet address line 1
street_2stringStreet address line 2
citystringCity
provincestringProvince or state
postal_codestringPostal code
countrystringCountry

Create a client

POST /client
FieldRequiredTypeDescription
nameYesstringFirst name or company name
emailYesstringValid email address
surnameNostringLast name
phoneNostringE.164 format (e.g. +27821234567)
billing_addressNoobjectBilling address
shipping_addressNoobjectShipping address
invoice_prefixNostringCustom prefix for this client's invoice numbers
curl -X POST https://rebill-api-896466068278.africa-south1.run.app/client \
  -H "Authorization: Bearer sk_your_secret_key" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Acme Corp",
    "email": "accounts@acme.co.za",
    "phone": "+27821234567",
    "billing_address": {
      "street_1": "12 Main Road",
      "city": "Cape Town",
      "province": "Western Cape",
      "postal_code": "8001",
      "country": "South Africa"
    }
  }'

Response (201 Created):

{
  "id": "xyz789"
}

Update a client

PUT /client/:id

Updates a client. Accepts the same fields as create. Fields you omit will be cleared; send the full object.

Delete a client

DELETE /client/:id

Permanently deletes a client. Returns 200 OK on success.

List invoices for a client

GET /client/:id/invoice

Returns all invoices for a specific client. Accepts the same include_paid and include_cancelled query parameters as GET /invoice.

List quotes for a client

GET /client/:id/quote

Returns all quotes for a specific client. Accepts the same include_accepted, include_declined, include_expired, and include_converted query parameters as GET /quote.

Was this article helpful?