Circles (v1 user API)
Circles share current asset positions across organizations. These endpoints use the authenticated v1 user session or supported Sanctum user token. A v2 organization API key does not grant Circle membership.
Authorization and state
List results include the current user’s active and pending memberships. Pending membership does not authorize detail, assets, activity, live snapshots or subscriptions. Current active membership and recorded disclosure acceptance are required for member access.
Creation and join require consent.accepted=true and consent.disclosure_version="1". The PIN is a 4–12 digit string; join_code is 24 uppercase letters/digits. Join is rate limited. An unapproved request expires after 14 days. Do not log codes, PINs or consent-link tokens.
Contribution admission rechecks publication permission, original organization, current two-sided device assignment and accepted current consent for Person assets. Optional asset_ids on join are revalidated at approval; check the approval result for skipped assets.
Member and owner operations are authorized separately. Active members can approve or reject pending requests. Owners control member removal, details, PIN/code, transfer and deletion. A member manages their own contributions. Staff REST access does not create a member’s live subscription.
Endpoints
| Method | Path relative to /api/v1 | Purpose |
|---|---|---|
| GET | /circles | List memberships (page/per_page). |
| POST | /circles | Create a Circle with name, PIN and consent. |
| POST | /circles/join | Request membership with join_code, PIN, consent and optional asset_ids. |
| GET | /circles/selectable-assets | List selectable assets and eligibility reasons. |
| GET | /circles/{circle} | Read Circle details and members. |
| PATCH | /circles/{circle} | Owner: update name/description. |
| DELETE | /circles/{circle} | Owner: delete the Circle. |
| PATCH | /circles/{circle}/pin | Owner: set a 4–12 digit PIN. |
| POST | /circles/{circle}/rotate-code | Owner: rotate join code. |
| POST | /circles/{circle}/transfer | Owner: transfer to active member_id. |
| POST | /circles/{circle}/members/{member}/approve | Active member: approve a pending member. |
| POST | /circles/{circle}/members/{member}/reject | Active member: reject a pending member. |
| DELETE | /circles/{circle}/members/{member} | Owner: remove a member. |
| DELETE | /circles/{circle}/membership | Leave; owner must transfer or delete first. |
| GET | /circles/{circle}/assets | List contributions (page/per_page). |
| POST | /circles/{circle}/assets | Add eligible asset_ids. |
| PATCH | /circles/{circle}/assets/{assetId} | Pause/resume an own contribution using is_paused. |
| DELETE | /circles/{circle}/assets/{assetId} | Withdraw a contribution without deleting its asset. |
| GET / PUT | /circles/{circle}/visibility | Read or replace the current viewer’s filters. |
| GET | /circles/{circle}/live | Read paginated, viewer-filtered live positions. |
| GET | /circles/{circle}/realtime | Read the current private subscription descriptor. |
| GET | /circles/{circle}/activity | Read paginated Circle Activity. |
Request examples
Create and join require an explicit disclosure acceptance. The examples use placeholder values; use the real returned IDs and current disclosure version.
PUT visibility replaces all filters for the current viewer in this Circle. Each entry uses target_type="member" or "asset", target_id and is_hidden. A member hide and an asset hide both exclude matching positions; showing an asset alone does not override a hidden member. An empty filters array restores default visibility. Maximum 200 entries.
POST /api/v1/circles
{
"name": "Weekend group",
"pin": "123456",
"consent": {
"accepted": true,
"disclosure_version": "1"
}
}PUT /api/v1/circles/7/visibility
{
"filters": [
{
"target_type": "asset",
"target_id": 42,
"is_hidden": true
}
]
}Live snapshots and subscription lifecycle
Paginated results use data, meta and links. per_page defaults to 15 rows per page, maximum 100. The live endpoint paginates contributions before grouping by member, so a member may appear on several pages. Traverse every page and group by member_id; counts describe contributions.
Live meta.authorization_revision and meta.visibility_revision identify the server read. Treat changed authorization as a reason to revalidate and discard obsolete position state. Live resources contain only asset identity/name/type, current nullable position/address/time, last_seen_at, battery_level and is_online; they do not confer history or device authority.
Fetch GET /circles/{circle}/realtime for the current unprefixed private channel, event names and revisions. Use the application’s authenticated broadcast transport and POST /api/v1/broadcasting/auth as the same user; never guess a shared channel or reuse a saved membership generation.
Subscribe to circle.asset.location.updated and circle.live.invalidated using the returned names. Recheck membership, filters and the live snapshot on invalidation. Clear private position/session state on denial, withdrawal, disconnect, leave/removal, backgrounding or account/organization change. Ignore late results from obsolete scopes. Rejoining must acquire a new membership generation.
Export and erasure boundaries
Organization DataExport includes explicit allowlisted circle_memberships and circle_contributions recorded for that organization. It excludes foreign member details, PIN/join-code, consent IP/user-agent and other sensitive consent metadata. Historical organization provenance remains authoritative after account movement.
An asset DataSubjectRequest is scoped through TrackingConsent to a tracked asset and the request’s original organization. Its circle_contributions contains only id, circle_id, asset_id, organization_id, is_paused, created_at and updated_at. It does not identify an authenticated member or export membership consent. Never infer account identity from the tracked person’s email.
Asset location erasure removes matching original-organization contributions and related asset visibility. It preserves unrelated member filters, memberships, consent evidence and retained Circle audits, and does not deactivate transferred assets in another organization. New accepted tracking consent requires explicit recontribution to share again. Account/member requests require their own identified scope.
Errors
Handle 401 for unauthenticated access, 403 for denied authority, 404 for absent/unavailable resources, 409 for concurrent source/account changes, 422 for invalid input or ineligible assets, and 429 for throttling. Re-read current state after a conflict; do not replay stale IDs or restore old private position caches.