Smart Connect REST API

Version 1.0.0 · Base URL https://smartconnects.co/api

Authentication

Every request needs a Bearer token in the Authorization header. Generate and manage keys in Settings → API & Payments. All data is automatically scoped to your organisation. Keep keys secret — never expose them in client-facing code.
curl -H "Authorization: Bearer YOUR_API_KEY" \
     https://smartconnects.co/api/clients

Reading data

MethodPathDescriptionQuery
GET/{resource}List records for a resource (clients, carers, visits, medications, incidents, notes, …)from, to (visits, YYYY-MM-DD)
GET/sync/pullPull your whole organisation dataset in one response

Example — list visits in a date range

curl -H "Authorization: Bearer YOUR_API_KEY" \
     "https://smartconnects.co/api/visits?from=2026-08-01&to=2026-08-31"

Response

[
  {
    "app_id": 5567,
    "client_name": "Jane Smith",
    "carer": "Maria Jones",
    "status": "completed",
    "start_time": "2026-08-01T09:00:00.000Z",
    "end_time": "2026-08-01T09:45:00.000Z",
    "total_miles": 3.7,
    "extra": { "visitRef": "05567" }
  }
]

Writing data

MethodPathDescriptionQuery
POST/{resource}Create or update record(s) — upsert by app_id. Body: one record object or an array of records
POST/sync/recordUpsert a single record — body: { table, record }
DELETE/{resource}/{appId}Delete a record by its app_id
Records are keyed by your own integer app_id. POSTing an app_id that already exists updates that record (upsert); a new one creates it. Any fields that aren't native columns are stored in an extra object and returned back to you.

Example — create / update a client

curl -X POST https://smartconnects.co/api/clients \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"app_id":1024,"name":"Jane Smith","postcode":"HP1 1AA","status":"Active"}'

Response

{ "ok": true, "count": 1, "rows": [ { "id": "b1f2…-uuid", "app_id": 1024 } ] }

Example — upsert a single visit via /sync/record

curl -X POST https://smartconnects.co/api/sync/record \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"table":"visits","record":{"app_id":5567,"status":"completed","start_time":"2026-08-01T09:00:00Z","end_time":"2026-08-01T09:45:00Z"}}'

Example — delete a client

curl -X DELETE https://smartconnects.co/api/clients/1024 \
  -H "Authorization: Bearer YOUR_API_KEY"

Resources

Any of these can be used as {resource} in the read/write endpoints above:
clientscarersvisitsscheduled_visitsrota_shiftsmedicationsincidentscomplaintsnotescare_plansrisk_assessmentsmileage_logsinvoicestraining_recordssupervisions

Responses & errors

Reads return a JSON array of records. Writes return { ok, count, rows: [ { id, app_id } ] }. Partial write failures return ok:false with an errors array (each record is processed independently, so one bad row never blocks the rest).
StatusMeaning
200Success (check ok on writes)
401{ "error": "No token provided" } / invalid or expired key
400{ "error": "Unknown table" } — unrecognised resource
422All records in a write failed validation

Limits & webhooks

Rate limit: 1000 requests/hour per key.
Webhooks: configure in Settings → API & Payments.