← CalendarCalendar API access
Download guideCreate access
Sign in as a workspace owner or administrator. Open Menu → API access (or the desktop sidebar).
Create a separate key for each integration, select only the permissions it needs, and choose an expiry from 1–365 days (default 90).
Copy the key immediately. It is shown once and stored on the server only as a SHA-256 hash.
Store it in private server settings, never in a public website or mobile app source. Do not send it to logs.
API access belongs to the workspace and the administrator who created it. Removing that membership, disabling the user or changing their role to employee disables the key.
Use Revoke key to stop access immediately. To rotate, create a replacement, update the integration, test it, then revoke the old key.
Authenticate
Use HTTPS and an Authorization header on every request:
```http
Authorization: Bearer YOUR_API_KEY
Content-Type: application/json
```
Bearer requests do not need a browser Origin or session cookie. Cookie-based writes still require the calendar's exact Origin.
Cross-origin browser integrations are not enabled; call from your integration server.
Never supply a tenant ID: the key determines the workspace.
The API permits 120 requests per minute per key; retry a 429 after the Retry-After delay.
Permissions and endpoints
| Method | Path | Permission | Result |
|---|---|---|---|
| POST | /reminder-events/{id}/claim | reminders:claim | Validate appointment and atomically claim one reminder; JSON {} |
| GET | /me | Any valid key | Workspace, associated user and role |
| GET | /users | team:read | Array of active team members with id, name, role |
| GET | /jobs?from=...&to=... | jobs:read | Array of overlapping jobs |
| GET | /jobs/{id} | jobs:read | One job |
| GET | /jobs/{id}/history?before=VERSION | jobs:read | Version-ordered history, 50 entries per page |
| POST | /jobs | jobs:write | Created job; HTTP 201 |
| PUT | /jobs/{id} | jobs:write | Full replacement of editable fields plus version |
| GET | /notifications | notifications:read | Latest 50 notifications for the key's associated user |
| GET | /notifications/unread-count | notifications:read | {"count": number} across all unread rows |
| PATCH | /notifications/{id}/read | notifications:write | {"ok": true} |
| POST | /notifications/read-all | notifications:write | {"updated": number}; JSON body {} |
API key management (/api-keys) and logout require an authenticated browser session; integration keys cannot create or revoke keys.
Read the calendar
```sh
# Set CALENDAR_API_KEY privately in your server environment.
curl --fail-with-body --get \
'https://calendar.gerrardselectrical.co.uk/v1/jobs' \
--header "Authorization: Bearer $CALENDAR_API_KEY" \
--data-urlencode 'from=2026-10-05T00:00:00+01:00' \
--data-urlencode 'to=2026-10-12T00:00:00+01:00'
```
Both dates must contain Z or an explicit UTC offset. The range must be positive and at most 93 days.
Jobs overlap the requested range, including jobs that start earlier and continue into it. At most 2,000 jobs can be returned. A larger result returns 422; shorten the range.
There is no pagination parameter in V1. Dates are returned in UTC. Display them in your chosen local timezone and handle British summer time correctly.
Create a job
First GET /users and choose an active member's UUID as assigned_user_id. Save this JSON as a private request file, replacing the example user ID:
```json
{
"customer_name": "Taylor Bennett",
"address": "24 Meadow Lane",
"phone": "07700 900123",
"email": "taylor@example.test",
"description": "Consumer unit inspection",
"agreed_price_pence": 12999,
"starts_at": "2026-10-05T09:00:00+01:00",
"duration_minutes": 60,
"status": "scheduled",
"internal_notes": "Access through side gate",
"assigned_user_id": "11111111-1111-4111-8111-111111111111"
}
```
```sh
curl --fail-with-body \
'https://calendar.gerrardselectrical.co.uk/v1/jobs' \
--header "Authorization: Bearer $CALENDAR_API_KEY" \
--header 'Content-Type: application/json' \
--data-binary @private-job.json
```
POST is not idempotent. After an uncertain timeout, reconcile the existing job before retrying; a blind retry can create duplicates.
### Fields
All editable fields above must be included. Empty strings are allowed for address, phone, email, description and internal_notes.
customer_name is required, trimmed, 1–200 characters. Limits: address 1,000; phone 50; email 254 and valid when nonempty; description 5,000; internal_notes 10,000.
Money is integer pence: £129.99 = 12999. Use decimal-safe conversion; never send a decimal amount in pounds. Accepted range 0–2147483647.
Duration is an integer from 5–44700 minutes. Status is scheduled, in_progress, completed or cancelled.
assigned_user_id must belong to an active employee or administrator in the same workspace.
Optional customer_reminders_opt_in is a boolean, default false. To turn it on, provide an international phone number (+ followed by 8–15 digits) and confirm the customer's permission. Saves record reminder_consent_at and reminder_consent_by on the job; do not supply these server fields. Omitted customer_reminders_opt_in means false, including on PUT, so integrations preserving consent must copy its current boolean.
Optional allow_overlap is a boolean, default false, accepted on POST and PUT. It is a request instruction, not a saved job field. Unknown JSON fields are rejected.
The saved job returns these editable fields plus id (UUID), tenant_id, job_number, version, created_at and updated_at. Treat job_number as a display label; use id for API calls.
Creating or updating a job creates a notification for the assigned user and records an internal event.
Edit, reschedule or complete
GET /jobs/{id}, keep its current version, then PUT /jobs/{id} with all editable fields plus that version.
Change starts_at and/or duration_minutes to reschedule, or status to completed to finish a job.
Do not send server-generated fields such as id, tenant_id, job_number or timestamps in the PUT body.
A successful PUT increments version. HTTP 409 without code booking_conflict means another edit won: fetch the job again and reconcile changes before retrying.
Notifications
Notifications belong to the key's associated administrator, not the entire team. They are durable in-app notifications. Users can also enable phone alerts from Notifications on each supported device. Job creation and updates queue alerts for the assigned employee’s enabled devices; API integration keys cannot manage device subscriptions.
For mark-as-read calls, send {} as the JSON body. Read-all clears all unread rows for that user, including records older than the displayed 50.
Errors
| Status | Meaning / action |
|---|---|
| 400 | Invalid JSON or fields; inspect error and details |
| 401 | Missing, invalid, revoked or expired key |
| 403 | Missing permission or browser-only operation |
| 404 | Endpoint or requested job/notification/key not found in your workspace |
| 409 | Booking overlap (code booking_conflict), or job version conflict; inspect response and reconcile |
| 413 | Body exceeds 32 KB |
| 422 | Inactive/cross-workspace assignee, constraint or calendar result too large |
| 429 | Request limit; wait for Retry-After |
| 503 | Temporarily unavailable; retry reads with backoff |
Errors normally use {"error":"message"}; validation errors also include details with path and message.
Framework body parsing/limit responses may differ. Check HTTP status before decoding a response.
Use bounded retries. Do not automatically retry non-idempotent creation.
Quotation integration guide
1. Create a "Quotation system" key with team:read, jobs:read and jobs:write.
2. Keep the key only in the quotation backend's private configuration.
3. Map an accepted quotation's customer/contact/address, agreed total in pence, description, agreed start time and duration to the job fields.
4. Choose the assigned calendar user from /users.
5. Save the returned job UUID and version alongside the quotation in the integration's own record.
6. Use that UUID and current version for later changes; resolve a 409 rather than overwriting someone else's edit.
7. Use one integration record per quotation to prevent duplicates, and reconcile uncertain creates before retrying.
8. Rotate and revoke keys through API access.
This release provides the calendar side of integration. The existing live quote-api has not been modified; wiring its acceptance workflow requires a separate change to that service.
Zapier outbound booking and customer reminder events are available through browser-managed Catch Hook connections. See /zapier-guide.html for setup, delivery behavior and the required reminder claim step. General-purpose webhook destinations are not supported in this release.
Job history
GET /jobs/{id}/history returns {"entries":[...],"next_before_version":number|null}.
Each entry contains id, job_version, event_type, actor_user_id, actor_name, source (browser or api), source_label, created_at and changes.
Changes is an object keyed by editable field name, with before and after values. Money remains integer pence and times use UTC ISO strings. Assignment changes also include before_label/after_label snapshots where available.
Use next_before_version as the next request's before parameter; stop when it is null. Entries are newest version first. A missing job or a job from another workspace returns 404.
History begins with saves made after this feature was installed; earlier edits are not reconstructed.
Browser and integration changes use the same transaction as the job save. Failed or conflicting saves do not create history entries. A successful save with unchanged fields creates an empty changes object unless it deliberately accepts an overlap. An accepted overlap adds booking_override with before:null and an after message identifying the conflicting job numbers.
The runtime role can append/read history but cannot update/delete it. History snapshots may include internal notes and contact details; they use the same workspace visibility as jobs.
Booking overlap warnings
Creating or editing a scheduled or in_progress job checks other scheduled/in_progress jobs for the same assigned user in the same workspace. The edited job is excluded. Back-to-back appointments do not overlap; jobs extending across midnight are checked normally.
An unaccepted overlap returns HTTP 409 and does not save the job, create history, or send notifications:
```json
{
"error": "This employee already has overlapping appointments",
"code": "booking_conflict",
"conflicts": [{
"id": "22222222-2222-4222-8222-222222222222",
"job_number": 1050,
"customer_name": "Example customer",
"address": "24 Meadow Lane",
"starts_at": "2026-10-06T08:00:00.000Z",
"duration_minutes": 60,
"status": "scheduled"
}],
"more_conflicts": false
}
```
The response lists at most 20 conflicts; more_conflicts indicates additional matches. Show the warning to the person scheduling the job. Change the time, duration or assigned user, or explicitly accept the overlap by repeating the request with allow_overlap:true. Keep the same current version for PUT; version checks still apply.
Do not blindly retry with allow_overlap:true. A deliberate override is recorded in job history, including browser/API source and actor. Simultaneous writes for the same employee are serialized so the second save sees an overlapping first booking.
Customer reminder claim
Use a separate key with reminders:claim. POST /reminder-events/{event_uuid}/claim with {} immediately before a Zapier messaging action. A valid unclaimed reminder returns {"send":true,"job":{...}} with current safe customer/job fields. Subsequent claims or invalidated appointments return {"send":false,"reason":"..."}. Missing or other-workspace reminder events return 404. Filter send=true before messaging and use the returned fields. Claim does not confirm WhatsApp delivery. It cannot be reused after an external messaging failure; review that failure manually. See the Zapier guide for timing and retry limitations.
Zapier connection management endpoints /integrations/zapier, /integrations/zapier/{id}, /integrations/zapier/{id}/test and /integrations/zapier/{id}/deliveries are browser owner/admin only. Lists never return the private Catch Hook URL.
Receive bookings from Zapier (inbound webhooks)
Each business creates its own API key in Calendar → API access. Select jobs:read, jobs:write and team:read for a workflow that looks up employees and creates/updates bookings. Use a different key per integration and store it privately in Zapier.
Both inbound booking operations accept POST:
- Create: POST https://calendar.gerrardselectrical.co.uk/v1/jobs
- Update: POST https://calendar.gerrardselectrical.co.uk/v1/jobs/JOB_UUID
- Read current booking/version: GET https://calendar.gerrardselectrical.co.uk/v1/jobs/JOB_UUID
- List available assigned users: GET https://calendar.gerrardselectrical.co.uk/v1/users
Use Webhooks by Zapier → Custom Request. Set Method to POST, send a JSON object and set these headers:
```http
Authorization: Bearer YOUR_CALENDAR_API_KEY
Content-Type: application/json
```
Keep the key in a header. The key identifies the business workspace; do not send tenant_id, cookies or an Origin header. These URLs receive Zapier requests; the Catch Hook URL configured in the calendar is for events sent in the other direction.
Example create body (replace assigned_user_id with an active member UUID from /users and map your source fields):
```json
{
"customer_name": "Example customer",
"address": "24 Meadow Lane",
"phone": "+447700900123",
"email": "customer@example.test",
"description": "Electrical inspection",
"agreed_price_pence": 12999,
"starts_at": "2026-12-01T09:00:00+00:00",
"duration_minutes": 60,
"status": "scheduled",
"internal_notes": "",
"assigned_user_id": "11111111-1111-4111-8111-111111111111",
"customer_reminders_opt_in": false,
"allow_overlap": false
}
```
All editable job fields are required except the two optional booleans, which default false. Use genuine JSON numbers/booleans, not quoted numeric strings. Convert currency to integer pence (£129.99 → 12999). Include Z or an explicit timezone offset on starts_at. Status is scheduled, in_progress, completed or cancelled.
On a successful create, HTTP 201 returns the saved job, including id and version. Store that UUID alongside the source booking/quotation. Creation is not idempotent: do not blindly repeat POST after an uncertain timeout. Reconcile the saved record before retrying.
To update, first GET the existing job, map its editable fields, apply the changes and add its current version as a JSON integer. POST that full body to /v1/jobs/{id}. Do not send returned server fields such as id, job_number, tenant_id, created_at, updated_at, reminder_consent_at or reminder_consent_by. HTTP 200 returns the updated booking and incremented version. Existing PUT updates continue to work.
The update is a full replacement, so carry forward address/contact details, notes, assigned user and customer_reminders_opt_in if they should be retained. Set reminders true only with customer permission and an international phone number. The calendar records the consent actor/time.
HTTP 409 with code booking_conflict warns about overlapping employee appointments. Change the slot or explicitly approve allow_overlap:true; do not silently override. A 409 without that code means the version changed: reread and reconcile. Updates never create a missing booking and cannot cross workspaces. Revoked/expired keys return 401, read-only keys return 403 and malformed bodies return 400.
Inbound API saves use the same validation, phone alerts, job history and outgoing Zapier events as browser saves. Avoid automation loops: if an outgoing booking event feeds a workflow that posts back to the same calendar, filter out unchanged data and keep source booking IDs to prevent repeated creates.