{"openapi":"3.1.0","info":{"title":"iPage Service API","version":"0.4.0","description":"Publish static, script-free HTML with a service-controlled seven-day lifetime. HTML is limited to 2 MiB measured as UTF-8 bytes. User content is stored privately and rendered through a sandboxed same-origin content route with a restrictive CSP."},"servers":[{"url":"https://ipage.work"}],"security":[{"bearerAuth":[]}],"paths":{"/v1/pages":{"get":{"operationId":"listPages","summary":"List pages owned by the authenticated identity","parameters":[{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":50,"default":20}},{"name":"cursor","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"Owner page list","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListPagesResponse"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"500":{"$ref":"#/components/responses/Error"},"503":{"$ref":"#/components/responses/Error"}}},"post":{"operationId":"publishPage","summary":"Publish a page for exactly seven days","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublishPageRequest"}}}},"responses":{"201":{"description":"Published or idempotently replayed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublishPageResponse"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"413":{"$ref":"#/components/responses/Error"},"415":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"},"500":{"$ref":"#/components/responses/Error"},"503":{"$ref":"#/components/responses/Error"}}}},"/v1/pages/{page_id}":{"parameters":[{"$ref":"#/components/parameters/PageId"}],"get":{"operationId":"getPage","summary":"Get owner-visible page metadata, including derived expiration","responses":{"200":{"description":"Current page metadata","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetPageResponse"}}}},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"500":{"$ref":"#/components/responses/Error"},"503":{"$ref":"#/components/responses/Error"}}},"delete":{"operationId":"revokePage","summary":"Idempotently revoke an owned page","responses":{"200":{"description":"Current page metadata after revocation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetPageResponse"}}}},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"500":{"$ref":"#/components/responses/Error"},"503":{"$ref":"#/components/responses/Error"}}}},"/p/{slug}":{"parameters":[{"$ref":"#/components/parameters/Slug"}],"get":{"operationId":"renderPageShell","summary":"Render the trusted share shell","security":[],"responses":{"200":{"description":"Trusted no-store shell with a sandboxed same-origin content frame","content":{"text/html":{"schema":{"type":"string"}}}},"404":{"$ref":"#/components/responses/PublicHtmlError"},"410":{"$ref":"#/components/responses/PublicHtmlError"},"451":{"$ref":"#/components/responses/PublicHtmlError"},"500":{"$ref":"#/components/responses/Error"},"503":{"$ref":"#/components/responses/Error"}}}},"/p/{slug}/content":{"parameters":[{"$ref":"#/components/parameters/Slug"}],"get":{"operationId":"renderPageContent","summary":"Render validated page content under a restrictive CSP","security":[],"responses":{"200":{"description":"Stored script-free HTML content","content":{"text/html":{"schema":{"type":"string"}}}},"404":{"$ref":"#/components/responses/PublicHtmlError"},"410":{"$ref":"#/components/responses/PublicHtmlError"},"451":{"$ref":"#/components/responses/PublicHtmlError"}}}},"/p/{slug}/report":{"parameters":[{"$ref":"#/components/parameters/Slug"}],"get":{"operationId":"renderReportForm","summary":"Show the public abuse report form","security":[],"responses":{"200":{"description":"Script-free report form","content":{"text/html":{"schema":{"type":"string"}}}},"404":{"$ref":"#/components/responses/PublicHtmlError"},"410":{"$ref":"#/components/responses/PublicHtmlError"},"451":{"$ref":"#/components/responses/PublicHtmlError"}}},"post":{"operationId":"reportPage","summary":"Persist a report once per page, IP hash, and UTC date","security":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportRequest"}}}},"responses":{"202":{"description":"Report durably accepted or duplicate acknowledged","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportResponse"}}}},"400":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"410":{"$ref":"#/components/responses/Error"},"413":{"$ref":"#/components/responses/Error"},"415":{"$ref":"#/components/responses/Error"},"451":{"$ref":"#/components/responses/Error"},"500":{"$ref":"#/components/responses/Error"},"503":{"$ref":"#/components/responses/Error"}}}},"/p/{slug}/report-form":{"parameters":[{"$ref":"#/components/parameters/Slug"}],"post":{"operationId":"submitReportForm","summary":"Persist a report submitted by the public HTML form","security":[],"requestBody":{"required":true,"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/ReportRequest"}}}},"responses":{"202":{"description":"Script-free report confirmation","content":{"text/html":{"schema":{"type":"string"}}}},"400":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/PublicHtmlError"},"410":{"$ref":"#/components/responses/PublicHtmlError"},"415":{"$ref":"#/components/responses/Error"},"451":{"$ref":"#/components/responses/PublicHtmlError"},"503":{"$ref":"#/components/responses/Error"}}}}},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"API key"}},"parameters":{"PageId":{"name":"page_id","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9A-Za-z]{22}$"}},"Slug":{"name":"slug","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9A-Za-z]{22}$"}}},"schemas":{"PageStatus":{"type":"string","enum":["active","expired","revoked","taken_down"]},"WarningCode":{"type":"string","enum":["MISSING_LANG","MISSING_TITLE","MISSING_DESCRIPTION","MISSING_VIEWPORT","MULTIPLE_H1","HEADING_LEVEL_SKIPPED","IMAGE_ALT_MISSING","TABLE_SEMANTICS_INCOMPLETE","PLACEHOLDER_VALUE_FOUND","HORIZONTAL_OVERFLOW_RISK"]},"ErrorCode":{"type":"string","enum":["BAD_REQUEST","INVALID_API_KEY","ACCOUNT_SUSPENDED","FILE_TOO_LARGE","UNSUPPORTED_ENCODING","UNSUPPORTED_MEDIA_TYPE","SCRIPT_NOT_ALLOWED","REMOTE_RESOURCE_BLOCKED","FORM_NOT_ALLOWED","EMBED_NOT_ALLOWED","NAVIGATION_NOT_ALLOWED","UNSAFE_SVG","SUSPECTED_PHISHING","IDEMPOTENCY_IN_PROGRESS","RATE_LIMITED","PAGE_NOT_FOUND","PAGE_EXPIRED","PAGE_TAKEN_DOWN","SERVICE_OVERLOADED","DEPENDENCY_UNAVAILABLE","INTERNAL_ERROR"]},"Location":{"type":"object","additionalProperties":false,"properties":{"line":{"type":"integer","minimum":1},"column":{"type":"integer","minimum":1},"selector":{"type":"string"}}},"Warning":{"type":"object","additionalProperties":false,"required":["code","message"],"properties":{"code":{"$ref":"#/components/schemas/WarningCode"},"message":{"type":"string"},"locations":{"type":"array","items":{"$ref":"#/components/schemas/Location"}}}},"ErrorResponse":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","additionalProperties":false,"required":["code","message"],"properties":{"code":{"$ref":"#/components/schemas/ErrorCode"},"message":{"type":"string"},"hint":{"type":"string"},"locations":{"type":"array","items":{"$ref":"#/components/schemas/Location"}}}}}},"PublishPageRequest":{"type":"object","additionalProperties":false,"required":["html","idempotency_key"],"properties":{"html":{"type":"string","minLength":1,"description":"UTF-8 HTML, at most 2 MiB (2097152 encoded bytes)","x-maxUtf8Bytes":2097152},"title":{"type":"string","maxLength":120},"idempotency_key":{"type":"string","minLength":1,"maxLength":128,"description":"Required stable retry key for reliable agent publishing"}}},"PublishPageResponse":{"type":"object","additionalProperties":false,"required":["page_id","url","status","expires_at","status_url","warnings"],"properties":{"page_id":{"type":"string","pattern":"^[0-9A-Za-z]{22}$"},"url":{"type":"string","format":"uri"},"status":{"$ref":"#/components/schemas/PageStatus"},"expires_at":{"type":"string","format":"date-time","description":"Exactly seven days after creation"},"status_url":{"type":"string","format":"uri"},"title":{"type":"string","maxLength":120},"warnings":{"type":"array","items":{"$ref":"#/components/schemas/Warning"}}}},"GetPageResponse":{"type":"object","additionalProperties":false,"required":["page_id","url","status","expires_at","status_url","warnings","created_at","view_count"],"properties":{"page_id":{"type":"string","pattern":"^[0-9A-Za-z]{22}$"},"url":{"type":"string","format":"uri"},"status":{"$ref":"#/components/schemas/PageStatus"},"expires_at":{"type":"string","format":"date-time","description":"Exactly seven days after creation"},"status_url":{"type":"string","format":"uri"},"title":{"type":"string","maxLength":120},"warnings":{"type":"array","items":{"$ref":"#/components/schemas/Warning"}},"created_at":{"type":"string","format":"date-time"},"view_count":{"type":"integer","minimum":0}}},"ListPagesResponse":{"type":"object","additionalProperties":false,"required":["items"],"properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/GetPageResponse"}},"next_cursor":{"type":"string"}}},"ReportRequest":{"type":"object","additionalProperties":false,"required":["reason"],"properties":{"reason":{"type":"string","enum":["abuse","phishing","copyright","other"]},"details":{"type":"string","maxLength":2000}}},"ReportResponse":{"type":"object","additionalProperties":false,"required":["accepted","duplicate"],"properties":{"accepted":{"type":"boolean","const":true},"duplicate":{"type":"boolean"}}}},"responses":{"Error":{"description":"Structured JSON error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"PublicHtmlError":{"description":"Human-readable lifecycle status page","content":{"text/html":{"schema":{"type":"string"}}}}}}}