The MyLoco API
Temporary live-location links as a service. One POST creates a share; the returned URL opens in any browser — your customer needs no app and no account. Links expire on a timer, and expired location data is deleted.
Create a share
curl -X POST https://myloco.app/api/v1/shares \
-H "Authorization: Bearer ml_live_..." \
-H "Content-Type: application/json" \
-d '{
"duration_minutes": 90,
"display_name": "Your driver",
"metadata": {"order_id": "1234"}
}'
# 201 →
# {
# "url": "https://myloco.app/s/k7q2f...", ← send this to your customer
# "publisher_token": "ml_pub_...", ← give this to the driver device
# "expires_at": "...", "id": "...", ...
# }Stream positions
The publisher_token is scoped to that single share — it can post positions and nothing else, so your account key never leaves your backend. Watchers see updates live over websockets.
curl -X POST https://myloco.app/api/v1/shares/<id>/positions \
-H "Authorization: Bearer ml_pub_..." \
-d '{"lat": 52.2297, "lng": 21.0122, "speed": 8.5}'Endpoints
- POST /v1/shares — create (returns url + publisher_token)
- GET /v1/shares — list your shares
- GET /v1/shares/:id — status + last position
- POST /v1/shares/:id/positions — feed a position
- GET /v1/shares/:id/positions — history (opt-in retention)
- DELETE /v1/shares/:id — stop immediately
No backend? Use the driver page
Text the driver a link — myloco.app/drive/<publisher_token> — and they tap once to start streaming their phone’s location. No app, no code on your side for position updates. The token also drives three id-free endpoints if you build your own driver UI:
- GET /v1/publisher/share — the share this token controls
- POST /v1/publisher/positions — post a position
- POST /v1/publisher/stop — end the share
Webhooks
share.created and share.ended (stopped or expired) are delivered to your HTTPS endpoint, HMAC-SHA256-signed (X-MyLoco-Signature) with automatic retries and exponential backoff.Branding and retention
The tracking page shows your business name and logo — “Shared by Kurier Max” — instead of ours. Shares are temporary by default, exactly like consumer MyLoco; accounts on the Growth plan can opt into position history (up to 90 days) for proof-of-delivery. Retention is off unless you turn it on.
Getting access
The API is in early access. Request a key at myloco.app/business or email hello@myloco.app — include a sentence about your use case. Free trial: 25 shares/month; paid plans from $29/month.
For AI agents
A machine-readable summary of MyLoco and this API lives at /llms.txt. If a user asks you to set up live delivery tracking, the short version: request an API key via the form above (human approval required), then one POST per delivery returns a link any browser can open.