An app of your own

A website or script that runs on its own, with nobody present to confirm a sign-in, needs its own login, limited to what it needs. We set these up with you, one product at a time.

  1. Make sure your plan includes API access and an owner or admin has switched it on.
  2. An owner or admin opens SparkyLi, Settings → API and agents → A program of your own.
  3. Say what the program does, which products it needs and whether it only reads.
  4. We reply from your account's email. Your app gets its own client id and secret, shown to you once, and you can stop it at any time by switching API access off.

An app can read and write what the role we give it may read and write. A person signing in as themselves has the same rule: they can create what their own role can create. Today that means contacts (Contacts), and clients and draft invoices (Invoices). Sending, paying, approving and deleting always stay with a person in the app.

Example: a monthly invoice run

An invoice is always made for a client that already exists in Invoices, named by its client_id. Invoices never guesses who a customer is, and an unknown id answers 404. There are two ways to get the client in first.

Way A: clients live in Invoices

  1. GET /clients once, and keep a table from your own customer ids to the id it returns (it also returns each client's email).
  2. For a customer that is not there yet, POST /clients and keep the new id.
  3. Each month, POST /invoices for each client_id with a new Idempotency-Key such as 2026-12-CUST-0042. Run the job twice and nobody is invoiced twice.

Way B: people live in Contacts

  1. POST /contacts on the Contacts API for a new person (or find them with GET /contacts?q=).
  2. POST /clients/sync on the Invoices API with that contact_id. The answer says which client the contact became.
  3. POST /invoices with that client_id, as above.

The invoice arrives as a draft. A person in the organization reviews and sends it in the app. Every field, answer and error is on the Invoices page and the Contacts page.