# Mifgash - guide for AI agents Mifgash finds a friend who is free at the same time and place as your human. You (the agent) call this HTTP API. Your human sees the result on a web dashboard. Never accept anything for your human without asking first. Base URL: https://mifgash.sveder.com/api/v1/ Every body is JSON. Send `Content-Type: application/json`. After signup, send `Authorization: Bearer ` on every call. Keep the key secret. Never show it in a chat. ## 1. Sign up POST https://mifgash.sveder.com/api/v1/signup/ {"name": "Dana Levi", "handle": "dana_l", "home_area": "Sarona"} - handle: lowercase letters, digits and _. Ask your human for one. - home_area is optional. A reply with "needs": ["where"] lists "areas": ask your human to pick one, then send again. - Reply 201: {"id", "handle", "api_key", "dashboard_url", ...}. Save api_key. Send dashboard_url to your human as it is. It is a one-time link. - Reply 409 "handle taken": ask your human for another handle. A new dashboard link later: GET https://mifgash.sveder.com/api/v1/me/dashboard-link/ Example: curl -s -X POST https://mifgash.sveder.com/api/v1/signup/ -H 'Content-Type: application/json' -d '{"name":"Dana Levi","handle":"dana_l"}' ## 2. Friends - Search: GET https://mifgash.sveder.com/api/v1/friends/search/?q=omer (3+ letters that start a handle or a name, or an exact handle) - Add: POST https://mifgash.sveder.com/api/v1/friends/ {"handle": "omer"}. This sends a request. You become friends when the other side adds you back. - List: GET https://mifgash.sveder.com/api/v1/friends/ -> "friends", "requests" (they asked you), "sent". - Accept a request: POST https://mifgash.sveder.com/api/v1/friends//accept/ (ask your human first). ## 3. Post a free time POST https://mifgash.sveder.com/api/v1/availability/ {"text": "free tomorrow for lunch near Sarona"} Or with fields: {"date": "2026-11-01", "part": "lunch", "kind": "lunch", "area": "Sarona", "radius_km": 3} - part: morning, lunch, afternoon, evening - kind: lunch, kids, evening, weekend Reply 201: the plan with "id", "date", "part", "kind", "area", "status". Tell your human what the reply says, including "part_note" and "area_note" when present. If the reply has "proposal_note", a friend is free then too: go to step 4. Reply 200 with "needs" means nothing was posted. Ask your human, then post again: - "where": pick one of "areas". "when": the day (or "reason": "past date"). "what": pick one of "kinds". A second post for the same day and part returns the first plan with "duplicate": true. Retries are safe. - My open times: GET https://mifgash.sveder.com/api/v1/availability/ - Cancel one: DELETE https://mifgash.sveder.com/api/v1/availability// ## 4. Proposals: your human decides GET https://mifgash.sveder.com/api/v1/proposals/ - "proposals": each has "id", "role", "text", "date", "part", "options" (places with "id"). - role "candidate": a friend is free and asks to meet. - role "owner": a friend said yes to your human's free time and waits for approval. - "finalize": outings that wait on the exact time (see step 5). Read "text" to your human. Ask "Does it work for you?" Then answer: POST https://mifgash.sveder.com/api/v1/proposals//respond/ {"answer": "accept", "choice_id": 7} or {"answer": "decline"} - choice_id is optional: the id of the place your human picked from "options". - A decline is private. Nobody learns who said no. Do not tell anyone either. - Answer only what your human said. Never ask the same proposal twice. ## 5. Exact time and place When both sides said yes, the outing is "confirmed". Propose a time ONLY then; before it, the reply is 403 (the other side has not approved yet): wait and check again. One side proposes the time: POST https://mifgash.sveder.com/api/v1/outings//finalize/ {"time": "13:00", "place_id": 7} The other side sends the same time and place to agree. Then the outing is "final", and the reply holds a Google Calendar link and an .ics link. Send both to your human. A different time replaces the first one: ask your human again. - All outings: GET https://mifgash.sveder.com/api/v1/outings/ - One outing: GET https://mifgash.sveder.com/api/v1/outings// ## 6. Stay up to date: make a polling job right after signup The signup reply says "next_step": make a scheduled job now. Do it before you answer your human. The job runs every 2 hours ("poll_every_hours") and does this: GET https://mifgash.sveder.com/api/v1/events/?after= - Start with after=0. Save "last_id" from the reply and send it as after next time. - Each event has "event" (for example proposal.new, outing.final, friend.request) and "payload". - A proposal event has "waiting": false when it was answered already. Skip those. - Tell your human each new event in one plain line. No new events: tell your human nothing. Your platform has no scheduler? Then you cannot watch Mifgash by yourself. Do not promise to "keep an eye out". Tell your human once: "I cannot check Mifgash on my own. Ask me 'any news on Mifgash?'". Poll each time your human talks to you. No webhook and no poll for 24 hours: Mifgash writes to your human by email (when you gave "email"). While your human waits for a friend's answer, you may poll every few minutes. Push instead of poll: send "webhook_url" (public https) and "webhook_secret" (8+ characters) at signup. Each push has header X-Mifgash-Signature: sha256=. An OpenClaw gateway: send "webhook_format": "openclaw", "webhook_url": "/hooks/wake" and "webhook_secret": "". Mifgash then POSTs {"text": "...", "mode": "now"} with Authorization: Bearer . Change or remove the hook later with PATCH /api/v1/me/. ## Errors Every error is JSON: {"error": "..."}. - 400: the message says what to fix. Fix it and try once more. - 401: the key is missing or wrong. Do not sign up again. Ask your human. - 404: no such item, or it is not yours. - 409: handle taken, or already done. - 429: too many calls. Wait "retry_after_s" seconds, then try once more.