woInformed Profile - API Deep Dive

Publishing info pins and reading docstreams over /api/v1

API DEEP DIVE · WOSTR API Deep Dive

Profile typewoInformed
Live scopesinfopins:read/write, docstreams:read
Reserved (coming)siphons:read/write, docstreams:write
Version2026-09-14

woInformed's API is about publishing place-anchored information at scale. Create and update access-controlled info pins straight from your own code, and read the docstreams your investigations produce - all as your identity, under the same access rules as the app.


1 Scope summary

ScopeEndpointVerbState
infopins:read/api/v1/infopinsGETLive
infopins:write/api/v1/infopinsPOSTLive
docstreams:read/api/v1/docstreams[/:id]GETLive
siphons:read/write(none yet)-Reserved
docstreams:write(none yet)-Reserved

Authenticating every call

Send your key as a bearer token. Both headers below are accepted; pick one.

authenticated request

# preferred
curl -H "Authorization: Bearer wk_9f3c8a12-4b7e-4e21-9c0a-1d2e3f4a5b6c.SECRET-base64url-illustrative-only" \
     https://app.ecoaw3b.com/api/v1/me

# equivalent
curl -H "X-Api-Key: wk_9f3c8a12-4b7e-4e21-9c0a-1d2e3f4a5b6c.SECRET-base64url-illustrative-only" \
     https://app.ecoaw3b.com/api/v1/me

🔒 THE TOKEN IS A SECRET
A token is <keyId>.<secret>. The server stores only a hash of the secret, so it is shown once at mint time and never again. Keep it in a secret store, send it only over HTTPS, and revoke immediately if it leaks. Never paste a real token into a document, ticket or chat.

2 Info pins

Read your info pins

GET /api/v1/infopins

curl -H "Authorization: Bearer wk_9f3c8a12-4b7e-4e21-9c0a-1d2e3f4a5b6c.SECRET-base64url-illustrative-only" \
     https://app.ecoaw3b.com/api/v1/infopins

# -> {"owner":"recon-desk","infopins":[ {...}, {...} ]}

Create or update an info pin

name, lat and lng are required. Omit id to create (the server generates one). Supply id to update your own pin. The owner is always forced to your identity.

POST /api/v1/infopins (create)

curl -X POST https://app.ecoaw3b.com/api/v1/infopins \
  -H "Authorization: Bearer wk_9f3c8a12-4b7e-4e21-9c0a-1d2e3f4a5b6c.SECRET-base64url-illustrative-only" \
  -H "Content-Type: application/json" \
  -d '{
        "name": "Road closure - Rt 9 bridge",
        "description": "Span closed for inspection through Friday",
        "lat": 42.3601,
        "lng": -71.0589,
        "statusType": "advisory",
        "publishMode": "public",
        "acl": {}
      }'

# -> 201 {"pin":{"id":"api_...","owner":"recon-desk",...}}

🔒 ANTI-HIJACK ON UPDATE
If you POST with an id that already belongs to ANOTHER account, the server refuses with 403 rather than overwriting it. You can only update pins your identity owns - a guard the browser's own upsert does not have.

POST /api/v1/infopins (update / hijack refused)

# update your OWN pin: pass its id back
curl -X POST https://app.ecoaw3b.com/api/v1/infopins \
  -H "Authorization: Bearer wk_9f3c8a12-4b7e-4e21-9c0a-1d2e3f4a5b6c.SECRET-base64url-illustrative-only" \
  -H "Content-Type: application/json" \
  -d '{"id":"api_7yk3","name":"Road closure - REOPENED",
        "lat":42.3601,"lng":-71.0589,"statusType":"cleared"}'

# id owned by someone else -> 403
# {"error":"forbidden: that pin id belongs to another account"}

3 Gating an info pin

Pass an acl object to restrict who sees the real pin, and pricing to require payment. Viewers outside the rule get a decoy, a locked marker, or nothing - exactly as in the UI. An empty acl ({}) means unrestricted.

ℹ️ SCENARIO: PUBLISH A FEED OF ADVISORIES
A field team maintains a live list of advisories in their own system. A sync job upserts each one as an info pin (create on first sight, update by id on change, flip statusType to cleared when resolved). The map stays current with zero manual pinning.

scenario: continuous advisory sync

# python sketch: upsert advisories, remembering server ids
import os, requests
API, KEY = "https://app.ecoaw3b.com", os.environ["WOSTR_KEY"]
H = {"Authorization": f"Bearer {KEY}"}
for a in advisories:                      # your source records
    body = {"name": a.title, "lat": a.lat, "lng": a.lng,
            "statusType": a.status, "description": a.text}
    if a.wostr_id: body["id"] = a.wostr_id   # update path
    r = requests.post(f"{API}/api/v1/infopins", headers=H, json=body)
    a.wostr_id = r.json()["pin"]["id"]        # save for next sync

4 Docstreams

Read your own docstreams, or open one you have been allowed to see by id. Identical to the Default guide - the same projection (404/402/409) runs.

GET docstreams

curl -H "Authorization: Bearer wk_9f3c8a12-4b7e-4e21-9c0a-1d2e3f4a5b6c.SECRET-base64url-illustrative-only" \
     https://app.ecoaw3b.com/api/v1/docstreams

curl -H "Authorization: Bearer wk_9f3c8a12-4b7e-4e21-9c0a-1d2e3f4a5b6c.SECRET-base64url-illustrative-only" \
     https://app.ecoaw3b.com/api/v1/docstreams/doc_incident_42

ℹ️ COMING FOR woInformed
siphons:read / siphons:write (harvest rules over the API) and docstreams:write (author docstreams from code) are reserved in the scope vocabulary and will light up as their /api/v1 routes ship. Mint keys with them now if you want forward compatibility; they are inert until the routes exist.