Your first calls

Send the token as authorization: Bearer …. Start at /me: it shows who you are and the id of each organization you belong to.

export TOKEN=$(node sparky-login.mjs)

# Who am I, and which organizations do I belong to (copy an id)?
curl -s -H "authorization: Bearer $TOKEN" https://sparkyli.com/api/v1/me

# What does that organization subscribe to? (owners and admins only)
curl -s -H "authorization: Bearer $TOKEN" "https://sparkyli.com/api/v1/subscriptions?org_id=ORG_ID"

# A product's data. x-sparky-org picks the organization when you belong to several.
curl -s -H "authorization: Bearer $TOKEN" -H "x-sparky-org: ORG_ID" https://contacts.sparkyli.com/api/v1/contacts?limit=5
  • If you belong to several organizations, add x-sparky-org: ORG_ID to each call.
  • Lists page with limit (up to 100) and offset; when there is more, the answer has next_offset.
  • Money is in the smallest unit (paise, cents).
  • Everything is read-only for now. See the list of APIs for what each offers.