{"openapi":"3.1.0","info":{"title":"Skroll API","version":"1.0.0","description":"Create, edit, publish and export skrolls. Content is stored as versioned deck-tsx modules (compiled TSX + theme tokens); every write appends an immutable version."},"servers":[{"url":"https://skrollai.com/api/v1"}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"Organization API key: `Authorization: Bearer sk_…`. Create one in Skroll settings."}},"schemas":{"Deck":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string"},"brandId":{"type":"string","format":"uuid","description":"Brand whose look and feel the skroll uses"},"format":{"type":"string","enum":["slides","webpage"],"description":"Fixed at creation: paged 16:9 slides, or a scrolling web page"},"visibility":{"type":"string","enum":["private","org","public"]},"publicSlug":{"type":["string","null"],"description":"Share slug; set on first publish and stable afterwards"},"organizationId":{"type":"string"},"ownerId":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","title","brandId","format","visibility","publicSlug","organizationId","ownerId","createdAt","updatedAt"]},"Error":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"featureId":{"type":"string","description":"Present on 402: the metered feature that ran out of allowance"}},"required":["code","message"]}},"required":["error"]},"DeckDetail":{"allOf":[{"$ref":"#/components/schemas/Deck"},{"type":"object","properties":{"latestVersion":{"type":["object","null"],"properties":{"version":{"type":"integer"},"format":{"type":"string","enum":["html","deck-tsx"],"description":"Rendering engine: React 'deck-tsx' module, or legacy 'html' document"},"source":{"type":["string","null"],"description":"Deck-tsx module source (TSX) that default-exports the deck root"},"tokensCss":{"type":["string","null"],"description":"Theme tokens (:root CSS block) for deck-tsx versions"},"compiledJs":{"type":["string","null"],"description":"Compiled deck-tsx module the player executes"},"outline":{"type":["array","null"],"items":{"type":"string"},"description":"Slide (or beat) labels, in order"},"html":{"type":["string","null"],"description":"Full standalone HTML document, only set on legacy 'html' versions"}},"required":["version","format","source","tokensCss","compiledJs","outline","html"],"description":"Content of the newest version, or null if never generated"},"versionCount":{"type":"integer"}},"required":["latestVersion","versionCount"]}]},"CreateDeckInput":{"type":"object","properties":{"brandId":{"type":"string","format":"uuid","description":"Brand to style the skroll with. See list_brands"},"title":{"type":"string","minLength":1,"maxLength":300},"format":{"type":"string","enum":["slides","webpage"],"default":"slides"}},"required":["brandId"]},"UpdateDeckInput":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":300},"visibility":{"type":"string","enum":["private","org","public"],"description":"'public' publishes the skroll at /d/{publicSlug}"}}},"Deleted":{"type":"object","properties":{"deleted":{"type":"boolean","enum":[true]}},"required":["deleted"]},"VersionWriteResult":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"version":{"type":"integer"}},"required":["id","version"]},"SetDeckContentInput":{"type":"object","properties":{"source":{"type":"string","minLength":1,"description":"Deck-tsx module source (TSX) that default-exports the deck root, importing only the player's component vocabulary. Compiled server-side."},"tokensCss":{"type":"string","description":"Theme tokens (:root CSS block, optionally preceded by Google Fonts @imports). Defaults to the latest version's tokens."},"prompt":{"type":"string","maxLength":2000,"description":"Note recorded alongside the version"}},"required":["source"]},"GenerateDeckInput":{"type":"object","properties":{"brief":{"type":"string","minLength":1,"maxLength":10000,"description":"What the skroll should contain or how to change it"},"mode":{"type":"string","enum":["create","revise"],"default":"revise","description":"'create' writes the first version; 'revise' edits the latest one"}},"required":["brief"]},"EditDeckInput":{"type":"object","properties":{"instruction":{"type":"string","minLength":1,"maxLength":10000,"description":"Precise, self-contained edit instructions for a targeted change. Works for both formats: reference each slide (slides skrolls) or beat (webpage skrolls) by its outline label/number and quote the exact copy being changed. Faster and cheaper than generate_deck; use generate_deck for a full restructure."}},"required":["instruction"]},"DeckVersionSummary":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"version":{"type":"integer"},"prompt":{"type":["string","null"],"description":"The brief that produced this version"},"createdAt":{"type":"string","format":"date-time"}},"required":["id","version","prompt","createdAt"]},"DeckVersion":{"allOf":[{"$ref":"#/components/schemas/DeckVersionSummary"},{"type":"object","properties":{"deckId":{"type":"string","format":"uuid"},"format":{"type":"string","enum":["html","deck-tsx"],"description":"Rendering engine: React 'deck-tsx' module, or legacy 'html' document"},"source":{"type":["string","null"],"description":"Deck-tsx module source (TSX) that default-exports the deck root"},"tokensCss":{"type":["string","null"],"description":"Theme tokens (:root CSS block) for deck-tsx versions"},"compiledJs":{"type":["string","null"],"description":"Compiled deck-tsx module the player executes"},"outline":{"type":["array","null"],"items":{"type":"string"},"description":"Slide (or beat) labels, in order"},"html":{"type":["string","null"],"description":"Full standalone HTML document, only set on legacy 'html' versions"}},"required":["deckId","format","source","tokensCss","compiledJs","outline","html"]}]},"Export":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"deckId":{"type":"string","format":"uuid"},"version":{"type":"integer"},"format":{"type":"string","enum":["pdf","pptx"]},"status":{"type":"string","enum":["pending","running","completed","failed"]},"fileName":{"type":["string","null"]},"nonstandardFonts":{"type":["array","null"],"items":{"type":"string"},"description":"Fonts in the deck that may not render identically in the export"},"error":{"type":["string","null"]},"downloadUrl":{"type":["string","null"],"description":"Authenticated download endpoint; present once status is 'completed'"},"createdAt":{"type":"string","format":"date-time"}},"required":["id","deckId","version","format","status","fileName","nonstandardFonts","error","downloadUrl","createdAt"]},"CreateExportInput":{"type":"object","properties":{"format":{"type":"string","enum":["pdf","pptx"]},"version":{"type":"integer","exclusiveMinimum":0,"description":"Defaults to the latest version"}},"required":["format"]},"Brand":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"sourceUrl":{"type":"string","description":"Website the brand was extracted from"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","name","sourceUrl","createdAt","updatedAt"]},"BrandDetail":{"allOf":[{"$ref":"#/components/schemas/Brand"},{"type":"object","properties":{"data":{"description":"Brand book: palette, typography, voice and imagery rules"}}}]},"CreateBrandInput":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"Public website to extract the brand book from"}},"required":["url"]}},"parameters":{}},"paths":{"/decks":{"get":{"operationId":"list_decks","tags":["Decks"],"summary":"List skrolls","description":"Lists skrolls in the organization. Use scope=mine for those the API key's owner created.","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","enum":["mine","org"],"default":"mine","description":"'mine' = decks you own; 'org' = whole org"},"required":false,"name":"scope","in":"query"}],"responses":{"200":{"description":"Skrolls, newest first","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Deck"}}}}},"401":{"description":"Missing, malformed, unknown or revoked API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's creator lacks access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Input failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded. See the Retry-After header","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"create_deck","tags":["Decks"],"summary":"Create a skroll","description":"Creates an empty skroll against one of the organization's brands. Call generate_deck afterwards to fill it in.","security":[{"bearerAuth":[]}],"requestBody":{"description":"Request body","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateDeckInput"}}}},"responses":{"201":{"description":"The created skroll","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Deck"}}}},"401":{"description":"Missing, malformed, unknown or revoked API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Out of allowance for a metered feature","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's creator lacks access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Input failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded. See the Retry-After header","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/decks/{id}":{"get":{"operationId":"get_deck","tags":["Decks"],"summary":"Get a skroll","description":"Returns a skroll's metadata plus the content of its latest version (deck-tsx source, compiled module and theme tokens).","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","format":"uuid","example":"0b1e0f7c-1c3f-4a0e-9f5a-1a2b3c4d5e6f"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"The skroll","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeckDetail"}}}},"401":{"description":"Missing, malformed, unknown or revoked API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's creator lacks access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Input failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded. See the Retry-After header","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"operationId":"update_deck","tags":["Decks"],"summary":"Rename or publish a skroll","description":"Updates title and/or visibility. Only the key creator's own skrolls can be modified. Setting visibility to 'public' mints a stable share slug.","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","format":"uuid","example":"0b1e0f7c-1c3f-4a0e-9f5a-1a2b3c4d5e6f"},"required":true,"name":"id","in":"path"}],"requestBody":{"description":"Request body","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateDeckInput"}}}},"responses":{"200":{"description":"The updated skroll","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Deck"}}}},"401":{"description":"Missing, malformed, unknown or revoked API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's creator lacks access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Input failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded. See the Retry-After header","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"operationId":"delete_deck","tags":["Decks"],"summary":"Delete a skroll","description":"Permanently deletes a skroll and all of its versions. Only the key creator's own skrolls.","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","format":"uuid","example":"0b1e0f7c-1c3f-4a0e-9f5a-1a2b3c4d5e6f"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Deleted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Deleted"}}}},"401":{"description":"Missing, malformed, unknown or revoked API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's creator lacks access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Input failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded. See the Retry-After header","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/decks/{id}/content":{"put":{"operationId":"set_deck_content","tags":["Decks"],"summary":"Replace skroll content","description":"Writes a deck-tsx module (TSX source, optionally theme tokens) as the skroll's newest version, compiled and validated server-side. History is append-only, so this never overwrites an earlier version. Consumes one version edit.","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","format":"uuid","example":"0b1e0f7c-1c3f-4a0e-9f5a-1a2b3c4d5e6f"},"required":true,"name":"id","in":"path"}],"requestBody":{"description":"Request body","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetDeckContentInput"}}}},"responses":{"200":{"description":"The created version","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VersionWriteResult"}}}},"401":{"description":"Missing, malformed, unknown or revoked API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Out of allowance for a metered feature","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's creator lacks access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Input failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded. See the Retry-After header","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/decks/{id}/generate":{"post":{"operationId":"generate_deck","tags":["Decks"],"summary":"Generate skroll content with AI","description":"Runs the skroll generator against a brief and saves the result as a new version. Synchronous and slow (typically 60-180 seconds). Consumes one version edit in 'revise' mode.","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","format":"uuid","example":"0b1e0f7c-1c3f-4a0e-9f5a-1a2b3c4d5e6f"},"required":true,"name":"id","in":"path"}],"requestBody":{"description":"Request body","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateDeckInput"}}}},"responses":{"200":{"description":"The generated version","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VersionWriteResult"}}}},"401":{"description":"Missing, malformed, unknown or revoked API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Out of allowance for a metered feature","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's creator lacks access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Input failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded. See the Retry-After header","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/decks/{id}/edit":{"post":{"operationId":"edit_deck","tags":["Decks"],"summary":"Edit skroll content with AI","description":"Applies a targeted AI edit (copy tweaks, restyling a slide or beat, adding/removing/reordering a few slides or beats) and saves the result as a new version. Works for both slides and webpage skrolls. Faster and cheaper than generate_deck; use generate_deck for a full restructure. Consumes one version edit.","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","format":"uuid","example":"0b1e0f7c-1c3f-4a0e-9f5a-1a2b3c4d5e6f"},"required":true,"name":"id","in":"path"}],"requestBody":{"description":"Request body","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EditDeckInput"}}}},"responses":{"200":{"description":"The edited version","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VersionWriteResult"}}}},"401":{"description":"Missing, malformed, unknown or revoked API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Out of allowance for a metered feature","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's creator lacks access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The skroll changed while the edit was being prepared. Retry","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Input failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded. See the Retry-After header","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/decks/{id}/versions":{"get":{"operationId":"list_deck_versions","tags":["Versions"],"summary":"List versions","description":"Lists a skroll's version history, newest first. Content is omitted; fetch a version to get it.","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","format":"uuid","example":"0b1e0f7c-1c3f-4a0e-9f5a-1a2b3c4d5e6f"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Versions","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DeckVersionSummary"}}}}},"401":{"description":"Missing, malformed, unknown or revoked API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's creator lacks access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Input failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded. See the Retry-After header","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/decks/{id}/versions/{version}":{"get":{"operationId":"get_deck_version","tags":["Versions"],"summary":"Get a version","description":"Returns one version of a skroll including its full content (deck-tsx source, compiled module and theme tokens).","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"},{"schema":{"type":"integer","exclusiveMinimum":0,"example":3},"required":true,"name":"version","in":"path"}],"responses":{"200":{"description":"The version","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeckVersion"}}}},"401":{"description":"Missing, malformed, unknown or revoked API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's creator lacks access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Input failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded. See the Retry-After header","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/decks/{id}/versions/{version}/revert":{"post":{"operationId":"revert_deck_version","tags":["Versions"],"summary":"Revert to a version","description":"Copies an earlier version's content forward as a new newest version. History is preserved. Consumes one version edit.","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"},{"schema":{"type":"integer","exclusiveMinimum":0,"example":3},"required":true,"name":"version","in":"path"}],"responses":{"200":{"description":"The new version","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VersionWriteResult"}}}},"401":{"description":"Missing, malformed, unknown or revoked API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Out of allowance for a metered feature","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's creator lacks access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Input failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded. See the Retry-After header","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/decks/{id}/exports":{"post":{"operationId":"create_export","tags":["Exports"],"summary":"Request an export","description":"Queues a PDF or PPTX render of a skroll and returns immediately. Poll get_export until status is 'completed', then use its downloadUrl. Repeated requests within 10 minutes reuse the in-flight export. Only 'slides' skrolls can be exported.","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","format":"uuid","example":"0b1e0f7c-1c3f-4a0e-9f5a-1a2b3c4d5e6f"},"required":true,"name":"id","in":"path"}],"requestBody":{"description":"Request body","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateExportInput"}}}},"responses":{"202":{"description":"Export queued (or an in-flight one reused)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Export"}}}},"401":{"description":"Missing, malformed, unknown or revoked API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's creator lacks access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Input failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded. See the Retry-After header","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/exports/{id}":{"get":{"operationId":"get_export","tags":["Exports"],"summary":"Get export status","description":"Returns an export's status. Once 'completed', downloadUrl points at the authenticated file download.","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"The export","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Export"}}}},"401":{"description":"Missing, malformed, unknown or revoked API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's creator lacks access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Input failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded. See the Retry-After header","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/exports/{id}/download":{"get":{"operationId":"download_export","tags":["Exports"],"summary":"Download a completed export","description":"Redirects to the rendered file. Requires the same API key that requested the export.","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"}],"responses":{"302":{"description":"Redirect to the file"},"401":{"description":"Missing, malformed, unknown or revoked API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's creator lacks access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Export is not completed yet","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Input failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded. See the Retry-After header","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/brands":{"get":{"operationId":"list_brands","tags":["Brands"],"summary":"List brands","description":"Lists the organization's brands. A brand id is required to create a skroll.","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Brands, newest first","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Brand"}}}}},"401":{"description":"Missing, malformed, unknown or revoked API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's creator lacks access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Input failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded. See the Retry-After header","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"create_brand_from_url","tags":["Brands"],"summary":"Extract a brand from a website","description":"Scrapes a public website and synthesizes a brand book from it. Synchronous and slow (typically 30-90 seconds).","security":[{"bearerAuth":[]}],"requestBody":{"description":"Request body","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateBrandInput"}}}},"responses":{"201":{"description":"The created brand","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrandDetail"}}}},"401":{"description":"Missing, malformed, unknown or revoked API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's creator lacks access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Input failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded. See the Retry-After header","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/brands/{id}":{"get":{"operationId":"get_brand","tags":["Brands"],"summary":"Get a brand","description":"Returns a brand including its full brand book (palette, typography, voice, imagery).","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"The brand","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrandDetail"}}}},"401":{"description":"Missing, malformed, unknown or revoked API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's creator lacks access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Input failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded. See the Retry-After header","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"operationId":"delete_brand","tags":["Brands"],"summary":"Delete a brand","description":"Deletes a brand. Fails with 409 if any skroll still uses it.","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Deleted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Deleted"}}}},"401":{"description":"Missing, malformed, unknown or revoked API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's creator lacks access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Brand is still used by existing skrolls","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Input failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded. See the Retry-After header","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"webhooks":{}}