{"openapi":"3.1.0","info":{"title":"SesApp Agent API","version":"1.3.0","description":"Create and manage housing access sheets. Field `instructions` is a Markdown flip-book (see property description + example). Playbook: /llms.txt. Agents pay on Base via HTTP 402 (x402): Agent 15 USDC / 20 sheets, Fleet 79 USDC / 200, Platform 250 USDC fair-use. Extra sheets: 0.50 USDC (Agent) or 0.25 (Fleet). After payment, send `Authorization: Bearer`."},"servers":[{"url":"https://sesapp.fr"}],"paths":{"/api/agent/subscribe":{"post":{"summary":"Subscribe or renew (x402)","description":"Without PAYMENT-SIGNATURE returns 402 + PAYMENT-REQUIRED. Query `plan=fleet` or `plan=platform` for higher SKUs. Default: Agent 15 USDC.","parameters":[{"name":"plan","in":"query","schema":{"type":"string","enum":["agent","fleet","platform"],"default":"agent"}}],"responses":{"200":{"description":"JWT and planExpiry"},"402":{"description":"Payment required (x402)"},"503":{"description":"X402_PAY_TO not configured"}}}},"/api/agent/fiches":{"get":{"summary":"List owned access sheets","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"List"},"401":{"description":"Auth"},"402":{"description":"Expired plan"}}},"post":{"summary":"Create an access sheet","description":"Beyond plan quota, returns 402 for overage (0.50 USDC Agent / 0.25 Fleet). Retry with PAYMENT-SIGNATURE. Write the guest flip-book in `instructions` (Markdown). Full playbook: /llms.txt.","security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["name","formattedAddress"],"properties":{"name":{"type":"string"},"formattedAddress":{"type":"string"},"instructions":{"type":"string","description":"Markdown flip-book shown to the guest (this field).\nCover (map, name, formattedAddress, accessCode) is generated — do not repeat it here.\nSplit pages with a line containing only --- .\nSupported: # ## ### headings, paragraphs, **bold**, *italic*, - / 1. lists, [label](https://...), ![alt](https://...).\nPhotos: https URLs only. No file upload — host images yourself.\nNever put wifiPassword in Markdown; it is unlocked only within 150 m via GPS.\nIntent hrefs: sesapp:wifi (needs wifiName + wifiPassword) and sesapp:contact (needs phoneNumber). Guest-facing labels: [Ajouter le WiFi] / [Ajouter le contact].\nIf you omit those links but set the fields, SesApp appends WiFi/contact pages.\nExample:\n# Bienvenue\nParking au fond à gauche.\n\n![Façade](https://example.com/facade.jpg)\n\n---\n\n## Arrivée\nSonnette à gauche.\n\n[Itinéraire](https://maps.google.com/?q=48.8566,2.3522)\n\n---\n\n[Ajouter le WiFi](sesapp:wifi)\n\n---\n\n[Ajouter le contact](sesapp:contact)","example":"# Bienvenue\nParking au fond à gauche.\n\n![Façade](https://example.com/facade.jpg)\n\n---\n\n## Arrivée\nSonnette à gauche.\n\n[Itinéraire](https://maps.google.com/?q=48.8566,2.3522)\n\n---\n\n[Ajouter le WiFi](sesapp:wifi)\n\n---\n\n[Ajouter le contact](sesapp:contact)"},"lat":{"type":"number","description":"Latitude for the cover map and WiFi geofence."},"lon":{"type":"number","description":"Longitude for the cover map and WiFi geofence."},"wifiName":{"type":"string","description":"SSID. Required for sesapp:wifi. Hidden until the guest is within 150 m if wifiPassword is set."},"wifiPassword":{"type":"string","description":"Never put this in instructions. Unlocked on the guest link within 150 m of lat/lon."},"accessCode":{"type":"string","description":"Shown on the generated cover page."},"phoneNumber":{"type":"string","description":"Required for sesapp:contact. E.164 preferred."}}}}}},"responses":{"200":{"description":"Created"},"402":{"description":"Overage payment required"}}}},"/api/agent/fiches/{id}":{"patch":{"summary":"Update an access sheet","description":"Same body fields as create. Typical: PATCH instructions after adding photos.","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"formattedAddress":{"type":"string"},"instructions":{"type":"string","description":"Markdown flip-book shown to the guest (this field).\nCover (map, name, formattedAddress, accessCode) is generated — do not repeat it here.\nSplit pages with a line containing only --- .\nSupported: # ## ### headings, paragraphs, **bold**, *italic*, - / 1. lists, [label](https://...), ![alt](https://...).\nPhotos: https URLs only. No file upload — host images yourself.\nNever put wifiPassword in Markdown; it is unlocked only within 150 m via GPS.\nIntent hrefs: sesapp:wifi (needs wifiName + wifiPassword) and sesapp:contact (needs phoneNumber). Guest-facing labels: [Ajouter le WiFi] / [Ajouter le contact].\nIf you omit those links but set the fields, SesApp appends WiFi/contact pages.\nExample:\n# Bienvenue\nParking au fond à gauche.\n\n![Façade](https://example.com/facade.jpg)\n\n---\n\n## Arrivée\nSonnette à gauche.\n\n[Itinéraire](https://maps.google.com/?q=48.8566,2.3522)\n\n---\n\n[Ajouter le WiFi](sesapp:wifi)\n\n---\n\n[Ajouter le contact](sesapp:contact)","example":"# Bienvenue\nParking au fond à gauche.\n\n![Façade](https://example.com/facade.jpg)\n\n---\n\n## Arrivée\nSonnette à gauche.\n\n[Itinéraire](https://maps.google.com/?q=48.8566,2.3522)\n\n---\n\n[Ajouter le WiFi](sesapp:wifi)\n\n---\n\n[Ajouter le contact](sesapp:contact)"},"lat":{"type":"number","description":"Latitude for the cover map and WiFi geofence."},"lon":{"type":"number","description":"Longitude for the cover map and WiFi geofence."},"wifiName":{"type":"string","description":"SSID. Required for sesapp:wifi. Hidden until the guest is within 150 m if wifiPassword is set."},"wifiPassword":{"type":"string","description":"Never put this in instructions. Unlocked on the guest link within 150 m of lat/lon."},"accessCode":{"type":"string","description":"Shown on the generated cover page."},"phoneNumber":{"type":"string","description":"Required for sesapp:contact. E.164 preferred."}}}}}},"responses":{"200":{"description":"Updated"}}},"delete":{"summary":"Delete an access sheet","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Deleted"}}}},"/api/agent/fiches/{id}/share":{"post":{"summary":"Create a revocable guest link","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Share URL"}}}},"/api/agent/share/{token}":{"delete":{"summary":"Revoke a guest link","security":[{"bearerAuth":[]}],"parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Revoked"}}}},"/mcp":{"post":{"summary":"MCP Streamable HTTP","description":"JSON-RPC tools wrapping the same agent API."}}},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"}}},"x-x402":{"network":"eip155:8453","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","periodDays":30,"plans":{"agent":{"amount":"15000000","usdc":15,"maxFiches":20,"overageAmount":"500000","path":"/api/agent/subscribe"},"fleet":{"amount":"79000000","usdc":79,"maxFiches":200,"overageAmount":"250000","path":"/api/agent/subscribe?plan=fleet"},"platform":{"amount":"250000000","usdc":250,"maxFiches":"fair-use","overageAmount":null,"path":"/api/agent/subscribe?plan=platform"}}}}