SonarPlatformGet early access

The place layer under your app.

Sonar runs the part of your product that lives at a place: posts pinned to a spot that fade in 24 hours, likes that buy them time, permanent sponsored pins, photo uploads with automatic moderation.

Your app keeps its own users, its own sign-in and its own brand. Like Stripe, Sonar stays underneath: your users never see the word “Sonar”.

Base URL https://mysonar.zone/api/v1

How Sonar sits under your appYour app, with your users and your brand, calls the Sonar API with a server-side key. Your users never see Sonar. Sonar handles posts, media uploads, moderation, likes that buy time and sponsored pins.Your appyour users, your sign-in, your brandwhat your users seeinvisible to themHTTPS + sk_live keySonar APIPoststext, photo, video, voiceMediaupload ticketsModerationphotos checked firstLikes buy time+5 min eachSponsored pinsnever expire

Nothing lasts unless someone keeps it alive

Every post Sonar holds for you follows the same clock. The crowd decides what stays a little longer; only a sponsor makes something permanent.

Every post fades. 24 hours by default, as little as 15 minutes. When the ring runs out, the post is gone from every feed.
Each like buys 5 minutes. Uncapped, one per user per post. Take the like back and the minutes go with it.
Only sponsors are permanent. lifespan: "permanent" plus a sponsor label. Use it for drops, offers, landmarks.

Eight words to know

Tenant
Your app. Every post, like and file is scoped to one tenant and invisible to the others and to mysonar.zone.
API key
sk_live_…, server-side only. Identifies the tenant. Never ship it to a browser.
User
Your user. You pass user: { id, name }; Sonar trusts it, stores it scoped to your tenant, and never asks them to sign in.
Post
A waypoint: text, photo, video or 15 s voice at a lat/lng, on a channel, optionally tied to a place.
Place
Your own id for a spot (shop:cafe-tapiz, stage:north). Gives you a per-place feed: a photo wall.
Channel
Your own topic slug (claims, food, events). Free-form, [a-z0-9-]{1,32}.
Lifespan
Posts fade after 24 h by default (min 15 min). Every like adds 5 minutes, uncapped.
Sponsored pin
lifespan: "permanent" + a sponsor label: never expires. Use it for drops, offers, landmarks.

Quickstart: a photo on a place's wall

Three calls. Keep the key on your server; only the upload ticket ever reaches a browser.

  1. Get an upload ticket and send the photo

    POST /media returns a ticket that lasts 5 minutes. Upload the file to its url with every field in fields first, then file.

    # 1. Ask Sonar for an upload ticket (server-side, with your key)
    TICKET=$(curl -s -X POST https://mysonar.zone/api/v1/media \
      -H "Authorization: Bearer $SONAR_KEY" \
      -H "Content-Type: application/json" \
      -d '{ "kind": "photo", "contentType": "image/jpeg" }')
    
    # → 201 { "key": "tenants/puq/3f…a9.jpg", "url": "https://…s3…", "fields": { … } }
    
    # Then POST the file to "url": every field in "fields" first, then "file".
    # The ticket lasts 5 minutes and carries no key.
    curl -X POST "$(echo "$TICKET" | jq -r .url)" \
      $(echo "$TICKET" | jq -r '.fields | to_entries[] | "-F \(.key)=\(.value)"') \
      -F "file=@photo.jpg"
    
    echo "$TICKET" | jq -r .key   # → your mediaKey for step 2
  2. Create the post

    POST /posts with your user, a channel, the coordinates, a place and the mediaKey. The photo is moderated before the post exists.

    # 2. Create the post, pinned to a place
    curl -X POST https://mysonar.zone/api/v1/posts \
      -H "Authorization: Bearer $SONAR_KEY" \
      -H "Content-Type: application/json" \
      -d '{
        "user": { "id": "citizen_42", "name": "Ana" },
        "channel": "claims",
        "kind": "photo",
        "text": "Sunday coffee at Café Tapiz",
        "lat": -53.1625, "lng": -70.9081,
        "place": "shop:cafe-tapiz",
        "mediaKey": "tenants/puq/3f…a9.jpg"
      }'
    
    # → 201 { "post": Post }
    # → 422 rejected_by_moderation (no post is created)
  3. Show the wall

    GET /posts?place=returns that place's live posts, newest first.

    # 3. Read the place's wall, newest first
    curl "https://mysonar.zone/api/v1/posts?place=shop:cafe-tapiz" \
      -H "Authorization: Bearer $SONAR_KEY"
    
    # → 200 { "posts": Post[] }   (only live posts)

API reference

Authentication

Authorization: Bearer sk_live_YOUR_KEY

Keys are stored hashed; Sonar shows a key once, when it is made.

Errors

Errors always have the same shape:

{ "error": { "code": "…", "message": "…" } }
401Missing, unknown or revoked key.
403Suspended tenant.
422rejected_by_moderation: the photo failed moderation; no post was created.
429Over the per-minute request budget (default 600). Comes with Retry-After.

POST /media

