{"openapi":"3.0.3","info":{"title":"AHOOK","description":"Webhooks designed for agents: create a webhook URL, wait for events, list them, and extract fields. Free tier: 100 events stored, 7-day expiry, no signup.","version":"0.1.0"},"servers":[{"url":"https://ahook.app"}],"paths":{"/api/v1/inboxes":{"post":{"summary":"Create a webhook inbox","responses":{"201":{"description":"Inbox created; read token shown once."}}}},"/api/v1/inboxes/{id}":{"get":{"summary":"Inbox details","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Inbox details."}}},"delete":{"summary":"Delete an inbox and its events","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Deleted."}}}},"/api/v1/inboxes/{id}/events":{"get":{"summary":"List events","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"after","in":"query","schema":{"type":"integer"}},{"name":"limit","in":"query","schema":{"type":"integer"}}],"responses":{"200":{"description":"Events."}}}},"/api/v1/inboxes/{id}/wait":{"get":{"summary":"Wait for the next event after a cursor","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"after","in":"query","schema":{"type":"integer"}},{"name":"timeout","in":"query","schema":{"type":"integer"}},{"name":"body_contains","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"The next event, or a timeout object."}}}},"/api/v1/inboxes/{id}/extract":{"post":{"summary":"Extract a JSON path from an event body","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Extracted value."}}}},"/ingest/{slug}":{"post":{"summary":"Public ingest endpoint for a webhook inbox","description":"Bodies are stored as text (1 MB cap). Binary bodies are stored base64-encoded with header x-ahook-encoding: base64 on Starter/Growth; free inboxes reject them with 403.","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Event stored."}}}},"/api/v1/accounts":{"post":{"summary":"Create an account; API key shown once","responses":{"201":{"description":"Account created; API key shown once."}}}},"/api/v1/accounts/me":{"get":{"summary":"Account plan, status, and inbox usage (API key auth)","responses":{"200":{"description":"Account details."}}}},"/api/v1/accounts/checkout":{"post":{"summary":"Create a Stripe Checkout session for a price (API key auth, test mode)","responses":{"200":{"description":"Checkout URL."}}}},"/api/v1/accounts/cancel":{"post":{"summary":"Self-serve cancel at period end (API key auth)","responses":{"200":{"description":"Cancellation scheduled."}}}},"/api/v1/accounts/resume":{"post":{"summary":"Undo a scheduled cancel (API key auth)","responses":{"200":{"description":"Cancellation cleared."}}}},"/api/v1/accounts/inboxes":{"get":{"summary":"List the account’s inboxes (API key auth)","responses":{"200":{"description":"Inboxes."}}}},"/api/v1/stripe/webhook":{"post":{"summary":"Stripe webhook (signature-verified)","responses":{"200":{"description":"Event received."}}}},"/api/v1/health":{"get":{"summary":"Service status","responses":{"200":{"description":"OK."}}}}},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"Read token returned once at inbox creation."}}}}