Decks
8 endpoints for working with decks.
List skrolls
/deckslist_decksLists skrolls in the organization. Use scope=mine for those the API key's owner created.
Example request
curl -X GET https://skrollai.com/api/v1/decks \
-H "Authorization: Bearer sk_..."Parameters
| Parameter | In | Type | Description |
|---|---|---|---|
| scope | query | "mine" | "org" | n/a |
Responses
Array of Deck
| Field | Type | Description |
|---|---|---|
| id* | string (uuid) | n/a |
| title* | string | n/a |
| brandId* | string (uuid) | Brand whose look and feel the skroll uses |
| format* | "slides" | "webpage" | Fixed at creation: paged 16:9 slides, or a scrolling web page |
| visibility* | "private" | "org" | "public" | n/a |
| publicSlug* | string | null | Share slug; set on first publish and stable afterwards |
| organizationId* | string | n/a |
| ownerId* | string | n/a |
| createdAt* | string (date-time) | n/a |
| updatedAt* | string (date-time) | n/a |
Create a skroll
/deckscreate_deckCreates an empty skroll against one of the organization's brands. Call generate_deck afterwards to fill it in.
Example request
curl -X POST https://skrollai.com/api/v1/decks \
-H "Authorization: Bearer sk_..." \
-H "Content-Type: application/json" \
-d '{
"brandId": "0b1e0f7c-1c3f-4a0e-9f5a-1a2b3c4d5e6f",
"format": "slides"
}'Request body
| Field | Type | Description |
|---|---|---|
| brandId* | string (uuid) | Brand to style the skroll with. See list_brands |
| title | string | n/a |
| format | "slides" | "webpage" | n/a |
Responses
Deck
| Field | Type | Description |
|---|---|---|
| id* | string (uuid) | n/a |
| title* | string | n/a |
| brandId* | string (uuid) | Brand whose look and feel the skroll uses |
| format* | "slides" | "webpage" | Fixed at creation: paged 16:9 slides, or a scrolling web page |
| visibility* | "private" | "org" | "public" | n/a |
| publicSlug* | string | null | Share slug; set on first publish and stable afterwards |
| organizationId* | string | n/a |
| ownerId* | string | n/a |
| createdAt* | string (date-time) | n/a |
| updatedAt* | string (date-time) | n/a |
Get a skroll
/decks/{id}get_deckReturns a skroll's metadata plus the content of its latest version (deck-tsx source, compiled module and theme tokens).
Example request
curl -X GET https://skrollai.com/api/v1/decks/0b1e0f7c-1c3f-4a0e-9f5a-1a2b3c4d5e6f \
-H "Authorization: Bearer sk_..."Parameters
| Parameter | In | Type | Description |
|---|---|---|---|
| id* | path | string (uuid) | n/a |
Responses
Rename or publish a skroll
/decks/{id}update_deckUpdates title and/or visibility. Only the key creator's own skrolls can be modified. Setting visibility to 'public' mints a stable share slug.
Example request
curl -X PATCH https://skrollai.com/api/v1/decks/0b1e0f7c-1c3f-4a0e-9f5a-1a2b3c4d5e6f \
-H "Authorization: Bearer sk_..." \
-H "Content-Type: application/json" \
-d '{}'Parameters
| Parameter | In | Type | Description |
|---|---|---|---|
| id* | path | string (uuid) | n/a |
Request body
| Field | Type | Description |
|---|---|---|
| title | string | n/a |
| visibility | "private" | "org" | "public" | 'public' publishes the skroll at /d/{publicSlug} |
Responses
Deck
| Field | Type | Description |
|---|---|---|
| id* | string (uuid) | n/a |
| title* | string | n/a |
| brandId* | string (uuid) | Brand whose look and feel the skroll uses |
| format* | "slides" | "webpage" | Fixed at creation: paged 16:9 slides, or a scrolling web page |
| visibility* | "private" | "org" | "public" | n/a |
| publicSlug* | string | null | Share slug; set on first publish and stable afterwards |
| organizationId* | string | n/a |
| ownerId* | string | n/a |
| createdAt* | string (date-time) | n/a |
| updatedAt* | string (date-time) | n/a |
Delete a skroll
/decks/{id}delete_deckPermanently deletes a skroll and all of its versions. Only the key creator's own skrolls.
Example request
curl -X DELETE https://skrollai.com/api/v1/decks/0b1e0f7c-1c3f-4a0e-9f5a-1a2b3c4d5e6f \
-H "Authorization: Bearer sk_..."Parameters
| Parameter | In | Type | Description |
|---|---|---|---|
| id* | path | string (uuid) | n/a |
Responses
Deleted
| Field | Type | Description |
|---|---|---|
| deleted* | true | n/a |
Replace skroll content
/decks/{id}/contentset_deck_contentWrites 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.
Example request
curl -X PUT https://skrollai.com/api/v1/decks/0b1e0f7c-1c3f-4a0e-9f5a-1a2b3c4d5e6f/content \
-H "Authorization: Bearer sk_..." \
-H "Content-Type: application/json" \
-d '{
"source": "<source>"
}'Parameters
| Parameter | In | Type | Description |
|---|---|---|---|
| id* | path | string (uuid) | n/a |
Request body
| Field | Type | Description |
|---|---|---|
| source* | string | Deck-tsx module source (TSX) that default-exports the deck root, importing only the player's component vocabulary. Compiled server-side. |
| tokensCss | string | Theme tokens (:root CSS block, optionally preceded by Google Fonts @imports). Defaults to the latest version's tokens. |
| prompt | string | Note recorded alongside the version |
Responses
VersionWriteResult
| Field | Type | Description |
|---|---|---|
| id* | string (uuid) | n/a |
| version* | integer | n/a |
Generate skroll content with AI
/decks/{id}/generategenerate_deckRuns 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.
Example request
curl -X POST https://skrollai.com/api/v1/decks/0b1e0f7c-1c3f-4a0e-9f5a-1a2b3c4d5e6f/generate \
-H "Authorization: Bearer sk_..." \
-H "Content-Type: application/json" \
-d '{
"brief": "<brief>",
"mode": "revise"
}'Parameters
| Parameter | In | Type | Description |
|---|---|---|---|
| id* | path | string (uuid) | n/a |
Request body
| Field | Type | Description |
|---|---|---|
| brief* | string | What the skroll should contain or how to change it |
| mode | "create" | "revise" | 'create' writes the first version; 'revise' edits the latest one |
Responses
VersionWriteResult
| Field | Type | Description |
|---|---|---|
| id* | string (uuid) | n/a |
| version* | integer | n/a |
Edit skroll content with AI
/decks/{id}/editedit_deckApplies 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.
Example request
curl -X POST https://skrollai.com/api/v1/decks/0b1e0f7c-1c3f-4a0e-9f5a-1a2b3c4d5e6f/edit \
-H "Authorization: Bearer sk_..." \
-H "Content-Type: application/json" \
-d '{
"instruction": "<instruction>"
}'Parameters
| Parameter | In | Type | Description |
|---|---|---|---|
| id* | path | string (uuid) | n/a |
Request body
| Field | Type | Description |
|---|---|---|
| instruction* | string | 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. |
Responses
VersionWriteResult
| Field | Type | Description |
|---|---|---|
| id* | string (uuid) | n/a |
| version* | integer | n/a |