API documentation

Webhooks

Be told when something happens: events, signatures, retries and subscribing.

A webhook sends a message to your address when something happens in the business. Add an endpoint in ServiceStead under Settings, Integrations, Webhooks, or subscribe through the API (this is how Zapier does it).

Events

EventWhendata is a
request.createdNew requestrequest
customer.createdCustomer addedcustomer
customer.updatedCustomer changedcustomer
quote.sentQuote sentquote
quote.approvedQuote approvedquote
job.createdJob createdjob
job.completedJob completedjob
visit.scheduledVisit scheduledvisit
visit.completedVisit completedvisit
invoice.sentInvoice sentinvoice
invoice.paidInvoice paidinvoice
showcase_item.publishedShowcase item publishedshowcase_item

The message

Each message is a POST with a JSON body. data is the record exactly as the read API returns it.

{
  "id": "evt_00000000000040008000000000000004",
  "type": "visit.scheduled",
  "api_version": "v1",
  "created_at": "2026-11-03T14:20:00Z",
  "data": {
    "id": "00000000-0000-4000-8000-000000000001",
    "object": "visit",
    "...": "the visit, as GET /visits/{id} returns it"
  }
}
  • The same id can arrive twice. Use it to skip a message you already handled.
  • No order is promised. Compare updated_at if order matters.
  • A bulk change sends one message per record.
  • Answer with any 2xx within 10 seconds. Anything else is a failure and is retried.

Checking the signature

Messages are signed with the endpoint's signing secret, which starts with whsec_ and is shown once, when the endpoint is made. The headers are webhook-id, webhook-timestamp and webhook-signature. Sign id.timestamp.body with HMAC SHA-256 and compare. Refuse a timestamp older than five minutes.

import { createHmac, timingSafeEqual } from "node:crypto";

function verify(secret, headers, rawBody) {
  const id = headers["webhook-id"], ts = Number(headers["webhook-timestamp"]);
  if (Math.abs(Date.now() / 1000 - ts) > 300) return false; // older than five minutes
  const key = Buffer.from(secret.slice("whsec_".length), "base64");
  const expected = createHmac("sha256", key).update(`${id}.${ts}.${rawBody}`).digest("base64");
  return headers["webhook-signature"].split(" ").some((s) => {
    const sig = Buffer.from(s.replace(/^v1,/, "")), want = Buffer.from(expected);
    return sig.length === want.length && timingSafeEqual(sig, want);
  });
}

Retries and turning off

A failed message is tried 8 times in all, waiting 5 minutes, 30 minutes, 2 hours, 6 hours, 12 hours, 24 hours, 24 hours between tries: about 3 days.

An endpoint that has failed for 5 days is turned off, and the business is told. An address that answers 410 Gone is removed if it was subscribed through the API, or turned off if it was added in ServiceStead.

Watch for loops. A Zap that creates a customer whenever a customer is added creates customers without end. The request limit stops a runaway, but the records stay.

Subscribing through the API

Endpoints

CallWhat it doesKey
POST /webhooksSubscribe an address to eventsAny key
DELETE /webhooks/{id}Unsubscribe an addressAny key
GET /showcase_itemsList showcase itemsAny key
GET /showcase_items/{id}Get one showcase itemAny key

POST an https address and a list of events. The answer carries the endpoint's id and its signing secret, once. DELETE the id to unsubscribe. Only endpoints made through the API can be deleted this way.

{
  "url": "https://example.com/servicestead-hook",
  "events": [
    "visit.scheduled",
    "visit.completed"
  ],
  "label": "My calendar sync"
}

Showcase items

A showcase item is a before and after pair the business chose to publish on its public gallery. Only published items are returned, and only their public photos.

List parameters for showcase items

ParameterValueWhat it does
limit1 to 100How many showcase items to return. Default 100.
starting_afteridThe id of the last record you received; the next page starts after it.
updated_sinceISO 8601 timeOnly records changed at or after this time.
created_sinceISO 8601 timeOnly records created at or after this time.

The showcase item object

FieldTypeWhat it is
idid (UUID)The showcase item's id.
objectstringAlways "showcase_item".
created_attime (ISO 8601, UTC)When it was created.
updated_attime (ISO 8601, UTC)When it last changed. Use with updated_since to fetch changes.
titlestringThe caption's title.
descriptionstringThe caption, or an empty string.
townstring, or nullThe town only, never the street.
servicestring, or nullThe service shown.
before_photo_urlURL, or nullThe public before photo.
after_photo_urlURL, or nullThe public after photo.
page_urlURL, or nullThe business's public gallery.
published_attime (ISO 8601, UTC), or nullWhen it was published.
{
  "data": [
    {
      "id": "00000000-0000-4000-8000-000000000001",
      "object": "showcase_item",
      "created_at": "2026-11-03T14:20:00.000Z",
      "updated_at": "2026-11-03T14:20:00.000Z",
      "title": "Example",
      "description": "Example text",
      "town": "Example",
      "service": "Example",
      "before_photo_url": "https://servicestead.com/example",
      "after_photo_url": "https://servicestead.com/example",
      "page_url": "https://servicestead.com/example",
      "published_at": "2026-11-03T14:20:00.000Z"
    }
  ],
  "has_more": false
}