wordpress-apiWordPress.com API integration with managed OAuth. Manage posts, pages, sites, and content. Use this skill when users want to create, read, update, or delete WordPress.com posts, pages, or manage site content. For other third party apps, use the api-gateway skill (https://clawhub.ai/byungkyu/api-gateway). Requires network access and valid Maton API key.
Install via ClawdBot CLI:
clawdbot install byungkyu/wordpress-apiAccess the WordPress.com REST API with managed OAuth authentication. Create and manage posts, pages, and site content on WordPress.com hosted sites.
# List posts from a site
python <<'EOF'
import urllib.request, os, json
req = urllib.request.Request('https://gateway.maton.ai/wordpress/rest/v1.1/sites/{site_id}/posts?number=10')
req.add_header('Authorization', f'Bearer {os.environ["MATON_API_KEY"]}')
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
EOF
https://gateway.maton.ai/wordpress/rest/v1.1/{endpoint}
The gateway proxies requests to public-api.wordpress.com and automatically injects your OAuth token.
Note: WordPress.com uses the REST v1.1 API. Site-specific endpoints use the pattern /sites/{site_id_or_domain}/{resource}.
All requests require the Maton API key in the Authorization header:
Authorization: Bearer $MATON_API_KEY
Environment Variable: Set your API key as MATON_API_KEY:
export MATON_API_KEY="YOUR_API_KEY"
Manage your WordPress.com OAuth connections at https://ctrl.maton.ai.
python <<'EOF'
import urllib.request, os, json
req = urllib.request.Request('https://ctrl.maton.ai/connections?app=wordpress&status=ACTIVE')
req.add_header('Authorization', f'Bearer {os.environ["MATON_API_KEY"]}')
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
EOF
python <<'EOF'
import urllib.request, os, json
data = json.dumps({'app': 'wordpress'}).encode()
req = urllib.request.Request('https://ctrl.maton.ai/connections', data=data, method='POST')
req.add_header('Authorization', f'Bearer {os.environ["MATON_API_KEY"]}')
req.add_header('Content-Type', 'application/json')
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
EOF
python <<'EOF'
import urllib.request, os, json
req = urllib.request.Request('https://ctrl.maton.ai/connections/{connection_id}')
req.add_header('Authorization', f'Bearer {os.environ["MATON_API_KEY"]}')
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
EOF
Response:
{
"connection": {
"connection_id": "fb327990-1a43-4325-9c15-bad771b6a288",
"status": "ACTIVE",
"creation_time": "2026-02-10T07:46:26.908898Z",
"last_updated_time": "2026-02-10T07:49:33.440422Z",
"url": "https://connect.maton.ai/?session_token=...",
"app": "wordpress",
"metadata": {}
}
}
Open the returned url in a browser to complete OAuth authorization.
python <<'EOF'
import urllib.request, os, json
req = urllib.request.Request('https://ctrl.maton.ai/connections/{connection_id}', method='DELETE')
req.add_header('Authorization', f'Bearer {os.environ["MATON_API_KEY"]}')
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
EOF
If you have multiple WordPress.com connections, specify which one to use with the Maton-Connection header:
python <<'EOF'
import urllib.request, os, json
req = urllib.request.Request('https://gateway.maton.ai/wordpress/rest/v1.1/sites/{site_id}/posts')
req.add_header('Authorization', f'Bearer {os.environ["MATON_API_KEY"]}')
req.add_header('Maton-Connection', 'fb327990-1a43-4325-9c15-bad771b6a288')
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
EOF
If omitted, the gateway uses the default (oldest) active connection.
GET /wordpress/rest/v1.1/sites/{site_id_or_domain}
Response:
{
"ID": 252505333,
"name": "My Blog",
"description": "Just another WordPress.com site",
"URL": "https://myblog.wordpress.com",
"capabilities": {
"edit_pages": true,
"edit_posts": true,
"edit_others_posts": true,
"delete_posts": true
}
}
The site identifier can be either:
252505333)myblog.wordpress.com or en.blog.wordpress.com)GET /wordpress/rest/v1.1/sites/{site}/posts
Query Parameters:
number - Number of posts to return (default: 20, max: 100)offset - Offset for paginationpage - Page numberpage_handle - Cursor for pagination (from response meta.next_page)order - Sort order: DESC or ASCorder_by - Sort field: date, modified, title, comment_count, IDstatus - Post status: publish, draft, pending, private, future, trash, anytype - Post type: post, page, anysearch - Search termcategory - Category slugtag - Tag slugauthor - Author IDfields - Comma-separated list of fields to returnResponse:
{
"found": 150,
"posts": [
{
"ID": 83587,
"site_ID": 3584907,
"author": {
"ID": 257479511,
"login": "username",
"name": "John Doe"
},
"date": "2026-02-09T15:00:00+00:00",
"modified": "2026-02-09T16:30:00+00:00",
"title": "My Post Title",
"excerpt": "<p>Post excerpt...</p>",
"content": "<p>Full post content...</p>",
"slug": "my-post-title",
"status": "publish",
"type": "post",
"categories": {...},
"tags": {...}
}
],
"meta": {
"next_page": "value=2026-02-09T15%3A00%3A00%2B00%3A00&id=83587"
}
}
GET /wordpress/rest/v1.1/sites/{site}/posts/{post_id}
Response:
{
"ID": 83587,
"site_ID": 3584907,
"author": {...},
"date": "2026-02-09T15:00:00+00:00",
"title": "My Post Title",
"content": "<p>Full post content...</p>",
"slug": "my-post-title",
"status": "publish",
"type": "post",
"categories": {
"news": {
"ID": 123,
"name": "News",
"slug": "news"
}
},
"tags": {
"featured": {
"ID": 456,
"name": "Featured",
"slug": "featured"
}
}
}
POST /wordpress/rest/v1.1/sites/{site}/posts/new
Content-Type: application/json
{
"title": "New Post Title",
"content": "<p>Post content here...</p>",
"status": "draft",
"categories": "news, updates",
"tags": "featured, important"
}
Parameters:
title - Post title (required)content - Post content (HTML)excerpt - Post excerptstatus - publish, draft, pending, private, futuredate - Post date (ISO 8601)categories - Comma-separated category names or slugstags - Comma-separated tag names or slugsformat - Post format: standard, aside, chat, gallery, link, image, quote, status, video, audioslug - URL slugfeatured_image - Featured image attachment IDsticky - Whether post is sticky (boolean)password - Password to protect postResponse:
{
"ID": 123,
"site_ID": 252505333,
"title": "New Post Title",
"status": "draft",
"date": "2026-02-10T09:50:35+00:00"
}
POST /wordpress/rest/v1.1/sites/{site}/posts/{post_id}
Content-Type: application/json
{
"title": "Updated Title",
"content": "<p>Updated content...</p>"
}
Uses the same parameters as Create Post.
POST /wordpress/rest/v1.1/sites/{site}/posts/{post_id}/delete
Moves post to trash. Returns the deleted post with status: "trash".
Pages use the same endpoints as posts with type=page:
GET /wordpress/rest/v1.1/sites/{site}/posts?type=page
POST /wordpress/rest/v1.1/sites/{site}/posts/new?type=page
Content-Type: application/json
{
"title": "About Us",
"content": "<p>About page content...</p>",
"status": "publish"
}
GET /wordpress/rest/v1.1/sites/{site}/dropdown-pages/
Returns a simplified list of pages for dropdowns/menus.
GET /wordpress/rest/v1.1/sites/{site}/page-templates
Returns available page templates for the site's theme.
GET /wordpress/rest/v1.1/sites/{site}/posts/{post_id}/likes
Response:
{
"found": 99,
"i_like": false,
"can_like": true,
"site_ID": 3584907,
"post_ID": 83587,
"likes": [...]
}
POST /wordpress/rest/v1.1/sites/{site}/posts/{post_id}/likes/new
POST /wordpress/rest/v1.1/sites/{site}/posts/{post_id}/likes/mine/delete
GET /wordpress/rest/v1.1/sites/{site}/posts/{post_id}/reblogs/mine
Response:
{
"can_reblog": true,
"can_user_reblog": true,
"is_reblogged": false
}
GET /wordpress/rest/v1.1/sites/{site}/post-types
Response:
{
"found": 3,
"post_types": {
"post": {
"name": "post",
"label": "Posts",
"labels": {...}
},
"page": {
"name": "page",
"label": "Pages",
"labels": {...}
}
}
}
GET /wordpress/rest/v1.1/sites/{site}/post-counts/{post_type}
Example: /sites/{site}/post-counts/post or /sites/{site}/post-counts/page
Response:
{
"counts": {
"all": {"count": 150},
"publish": {"count": 120},
"draft": {"count": 25},
"trash": {"count": 5}
}
}
GET /wordpress/rest/v1.1/sites/{site}/users
Response:
{
"found": 3,
"users": [
{
"ID": 277004271,
"login": "username",
"name": "John Doe",
"email": "john@example.com",
"roles": ["administrator"]
}
]
}
GET /wordpress/rest/v1.1/me/settings
Response:
{
"enable_translator": true,
"surprise_me": false,
"holidaysnow": false,
"user_login": "username"
}
POST /wordpress/rest/v1.1/me/settings/
Content-Type: application/json
{
"enable_translator": false
}
GET /wordpress/rest/v1.1/me/likes
Response:
{
"found": 10,
"likes": [
{
"ID": 83587,
"site_ID": 3584907,
"title": "Liked Post Title"
}
]
}
GET /wordpress/rest/v1.1/sites/{site}/embeds
Returns available embed handlers for the site.
GET /wordpress/rest/v1.1/sites/{site}/shortcodes
Returns shortcodes available on the site.
WordPress.com uses cursor-based pagination with page_handle:
import os
import requests
headers = {
'Authorization': f'Bearer {os.environ["MATON_API_KEY"]}'
}
# Initial request
response = requests.get(
'https://gateway.maton.ai/wordpress/rest/v1.1/sites/{site}/posts',
headers=headers,
params={'number': 20}
)
result = response.json()
all_posts = result['posts']
# Continue with page_handle
while result.get('meta', {}).get('next_page'):
response = requests.get(
'https://gateway.maton.ai/wordpress/rest/v1.1/sites/{site}/posts',
headers=headers,
params={'number': 20, 'page_handle': result['meta']['next_page']}
)
result = response.json()
all_posts.extend(result['posts'])
print(f"Total posts: {len(all_posts)}")
Alternatively, use offset for simple pagination:
GET /wordpress/rest/v1.1/sites/{site}/posts?number=20&offset=20
const response = await fetch(
'https://gateway.maton.ai/wordpress/rest/v1.1/sites/{site}/posts?number=10',
{
headers: {
'Authorization': `Bearer ${process.env.MATON_API_KEY}`
}
}
);
const data = await response.json();
console.log(`Found ${data.found} posts`);
import os
import requests
response = requests.get(
'https://gateway.maton.ai/wordpress/rest/v1.1/sites/{site}/posts',
headers={'Authorization': f'Bearer {os.environ["MATON_API_KEY"]}'},
params={'number': 10, 'status': 'publish'}
)
data = response.json()
print(f"Found {data['found']} posts")
import os
import requests
response = requests.post(
'https://gateway.maton.ai/wordpress/rest/v1.1/sites/{site}/posts/new',
headers={
'Authorization': f'Bearer {os.environ["MATON_API_KEY"]}',
'Content-Type': 'application/json'
},
json={
'title': 'My New Post',
'content': '<p>Hello World!</p>',
'status': 'draft',
'categories': 'news',
'tags': 'hello, first-post'
}
)
post = response.json()
print(f"Created post ID: {post['ID']}")
/posts/{id} update the post (not PUT/PATCH)/posts/{id}/delete (not HTTP DELETE)jq or other commands, environment variables like $MATON_API_KEY may not expand correctly in some shell environments| Status | Meaning |
|--------|---------|
| 400 | Missing WordPress connection or bad request |
| 401 | Invalid or missing Maton API key |
| 403 | Insufficient permissions or OAuth scope |
| 404 | Site or resource not found |
| 429 | Rate limited |
| 4xx/5xx | Passthrough error from WordPress.com API |
Error responses include details:
{
"error": "unauthorized",
"message": "User cannot view users for specified site"
}
MATON_API_KEY environment variable is set:echo $MATON_API_KEY
python <<'EOF'
import urllib.request, os, json
req = urllib.request.Request('https://ctrl.maton.ai/connections')
req.add_header('Authorization', f'Bearer {os.environ["MATON_API_KEY"]}')
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
EOF
wordpress. For example:https://gateway.maton.ai/wordpress/rest/v1.1/sites/{site_id}/postshttps://gateway.maton.ai/rest/v1.1/sites/{site_id}/postsGenerated Mar 1, 2026
Agencies managing multiple client blogs on WordPress.com can automate post scheduling, updates, and content audits. This skill enables bulk operations like fetching posts for review, updating outdated content, and tracking publication metrics across sites, streamlining client reporting and workflow.
Online stores using WordPress.com for product blogs can dynamically create posts for new items, update descriptions, and manage promotional content. This integration allows syncing product launches with blog announcements, enhancing SEO and customer engagement through automated content management.
Schools or universities hosting news portals on WordPress.com can automate posting of announcements, event updates, and research highlights. The skill facilitates content moderation, draft management, and multi-author coordination, ensuring timely dissemination of information to students and staff.
Non-profits running awareness campaigns on WordPress.com blogs can use this skill to schedule posts, track engagement metrics, and update content based on real-time feedback. It supports managing volunteer contributions and ensuring consistent messaging across fundraising or advocacy efforts.
Freelancers maintaining a portfolio blog on WordPress.com can automate posting of new work samples, update project details, and manage client-specific content. This skill helps in organizing posts by category or tag, improving visibility and streamlining content updates for professional branding.
A subscription-based platform that integrates this skill to offer automated WordPress.com content management for small businesses. It provides features like scheduled posting, analytics, and multi-site support, generating revenue through monthly or annual licensing fees.
Marketing agencies bundle this skill into service packages for clients needing WordPress.com automation. Revenue comes from setup fees, ongoing management contracts, and premium support tiers, leveraging the skill to reduce manual effort and scale client accounts efficiently.
A free tool that uses this skill for basic WordPress.com post management, with premium upgrades for advanced features like bulk editing, API integrations, and priority support. Monetization is driven by upselling to paid plans and affiliate marketing for related services.
💬 Integration Tip
Ensure the MATON_API_KEY is securely stored as an environment variable and test connection management via ctrl.maton.ai before automating API calls to avoid authentication issues.
OpenClaw skill that provides a WordPress REST API CLI for posts, pages, categories, tags, users, and custom requests using plain HTTP.
Publish content directly to WordPress sites via REST API with full Gutenberg block support. Create and publish posts/pages, auto-load and select categories from website, generate SEO-optimized tags, preview articles before publishing, and generate Gutenberg blocks for tables, images, lists, and rich formatting. Use when user wants to publish to WordPress, post to blog, create WordPress article, update WordPress post, or convert markdown to Gutenberg blocks.
Use when developing WordPress themes, plugins, customizing Gutenberg blocks, implementing WooCommerce features, or optimizing WordPress performance and security.
Manage WordPress sites via MCP (Model Context Protocol) through AI Engine. Use for creating/editing posts, SEO analysis, analytics, media management, taxonomy operations, social media scheduling, multilingual content (Polylang), and any WordPress admin task. Requires AI Engine plugin (free) with MCP Server enabled. Also use when asked about WordPress site management, content workflows, or WP-related tasks.
写文章并发布到 CSDN。使用浏览器自动化 + 扫码登录。支持通过 Telegram 发送二维码,无需 VNC。集成 blog-writer 写作方法论,产出高质量、有个人风格的技术文章。
Convert a WordPress website to a static site and deploy to Cloudflare Pages. Mirrors the rendered HTML via SSH, extracts only referenced assets (shrinks 1.5GB+ to ~25MB), fixes URLs, self-hosts fonts, strips WordPress cruft, and deploys. Use when migrating a WordPress site to static hosting.