WordPress.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.
OpenClaw skills run inside an OpenClaw container. EasyClawd deploys and manages yours — no server setup needed.
- Added metadata block clarifying required environment variables and including a "clawdbot" emoji. - No changes made to code or API functionality. - Documentation now explicitly notes MATON_API_KEY is required.
---
name: wordpress
description: |
WordPress.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.
metadata:
author: maton
version: "1.0"
clawdbot:
emoji: 🧠
requires:
env:
- MATON_API_KEY
---
# WordPress.com
Access the WordPress.com REST API with managed OAuth authentication. Create and manage posts, pages, and site content on WordPress.com hosted sites.
## Quick Start
```bash
# 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
```
## Base URL
```
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}`.
## Authentication
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`:
```bash
export MATON_API_KEY="YOUR_API_KEY"
```
### Getting Your API Key
1. Sign in or create an account at [maton.ai](https://maton.ai)
2. Go to [maton.ai/settings](https://maton.ai/settings)
3. Copy your API key
## Connection Management
Manage your WordPress.com OAuth connections at `https://ctrl.maton.ai`.
### List Connections
```bash
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
```
### Create Connection
```bash
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
```
### Get Connection
```bash
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:**
```json
{
"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.
### Delete Connection
```bash
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
```
### Specifying Connection
If you have multiple WordPress.com connections, specify which one to use with the `Maton-Connection` header:
```bash
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.
## API Reference
### Sites
#### Get Site Information
```bash
GET /wordpress/rest/v1.1/sites/{site_id_or_domain}
```
**Response:**
```json
{
"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:
- Numeric site ID (e.g., `252505333`)
- Domain name (e.g., `myblog.wordpress.com` or `en.blog.wordpress.com`)
### Posts
#### List Posts
```bash
GET /wordpress/rest/v1.1/sites/{site}/posts
```
**Query Parameters:**
- `number` - Number of posts to return (default: 20, max: 100)
- `offset` - Offset for pagination
- `page` - Page number
- `page_handle` - Cursor for pagination (from response `meta.next_page`)
- `order` - Sort order: `DESC` or `ASC`
- `order_by` - Sort field: `date`, `modified`, `title`, `comment_count`, `ID`
- `status` - Post status: `publish`, `draft`, `pending`, `private`, `future`, `trash`, `any`
- `type` - Post type: `post`, `page`, `any`
- `search` - Search term
- `category` - Category slug
- `tag` - Tag slug
- `author` - Author ID
- `fields` - Comma-separated list of fields to return
**Response:**
```json
{
"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 Post
```bash
GET /wordpress/rest/v1.1/sites/{site}/posts/{post_id}
```
**Response:**
```json
{
"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"
}
}
}
```
#### Create Post
```bash
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 excerpt
- `status` - `publish`, `draft`, `pending`, `private`, `future`
- `date` - Post date (ISO 8601)
- `categories` - Comma-separated category names or slugs
- `tags` - Comma-separated tag names or slugs
- `format` - Post format: `standard`, `aside`, `chat`, `gallery`, `link`, `image`, `quote`, `status`, `video`, `audio`
- `slug` - URL slug
- `featured_image` - Featured image attachment ID
- `sticky` - Whether post is sticky (boolean)
- `password` - Password to protect post
**Response:**
```json
{
"ID": 123,
"site_ID": 252505333,
"title": "New Post Title",
"status": "draft",
"date": "2026-02-10T09:50:35+00:00"
}
```
#### Update Post
```bash
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.
#### Delete Post
```bashRead full documentation on ClawHub