Psparsh

Psparsh API

Read a business’s bookings and customers, make changes, and hear about new bookings, leads and payments. For businesses on the Pro plan and the developers they work with. Using an AI app instead? See Psparsh for AI apps.

Keys and limits

The business owner makes a key in API and webhooks in their dashboard, as read-only or read-and-change. Send it with every call. Each key allows 600 calls an hour. Money is in cents of the business’s currency; dates are YYYY-MM-DD and times HH:MM in the business’s time zone; phone numbers are in international form (+14155550123).

curl https://www.psparsh.com/api/v1/bookings \
  -H "Authorization: Bearer psk_…"

Read

GET /v1/businessName, booking page, currency, time zone, hours, closed dates, services with prices
GET /v1/bookings?from=&to=Bookings between two dates (default: today and the next 7 days)
GET /v1/customers?query=&stage=Customers and leads, newest activity first (up to 200)
GET /v1/customers/{phone}One customer with notes, bookings and quotes

Change

Every change is one call to POST /v1/actions with a JSON body, using a key that can make changes. Each change is checked the same way as in the dashboard and noted on the customer with the key’s name. The answer says ok, what changed, or why not.

reschedule: Move a booking

{"a":"reschedule","booking":2041,"date":"2026-12-02","time":"17:00"}

status: Booking status: CONFIRMED, DONE, CANCELLED or NO_SHOW

{"a":"status","booking":2041,"status":"DONE"}

note: Add a note to a customer

{"a":"note","phone":"+14155550123","text":"Asked about Saturday"}

followup: Set a follow-up date

{"a":"followup","phone":"+14155550123","date":"2026-12-05"}

stage: Lead stage: NEW, CONTACTED, MEETING, QUOTED, WON or LOST

{"a":"stage","phone":"+14155550123","stage":"MEETING"}

lead: Add a lead (not added twice)

{"a":"lead","name":"Tom Lee","phone":"+14155550123","interest":"Website"}

payment: Record a payment on a quote (amount in units, e.g. 49.50)

{"a":"payment","quote":12,"amount":"120","method":"CARD"}

close / open: Close a day for new bookings, or open it again

{"a":"close","date":"2026-12-25"}

Webhooks

Add an https address in the dashboard and pick events. Psparsh sends a POST with JSON within about a minute, and retries for up to a day (after 1, 5 and 30 minutes, then 2 and 6 hours) until your server answers 2xx.

  • booking.created: A customer booked online, or the owner added a booking
  • booking.updated: A booking was moved or its status changed
  • lead.created: A new lead came in from a booking, an enquiry or by hand
  • payment.recorded: A payment was recorded on a quote
{
  "id": "cmx…",
  "event": "booking.created",
  "created_at": "2026-12-01T10:15:00.000Z",
  "data": {
    "number": 2041, "date": "2026-12-02", "time": "17:00", "time_zone": "Europe/London",
    "service": "First assessment", "price": 6000, "currency": "GBP", "status": "PENDING",
    "customer": { "name": "Amy Lee", "phone": "+447700900123" }
  }
}

Check the Psparsh-Signature header with the webhook’s signing secret before trusting a call. Use the id to ignore a repeat.

import crypto from 'node:crypto';

// header: Psparsh-Signature: t=1764590000,v1=5d2c…
export function fromPsparsh(rawBody, header, secret) {
  const parts = Object.fromEntries(header.split(',').map((p) => p.split('=')));
  const expected = crypto.createHmac('sha256', secret).update(`${parts.t}.${rawBody}`).digest('hex');
  const fresh = Math.abs(Date.now() / 1000 - Number(parts.t)) < 300;
  return fresh && crypto.timingSafeEqual(Buffer.from(expected), Buffer.from(parts.v1));
}

Errors

401 missing or revoked key · 403 read-only key, or the plan has ended · 404 not found · 429 too many calls. Questions? Contact us.

Psparsh API for developers