{"openapi":"3.1.1","info":{"title":"Callback Inbox","description":"Create short-lived webhook URLs, capture incoming POST payloads, and inspect received callback events.","version":"1.0.0"},"servers":[{"url":"https://api.onestop.sh/v1/invoke/side-projects/webhook-inbox"}],"security":[{"oneStopApiKey":[]}],"components":{"securitySchemes":{"oneStopApiKey":{"type":"http","scheme":"bearer"}}},"paths":{"/callbacks":{"post":{"operationId":"create_callback","summary":"Create a callback URL that accepts webhooks for 10 minutes (extendable to 30)","responses":{"201":{"description":"A new callback inbox","content":{"application/json":{"schema":{"type":"object","properties":{"inbox_id":{"type":"string"},"webhook_url":{"type":"string","format":"uri"},"expires_at":{"type":"string","format":"date-time"}},"required":["inbox_id","webhook_url","expires_at"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}}}},"/callbacks/{inbox_id}/events":{"get":{"operationId":"list_callback_events","summary":"List events captured by a callback inbox","parameters":[{"name":"inbox_id","in":"path","required":true,"style":"simple","explode":false,"schema":{"type":"string","format":"uuid","examples":["9f1c0b2a-3d4e-4f5a-8b6c-7d8e9f0a1b2c"]}},{"name":"limit","in":"query","required":false,"style":"form","explode":true,"schema":{"type":"integer","minimum":1,"maximum":100,"default":50,"examples":[25]}},{"name":"order","in":"query","required":false,"style":"form","explode":true,"schema":{"type":"string","enum":["asc","desc"],"default":"desc","examples":["desc"]}}],"responses":{"200":{"description":"Captured callback events","content":{"application/json":{"schema":{"type":"object","properties":{"events":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"received_at":{"type":"string","format":"date-time"},"method":{"type":"string"},"headers":{"type":"object","additionalProperties":{"type":"string"}},"query":{"type":"string"},"content_type":{"type":["string","null"]},"body_bytes":{"type":"integer","minimum":0}},"required":["id","received_at","method","headers","query","content_type","body_bytes"]}}},"required":["events"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"No such callback inbox","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"410":{"description":"Callback inbox expired","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}}}},"/callbacks/{inbox_id}/events/{event_id}":{"get":{"operationId":"get_callback_event","summary":"Fetch one captured callback event","parameters":[{"name":"inbox_id","in":"path","required":true,"style":"simple","explode":false,"schema":{"type":"string","format":"uuid","examples":["9f1c0b2a-3d4e-4f5a-8b6c-7d8e9f0a1b2c"]}},{"name":"event_id","in":"path","required":true,"style":"simple","explode":false,"schema":{"type":"string","format":"uuid","examples":["18aa4fb7-c0ab-47af-b9ea-1b3646d25a09"]}}],"responses":{"200":{"description":"Captured callback event","content":{"application/json":{"schema":{"allOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"received_at":{"type":"string","format":"date-time"},"method":{"type":"string"},"headers":{"type":"object","additionalProperties":{"type":"string"}},"query":{"type":"string"},"content_type":{"type":["string","null"]},"body_bytes":{"type":"integer","minimum":0}},"required":["id","received_at","method","headers","query","content_type","body_bytes"]},{"type":"object","properties":{"body_text":{"type":["string","null"]},"body_base64":{"type":"string"}},"required":["body_text","body_base64"]}]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"No such callback event","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"410":{"description":"Callback inbox expired","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}}}},"/callbacks/{inbox_id}/extend":{"post":{"operationId":"extend_callback","summary":"Extend a callback inbox by 10 minutes, up to 30 minutes total","parameters":[{"name":"inbox_id","in":"path","required":true,"style":"simple","explode":false,"schema":{"type":"string","format":"uuid","examples":["9f1c0b2a-3d4e-4f5a-8b6c-7d8e9f0a1b2c"]}}],"responses":{"200":{"description":"Callback inbox extended","content":{"application/json":{"schema":{"type":"object","properties":{"inbox_id":{"type":"string"},"expires_at":{"type":"string","format":"date-time"}},"required":["inbox_id","expires_at"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"No such callback inbox","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"409":{"description":"Callback inbox already at maximum TTL","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"410":{"description":"Callback inbox expired","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}}}},"/callbacks/{inbox_id}":{"delete":{"operationId":"delete_callback","summary":"Expire a callback inbox immediately","parameters":[{"name":"inbox_id","in":"path","required":true,"style":"simple","explode":false,"schema":{"type":"string","format":"uuid","examples":["9f1c0b2a-3d4e-4f5a-8b6c-7d8e9f0a1b2c"]}}],"responses":{"200":{"description":"Callback inbox expired","content":{"application/json":{"schema":{"type":"object","properties":{"expired":{"type":"boolean","enum":[true]}},"required":["expired"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"No such callback inbox","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}}}}}}