Get an upload ticket.

  • POST the file as multipart/form-data to url with every field in fields first, then file. The ticket lasts 5 minutes.
  • Limits: photo 10 MB (image/*), video 50 MB (video/*), voice 10 MB (audio/*).
  • Your server can hand the ticket to your user's browser: it carries no key. Browser uploads are allowed from the origins on your tenant.
Request body
{ "kind": "photo", "contentType": "image/jpeg" }
Response
201 { "key": "tenants/puq/3f…a9.jpg", "url": "https://…s3…", "fields": { … } }

POST /posts

Create a post.

  • kind: text | photo | video | voice; media kinds need a mediaKey from POST /media.
  • text ≤ 2,000 chars. place ≤ 64 chars [A-Za-z0-9:._-]. meta ≤ 2 KB of JSON, returned as-is.
  • lifespan: seconds, 900–86,400 (default 86,400), or "permanent" with "sponsor": "Café Tapiz".
  • Moderation: photos are checked (nudity, violence, gore, hate symbols) before the post exists. A rejected photo returns 422 and no post.
Request body
{
  "user": { "id": "citizen_42", "name": "Ana" },
  "channel": "claims",
  "kind": "photo",
  "text": "Sunday coffee at Café Tapiz",
  "lat": -53.1625, "lng": -70.9081,
  "place": "shop:cafe-tapiz",
  "mediaKey": "tenants/puq/3f…a9.jpg",
  "lifespan": 86400,
  "meta": { "drop": "drp_9", "reward": 12 }
}
Response
201 { "post": Post }
422 { error: { code: "rejected_by_moderation", labels: [...] } }

GET /posts

Read a feed: a place wall or what's nearby.

  • ?place=shop:cafe-tapiz: newest first.
  • ?lat=-53.16&lng=-70.91&radius=500: nearest first, radius ≤ 1,800 m.
  • Optional: channel=claims,food, limit (≤ 100, default 50), user=<id> (adds loved to each post).
  • Only live posts are returned. Expired ones never show.
Response
200 { "posts": Post[] }

GET /posts/{id}

Read one post.

Response
200 { "post": Post }

DELETE /posts/{id}

Take a post down.

  • Delete is your takedown: a reported post, a reversed reward, a user who leaves.
Response
200 { "deleted": true }

POST / DELETE /posts/{id}/love

Like a post, or take the like back.

  • One like per user per post. A like adds 5 minutes of life; removing it refunds them.
Request body
{ "user": { "id": "citizen_7" } }
Response
200 { "love": 3, "counted": true, "expiresAt": 1763412345000 }

GET /usage?days=30

See your usage, hour by hour.

Response
200 { "tenant": "puq", "hours": [{ "hour": "2026111614", "requests": 120, "posts": 9, "uploads": 9, "moderations": 9 }] }

The Post object

meters is present on nearby reads. loved is present when user is passed. mediaUrl is signed for 10 minutes: re-read a feed to refresh it.

Post
{
  "id": "wp_4dj8ex01JD3K…",
  "channel": "claims",
  "kind": "photo",
  "text": "Sunday coffee at Café Tapiz",
  "author": "Ana",
  "userId": "citizen_42",
  "lat": -53.1625, "lng": -70.9081,
  "place": "shop:cafe-tapiz",
  "createdAt": 1763300000000,
  "expiresAt": 1763386400000,
  "permanent": false,
  "sponsor": null,
  "love": 3,
  "loved": false,
  "mediaUrl": "https://…signed, valid 10 minutes…",
  "meters": 42,
  "meta": { "drop": "drp_9", "reward": 12 }
}

First customer: puq.city

puq.city is a city guide for Punta Arenas, Chile. Its citizens claim a visit to a local shop with a photo, and that photo becomes part of the shop's public wall. Sonar is the wall; puq.city's users never see it.

  1. Scan the counter QR

    A citizen scans the QR code at the shop's counter in puq.city.

  2. Pass a location check

    puq.city confirms they are standing at the shop.

  3. Take a photo there

    The photo goes up with an upload ticket from POST /media and is moderated before any post exists.

  4. It lands on the shop's wall

    POST /posts with place: "shop:cafe-tapiz"; the wall reads GET /posts?place=shop:cafe-tapiz.

The citizen also earns a rebate in puq.city's own coin. That part is puq.city's, not Sonar's. A post's meta (up to 2 KB of JSON, returned as-is) is where an app can keep its own notes, like a reward id.

Pricing

Usage-based, billed monthly per tenant. You pay for what you use, and you can see all of it at GET /usage.

  • Requests
  • Posts
  • Stored media
  • Moderation checks

Sonar Platform is in early access. Partners are onboarded by hand: tell us what you're building.

Get early access

hello@mysonar.zone

Coming soon

Sonar Mesh: posts that travel without the internet

A festival field, a ferry, the far end of Patagonia. Each phone carries the place's recent posts over Bluetooth and passes them to the next one it meets. When anyone gets back online, the mesh syncs to Sonar.

A post passes from phone to phone over Bluetooth, then syncs to Sonar when the last phone gets signal
  1. A post is dropped with no signal.
  2. It hops phone to phone over Bluetooth.
  3. The first phone back online syncs it to Sonar.

Same API, same posts, no internet required.