RelaySync REST API · v1

A fully versioned, idempotent REST API plus a streaming webhook channel. All endpoints accept JSON, return JSON and enforce per-org rate limits.

99.98%
Uptime SLO
120 RPS
Default rate limit
3 regions
Edge points of presence

Authentication

POST/v1/auth/token

Exchange API key for a short-lived bearer token.

curl -X POST https://api.relaysync.io/v1/auth/token \
  -d '{"api_key":"rs_live_…"}'

Records

GET/v1/records

List field records with filters and cursor pagination.

curl https://api.relaysync.io/v1/records?status=queued&limit=50 \
  -H "Authorization: Bearer …"
POST/v1/records

Create a record (offline-safe via Idempotency-Key).

curl -X POST https://api.relaysync.io/v1/records \
  -H "Idempotency-Key: 2f3a…" \
  -d '{"title":"Pressure check","type":"inspection","site":"alpha"}'
PATCH/v1/records/:id

Partially update a record. Causal token enforced.

curl -X PATCH https://api.relaysync.io/v1/records/rec_1011 \
  -d '{"status":"synced","causal":"01HJ…"}'
DELETE/v1/records/:id

Soft-delete a record (tombstone replicated to clients).

curl -X DELETE https://api.relaysync.io/v1/records/rec_1011

Sync queue

GET/v1/sync/queue

Inspect the org-wide outbound queue.

curl https://api.relaysync.io/v1/sync/queue
POST/v1/sync/retry/:job

Force retry of a queued job.

curl -X POST https://api.relaysync.io/v1/sync/retry/job_2003

Policies

GET/v1/policies

List sync policies for the org.

curl https://api.relaysync.io/v1/policies
POST/v1/policies

Create or update a sync policy.

curl -X POST https://api.relaysync.io/v1/policies \
  -d '{"name":"defer_media","when":"size>5120","then":"queue=wifi"}'

Users

GET/v1/users

List users with role and last sync.

curl https://api.relaysync.io/v1/users?role=operator
POST/v1/users/invite

Invite a new user.

curl -X POST https://api.relaysync.io/v1/users/invite \
  -d '{"email":"new@org.io","role":"operator"}'

Audit

GET/v1/audit

Stream the immutable audit log.

curl -N https://api.relaysync.io/v1/audit/stream

Webhooks

POST/v1/webhooks

Register a webhook endpoint for sync events.

curl -X POST https://api.relaysync.io/v1/webhooks \
  -d '{"url":"https://hooks.org.io/relaysync","events":["record.synced","record.conflict"]}'