{"openapi":"3.1.0","info":{"title":"Loop Desk","version":"0.1.0","description":"Agent-payable open-loop tracker with TRACE receipts."},"servers":[{"url":"https://loop.bot2botlabs.com"}],"paths":{"/api/v1/loops":{"post":{"operationId":"register_loop","summary":"Register an open loop","security":[{"bearerAuth":[]}],"responses":{"201":{"description":"Created"}}},"get":{"operationId":"list_loops","summary":"List loops for the API key","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"OK"}}}},"/api/v1/loops/due":{"get":{"operationId":"list_due","summary":"List open loops due on or before a timestamp","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"OK"}}}},"/api/v1/loops/{id}":{"get":{"operationId":"get_loop","summary":"Get one loop","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"404":{"description":"Missing"}}}},"/api/v1/checkout/holiday":{"get":{"operationId":"holiday_checkout_status","summary":"Whether the $29 Holiday Open-Loop Pack Checkout is open","responses":{"200":{"description":"open true or false with a reason"}}},"post":{"operationId":"holiday_checkout","summary":"Start Stripe Checkout for the $29 pack. No API key. JSON callers get { url }.","responses":{"200":{"description":"Checkout URL"},"303":{"description":"Redirect to Stripe or back to /holiday"},"503":{"description":"Checkout closed"}}}},"/api/v1/stripe/webhook":{"post":{"operationId":"stripe_webhook","summary":"Stripe webhook. Fulfills a paid Holiday pack and revokes on refund.","responses":{"200":{"description":"Received"}}}},"/api/v1/receipts/{id}":{"get":{"operationId":"get_receipt","summary":"Public TRACE receipt JSON","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"}}}}},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"}}}}