{"name":"Folio ZIP Collections API","version":"1","guides":{"llms":"https://folio.aicd.io/llms.txt","agentSkill":"https://folio.aicd.io/SKILL.md"},"capabilityRoutes":{"collection":"https://folio.aicd.io/folder/<token>/","document":"https://folio.aicd.io/folder/<token>/<url-encoded-path>","selection":"https://folio.aicd.io/folder/<token>/<url-encoded-path>?s=L<start>:L<end>","note":"A document URL opens that file but grants access to the entire collection."},"authentication":"Use Authorization: Bearer <capabilityToken> for every operation after import.","endpoints":[{"method":"POST","path":"/api/import","contentType":"multipart/form-data","limits":{"files":50,"expandedBytes":10485760,"archiveBytes":12582912,"expiryDays":{"default":7,"maximum":30}},"fields":{"archive":"ZIP file (required)","title":"string (optional)","expiresInDays":"integer from 1 to 30 (optional, defaults to 7)"},"returns":["capability token","share URL","collection metadata"]},{"method":"GET","path":"/api/collection","returns":"collection metadata, expiration time, and changed flags"},{"method":"GET","path":"/api/file?path=<path>","returns":"current file bytes"},{"method":"PUT","path":"/api/file?path=<path>","body":"replacement text/Markdown/HTML bytes"},{"method":"GET","path":"/api/original?path=<path>","returns":"original uploaded file bytes"},{"method":"GET","path":"/api/diff","returns":"files modified from the uploaded baseline"},{"method":"GET","path":"/api/export","returns":"current edited collection as ZIP"}],"example":"curl -F archive=@plans.zip https://folio.aicd.io/api/import"}