Upload a story image
const url = 'https://example.com/api/stories/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/assets';const form = new FormData();form.append('file', 'file');
const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
options.body = form;
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/api/stories/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/assets \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: multipart/form-data' \ --form file=@fileUpload an image, the multipart part file, for the story’s blocks or
cover (owner or admin).
PNG, JPEG and WebP, told apart by their bytes. It’s stored as sRGB WebP
without its metadata. 400 story_image_unreadable, 413
story_image_too_large, 415 story_image_unsupported, 409
story_asset_limit or story_asset_owner_limit, 503 story_image_busy.
Readers get it once a published block or the cover uses it.
Authorizations
Section titled “ Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “ Path Parameters ”Request Bodyrequired
Section titled “ Request Bodyrequired ”object
Responses
Section titled “ Responses ”Successful Response
object
Served at /stories/{story_id}/assets/{id} as WebP.
Size of the stored image in all its sizes.
Example generated
{ "id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "width": 1, "height": 1, "byte_size": 1, "created_at": "2026-04-15T12:00:00Z"}Bad request — invalid payload
Unauthorized — missing or invalid credentials
Forbidden — caller lacks write access
Not found
The story already holds its most images or bytes (detail.code story_asset_limit), its owner’s stories hold the most image bytes the admin allows (story_asset_owner_limit), or another change holds its lock.
Payload too large
Not a PNG, JPEG or WebP image
Validation error
Too many requests — retry after the advertised interval
Headers
Section titled “ Headers ”Seconds until the request may be retried
Internal server error
Bad gateway — an upstream provider failed
Other images are being processed (detail.code story_image_busy); retry after Retry-After seconds.