Introduction
The Web Stories for WordPress REST API provides programmatic access to create, read, update, and delete web stories, manage media, fonts, templates, and plugin settings. The API follows WordPress REST API conventions and extends the core functionality.Base URL
All API endpoints are prefixed with:web-stories/v1 and follows WordPress REST API standards.
Authentication
The Web Stories REST API uses WordPress’s built-in authentication mechanisms:Cookie Authentication
For requests from the same domain (e.g., from the WordPress admin), cookie authentication is used automatically. You must include a nonce in your requests:Application Passwords
For external applications, use WordPress Application Passwords with Basic Authentication:OAuth / Third-Party Plugins
You can also use OAuth authentication plugins compatible with the WordPress REST API.Common Request Headers
Set to
application/json for POST/PUT/PATCH requestsRequired for cookie authentication from same domain
For Basic Auth:
Basic base64(username:password)Common Response Fields
All successful API responses return appropriate HTTP status codes:200 OK- Successful GET, PUT, or PATCH request201 Created- Successful POST request that creates a resource204 No Content- Successful DELETE request400 Bad Request- Invalid request parameters401 Unauthorized- Authentication required403 Forbidden- Authenticated but insufficient permissions404 Not Found- Resource does not exist500 Internal Server Error- Server error
Error Responses
Error responses follow the WordPress REST API error format:Machine-readable error code
Human-readable error message
Additional error context
Common Error Codes
| Error Code | Description |
|---|---|
rest_forbidden | User lacks permission to perform the action |
rest_invalid_param | Invalid parameter provided |
rest_post_invalid_id | Invalid post ID |
rest_cannot_create | Cannot create resource |
rest_cannot_edit | Cannot edit resource |
rest_cannot_delete | Cannot delete resource |
rest_empty_content | Required content is missing |
Permissions
API endpoints respect WordPress capabilities:- Read stories: Requires
readcapability - Create stories: Requires
edit_web-storiescapability - Edit stories: Requires
edit_web-storyoredit_others_web-storiescapability - Delete stories: Requires
delete_web-storyordelete_others_web-storiescapability - Manage fonts: Requires
edit_web-storiescapability - Upload media: Requires
upload_filescapability
Pagination
Collection endpoints support pagination via query parameters:Current page number
Number of items per page (max 100)
Embedding
Use the_embed parameter to include related resources in the response:
- Author information
- Featured media
- Taxonomies (categories, tags)
- Publisher logo
Filtering and Sorting
Most collection endpoints support filtering and sorting:Search term to filter results
Filter by author user ID
Filter by post status (publish, draft, pending, etc.)
Sort by field (date, title, modified, author, etc.)
Sort order:
asc or descAvailable Endpoints
The Web Stories REST API provides the following endpoint groups:Core Endpoints (Documented)
- Stories - Create and manage web stories (CRUD operations)
- Media - Upload and manage media assets for stories
- Templates - Access page templates for story creation
- Fonts - Manage custom fonts for stories
- Settings - Configure plugin settings
Additional Endpoints
The following endpoints are also available but detailed documentation is forthcoming:- Embed (
/embed) - Fetch story metadata from URLs for embedding external stories - Link (
/link) - Parse URL metadata for link insertion in stories - Hotlinking (
/hotlink) - Validate and proxy external media URLs - Products (
/products) - Search and retrieve product data for shopping features - Publisher Logos (
/publisher-logos) - Manage publisher logo assets - Stories Lock (
/web-story/:id/lock) - Manage story edit locks to prevent concurrent editing - Stories Autosaves (
/web-story/:id/autosaves) - Manage story autosaves - Status Check (
/status-check) - Check system requirements and plugin status
Rate Limiting
The API inherits any rate limiting configured on your WordPress installation. By default, WordPress does not impose rate limits, but you may configure them using plugins or server-level configurations.Versioning
The current API version isv1. The version is included in the URL path. Future versions will be released as v2, v3, etc., maintaining backward compatibility.