REST API
The Webstory REST API, for scripts and apps that don't use MCP: base address, sign-in, lists, errors and every endpoint.
The REST API does the same things as the agent tools, with the same permissions and the same limits. Use it from scripts and apps that don't speak MCP.
Base address
https://webstoryapp.com/api/v1/agent
Sign in
Get a token with OAuth, exactly as for an agent, with https://webstoryapp.com/api/v1/agent as the resource. See Authentication. Send it on every request:
Authorization: Bearer <access token>
Conventions
- JSON in and out, with
snake_casefield names. - Path parts such as
{story_id}are arguments. Other arguments go in the query string (GET) or a JSON body (POST, PUT). - Lists take
limit(1 to 50, default 20) andcursor, and answernext_cursor, which is null on the last page. - Errors come back as
{ "error": "…", "code": "…" }with an HTTP status. See Errors. - Requests that change something take an
Idempotency-Keyheader. Send the same value when you retry, so the change isn't made twice. - Times are ISO 8601 in UTC. Lengths are in seconds.
Endpoints
| Method | Path | Tool | Scope |
|---|---|---|---|
GET | /api/v1/agent/workspace | get_workspace | Any |
GET | /api/v1/agent/stories | list_stories | stories:read |
GET | /api/v1/agent/stories/{story_id} | get_story | stories:read |
GET | /api/v1/agent/stories/{story_id}/reels/{reel_id} | get_reel | stories:read |
GET | /api/v1/agent/stories/{story_id}/reels/{reel_id}/share | get_reel_share | stories:read |
POST | /api/v1/agent/stories/{story_id}/reels/{reel_id}/share-links | create_share_link | stories:share |
GET | /api/v1/agent/stories/{story_id}/stats | get_story_stats | insights:read |
GET | /api/v1/agent/comments | list_comments | comments:read |
GET | /api/v1/agent/chats | list_chats | chats:read |
GET | /api/v1/agent/chats/{chat_id} | get_chat | chats:read |
GET | /api/v1/agent/orders | list_orders | orders:read |
GET | /api/v1/agent/orders/{order_id} | get_order | orders:read |
PUT | /api/v1/agent/notification-endpoint | set_notification_endpoint | notifications |
GET | /api/v1/agent/brands | list_brands | stories:read |
POST | /api/v1/agent/stories | create_story | stories:edit |
PATCH | /api/v1/agent/stories/{story_id} | update_story | stories:edit |
POST | /api/v1/agent/stories/{story_id}/reels | add_reels | stories:edit |
PATCH | /api/v1/agent/stories/{story_id}/reels/{reel_id} | update_reel | stories:edit |
POST | /api/v1/agent/stories/{story_id}/reels/{reel_id}/move | move_reel | stories:edit |
POST | /api/v1/agent/stories/{story_id}/reels/{reel_id}/duplicate | duplicate_reel | stories:edit |
DELETE | /api/v1/agent/stories/{story_id}/reels/{reel_id} | remove_reel | stories:edit |
POST | /api/v1/agent/stories/{story_id}/replace-text | replace_text | stories:edit |
GET | /api/v1/agent/stories/{story_id}/preview | create_preview | stories:read |
GET | /api/v1/agent/media | list_media | media:read |
POST | /api/v1/agent/media/imports | import_media | media:upload |
POST | /api/v1/agent/media/files | upload_file | media:upload |
POST | /api/v1/agent/media/uploads | create_upload | media:upload |
POST | /api/v1/agent/media/upload-pages | create_upload_page | media:upload |
GET | /api/v1/agent/stories/{story_id}/reels/{reel_id}/elements | list_reel_elements | stories:read |
PUT | /api/v1/agent/stories/{story_id}/reels/{reel_id}/buttons | set_button | stories:edit |
DELETE | /api/v1/agent/stories/{story_id}/reels/{reel_id}/buttons/{button_id} | remove_button | stories:edit |
PUT | /api/v1/agent/stories/{story_id}/side-buttons | set_side_button | stories:edit |
GET | /api/v1/agent/changes | list_changes | stories:read |
POST | /api/v1/agent/changes/{change_id}/undo | undo_change | stories:edit |
OpenAPI
The OpenAPI description of the REST API is at /openapi.json, generated from the same definitions as the server. Webstory also serves it at https://webstoryapp.com/api/v1/openapi.json.