{
  "schemaVersion": "1.0",
  "item": {
    "slug": "wordpress-api",
    "name": "WordPress",
    "source": "tencent",
    "type": "skill",
    "category": "开发工具",
    "sourceUrl": "https://clawhub.ai/byungkyu/wordpress-api",
    "canonicalUrl": "https://clawhub.ai/byungkyu/wordpress-api",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadMode": "redirect",
    "downloadUrl": "/downloads/wordpress-api",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=wordpress-api",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "installMethod": "Manual import",
    "extraction": "Extract archive",
    "prerequisites": [
      "OpenClaw"
    ],
    "packageFormat": "ZIP package",
    "includedAssets": [
      "SKILL.md",
      "LICENSE.txt"
    ],
    "primaryDoc": "SKILL.md",
    "quickSetup": [
      "Download the package from Yavira.",
      "Extract the archive and review SKILL.md first.",
      "Import or place the package into your OpenClaw setup."
    ],
    "agentAssist": {
      "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
      "steps": [
        "Download the package from Yavira.",
        "Extract it into a folder your agent can access.",
        "Paste one of the prompts below and point your agent at the extracted folder."
      ],
      "prompts": [
        {
          "label": "New install",
          "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete."
        },
        {
          "label": "Upgrade existing",
          "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run."
        }
      ]
    },
    "sourceHealth": {
      "source": "tencent",
      "slug": "wordpress-api",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-05-11T03:55:02.061Z",
      "expiresAt": "2026-05-18T03:55:02.061Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=wordpress-api",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=wordpress-api",
        "contentDisposition": "attachment; filename=\"wordpress-api-1.0.2.zip\"",
        "redirectLocation": null,
        "bodySnippet": null,
        "slug": "wordpress-api"
      },
      "scope": "item",
      "summary": "Item download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this item.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/wordpress-api"
    },
    "validation": {
      "installChecklist": [
        "Use the Yavira download entry.",
        "Review SKILL.md after the package is downloaded.",
        "Confirm the extracted package contains the expected setup assets."
      ],
      "postInstallChecks": [
        "Confirm the extracted package includes the expected docs or setup files.",
        "Validate the skill or prompts are available in your target agent workspace.",
        "Capture any manual follow-up steps the agent could not complete."
      ]
    },
    "downloadPageUrl": "https://openagent3.xyz/downloads/wordpress-api",
    "agentPageUrl": "https://openagent3.xyz/skills/wordpress-api/agent",
    "manifestUrl": "https://openagent3.xyz/skills/wordpress-api/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/wordpress-api/agent.md"
  },
  "agentAssist": {
    "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
    "steps": [
      "Download the package from Yavira.",
      "Extract it into a folder your agent can access.",
      "Paste one of the prompts below and point your agent at the extracted folder."
    ],
    "prompts": [
      {
        "label": "New install",
        "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete."
      },
      {
        "label": "Upgrade existing",
        "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run."
      }
    ]
  },
  "documentation": {
    "source": "clawhub",
    "primaryDoc": "SKILL.md",
    "sections": [
      {
        "title": "WordPress.com",
        "body": "Access the WordPress.com REST API with managed OAuth authentication. Create and manage posts, pages, and site content on WordPress.com hosted sites."
      },
      {
        "title": "Quick Start",
        "body": "# List posts from a site\npython <<'EOF'\nimport urllib.request, os, json\nreq = urllib.request.Request('https://gateway.maton.ai/wordpress/rest/v1.1/sites/{site_id}/posts?number=10')\nreq.add_header('Authorization', f'Bearer {os.environ[\"MATON_API_KEY\"]}')\nprint(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))\nEOF"
      },
      {
        "title": "Base URL",
        "body": "https://gateway.maton.ai/wordpress/rest/v1.1/{endpoint}\n\nThe gateway proxies requests to public-api.wordpress.com and automatically injects your OAuth token.\n\nNote: WordPress.com uses the REST v1.1 API. Site-specific endpoints use the pattern /sites/{site_id_or_domain}/{resource}."
      },
      {
        "title": "Authentication",
        "body": "All requests require the Maton API key in the Authorization header:\n\nAuthorization: Bearer $MATON_API_KEY\n\nEnvironment Variable: Set your API key as MATON_API_KEY:\n\nexport MATON_API_KEY=\"YOUR_API_KEY\""
      },
      {
        "title": "Getting Your API Key",
        "body": "Sign in or create an account at maton.ai\nGo to maton.ai/settings\nCopy your API key"
      },
      {
        "title": "Connection Management",
        "body": "Manage your WordPress.com OAuth connections at https://ctrl.maton.ai."
      },
      {
        "title": "List Connections",
        "body": "python <<'EOF'\nimport urllib.request, os, json\nreq = urllib.request.Request('https://ctrl.maton.ai/connections?app=wordpress&status=ACTIVE')\nreq.add_header('Authorization', f'Bearer {os.environ[\"MATON_API_KEY\"]}')\nprint(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))\nEOF"
      },
      {
        "title": "Create Connection",
        "body": "python <<'EOF'\nimport urllib.request, os, json\ndata = json.dumps({'app': 'wordpress'}).encode()\nreq = urllib.request.Request('https://ctrl.maton.ai/connections', data=data, method='POST')\nreq.add_header('Authorization', f'Bearer {os.environ[\"MATON_API_KEY\"]}')\nreq.add_header('Content-Type', 'application/json')\nprint(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))\nEOF"
      },
      {
        "title": "Get Connection",
        "body": "python <<'EOF'\nimport urllib.request, os, json\nreq = urllib.request.Request('https://ctrl.maton.ai/connections/{connection_id}')\nreq.add_header('Authorization', f'Bearer {os.environ[\"MATON_API_KEY\"]}')\nprint(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))\nEOF\n\nResponse:\n\n{\n  \"connection\": {\n    \"connection_id\": \"fb327990-1a43-4325-9c15-bad771b6a288\",\n    \"status\": \"ACTIVE\",\n    \"creation_time\": \"2026-02-10T07:46:26.908898Z\",\n    \"last_updated_time\": \"2026-02-10T07:49:33.440422Z\",\n    \"url\": \"https://connect.maton.ai/?session_token=...\",\n    \"app\": \"wordpress\",\n    \"metadata\": {}\n  }\n}\n\nOpen the returned url in a browser to complete OAuth authorization."
      },
      {
        "title": "Delete Connection",
        "body": "python <<'EOF'\nimport urllib.request, os, json\nreq = urllib.request.Request('https://ctrl.maton.ai/connections/{connection_id}', method='DELETE')\nreq.add_header('Authorization', f'Bearer {os.environ[\"MATON_API_KEY\"]}')\nprint(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))\nEOF"
      },
      {
        "title": "Specifying Connection",
        "body": "If you have multiple WordPress.com connections, specify which one to use with the Maton-Connection header:\n\npython <<'EOF'\nimport urllib.request, os, json\nreq = urllib.request.Request('https://gateway.maton.ai/wordpress/rest/v1.1/sites/{site_id}/posts')\nreq.add_header('Authorization', f'Bearer {os.environ[\"MATON_API_KEY\"]}')\nreq.add_header('Maton-Connection', 'fb327990-1a43-4325-9c15-bad771b6a288')\nprint(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))\nEOF\n\nIf omitted, the gateway uses the default (oldest) active connection."
      },
      {
        "title": "Sites",
        "body": "Get Site Information\n\nGET /wordpress/rest/v1.1/sites/{site_id_or_domain}\n\nResponse:\n\n{\n  \"ID\": 252505333,\n  \"name\": \"My Blog\",\n  \"description\": \"Just another WordPress.com site\",\n  \"URL\": \"https://myblog.wordpress.com\",\n  \"capabilities\": {\n    \"edit_pages\": true,\n    \"edit_posts\": true,\n    \"edit_others_posts\": true,\n    \"delete_posts\": true\n  }\n}\n\nThe site identifier can be either:\n\nNumeric site ID (e.g., 252505333)\nDomain name (e.g., myblog.wordpress.com or en.blog.wordpress.com)"
      },
      {
        "title": "Posts",
        "body": "List Posts\n\nGET /wordpress/rest/v1.1/sites/{site}/posts\n\nQuery Parameters:\n\nnumber - Number of posts to return (default: 20, max: 100)\noffset - Offset for pagination\npage - Page number\npage_handle - Cursor for pagination (from response meta.next_page)\norder - Sort order: DESC or ASC\norder_by - Sort field: date, modified, title, comment_count, ID\nstatus - Post status: publish, draft, pending, private, future, trash, any\ntype - Post type: post, page, any\nsearch - Search term\ncategory - Category slug\ntag - Tag slug\nauthor - Author ID\nfields - Comma-separated list of fields to return\n\nResponse:\n\n{\n  \"found\": 150,\n  \"posts\": [\n    {\n      \"ID\": 83587,\n      \"site_ID\": 3584907,\n      \"author\": {\n        \"ID\": 257479511,\n        \"login\": \"username\",\n        \"name\": \"John Doe\"\n      },\n      \"date\": \"2026-02-09T15:00:00+00:00\",\n      \"modified\": \"2026-02-09T16:30:00+00:00\",\n      \"title\": \"My Post Title\",\n      \"excerpt\": \"<p>Post excerpt...</p>\",\n      \"content\": \"<p>Full post content...</p>\",\n      \"slug\": \"my-post-title\",\n      \"status\": \"publish\",\n      \"type\": \"post\",\n      \"categories\": {...},\n      \"tags\": {...}\n    }\n  ],\n  \"meta\": {\n    \"next_page\": \"value=2026-02-09T15%3A00%3A00%2B00%3A00&id=83587\"\n  }\n}\n\nGet Post\n\nGET /wordpress/rest/v1.1/sites/{site}/posts/{post_id}\n\nResponse:\n\n{\n  \"ID\": 83587,\n  \"site_ID\": 3584907,\n  \"author\": {...},\n  \"date\": \"2026-02-09T15:00:00+00:00\",\n  \"title\": \"My Post Title\",\n  \"content\": \"<p>Full post content...</p>\",\n  \"slug\": \"my-post-title\",\n  \"status\": \"publish\",\n  \"type\": \"post\",\n  \"categories\": {\n    \"news\": {\n      \"ID\": 123,\n      \"name\": \"News\",\n      \"slug\": \"news\"\n    }\n  },\n  \"tags\": {\n    \"featured\": {\n      \"ID\": 456,\n      \"name\": \"Featured\",\n      \"slug\": \"featured\"\n    }\n  }\n}\n\nCreate Post\n\nPOST /wordpress/rest/v1.1/sites/{site}/posts/new\nContent-Type: application/json\n\n{\n  \"title\": \"New Post Title\",\n  \"content\": \"<p>Post content here...</p>\",\n  \"status\": \"draft\",\n  \"categories\": \"news, updates\",\n  \"tags\": \"featured, important\"\n}\n\nParameters:\n\ntitle - Post title (required)\ncontent - Post content (HTML)\nexcerpt - Post excerpt\nstatus - publish, draft, pending, private, future\ndate - Post date (ISO 8601)\ncategories - Comma-separated category names or slugs\ntags - Comma-separated tag names or slugs\nformat - Post format: standard, aside, chat, gallery, link, image, quote, status, video, audio\nslug - URL slug\nfeatured_image - Featured image attachment ID\nsticky - Whether post is sticky (boolean)\npassword - Password to protect post\n\nResponse:\n\n{\n  \"ID\": 123,\n  \"site_ID\": 252505333,\n  \"title\": \"New Post Title\",\n  \"status\": \"draft\",\n  \"date\": \"2026-02-10T09:50:35+00:00\"\n}\n\nUpdate Post\n\nPOST /wordpress/rest/v1.1/sites/{site}/posts/{post_id}\nContent-Type: application/json\n\n{\n  \"title\": \"Updated Title\",\n  \"content\": \"<p>Updated content...</p>\"\n}\n\nUses the same parameters as Create Post.\n\nDelete Post\n\nPOST /wordpress/rest/v1.1/sites/{site}/posts/{post_id}/delete\n\nMoves post to trash. Returns the deleted post with status: \"trash\"."
      },
      {
        "title": "Pages",
        "body": "Pages use the same endpoints as posts with type=page:\n\nList Pages\n\nGET /wordpress/rest/v1.1/sites/{site}/posts?type=page\n\nCreate Page\n\nPOST /wordpress/rest/v1.1/sites/{site}/posts/new?type=page\nContent-Type: application/json\n\n{\n  \"title\": \"About Us\",\n  \"content\": \"<p>About page content...</p>\",\n  \"status\": \"publish\"\n}\n\nGet Page Dropdown List\n\nGET /wordpress/rest/v1.1/sites/{site}/dropdown-pages/\n\nReturns a simplified list of pages for dropdowns/menus.\n\nGet Page Templates\n\nGET /wordpress/rest/v1.1/sites/{site}/page-templates\n\nReturns available page templates for the site's theme."
      },
      {
        "title": "Post Likes",
        "body": "Get Post Likes\n\nGET /wordpress/rest/v1.1/sites/{site}/posts/{post_id}/likes\n\nResponse:\n\n{\n  \"found\": 99,\n  \"i_like\": false,\n  \"can_like\": true,\n  \"site_ID\": 3584907,\n  \"post_ID\": 83587,\n  \"likes\": [...]\n}\n\nLike Post\n\nPOST /wordpress/rest/v1.1/sites/{site}/posts/{post_id}/likes/new\n\nUnlike Post\n\nPOST /wordpress/rest/v1.1/sites/{site}/posts/{post_id}/likes/mine/delete"
      },
      {
        "title": "Post Reblogs",
        "body": "Check Reblog Status\n\nGET /wordpress/rest/v1.1/sites/{site}/posts/{post_id}/reblogs/mine\n\nResponse:\n\n{\n  \"can_reblog\": true,\n  \"can_user_reblog\": true,\n  \"is_reblogged\": false\n}"
      },
      {
        "title": "Post Types",
        "body": "List Post Types\n\nGET /wordpress/rest/v1.1/sites/{site}/post-types\n\nResponse:\n\n{\n  \"found\": 3,\n  \"post_types\": {\n    \"post\": {\n      \"name\": \"post\",\n      \"label\": \"Posts\",\n      \"labels\": {...}\n    },\n    \"page\": {\n      \"name\": \"page\",\n      \"label\": \"Pages\",\n      \"labels\": {...}\n    }\n  }\n}"
      },
      {
        "title": "Post Counts",
        "body": "Get Post Counts\n\nGET /wordpress/rest/v1.1/sites/{site}/post-counts/{post_type}\n\nExample: /sites/{site}/post-counts/post or /sites/{site}/post-counts/page\n\nResponse:\n\n{\n  \"counts\": {\n    \"all\": {\"count\": 150},\n    \"publish\": {\"count\": 120},\n    \"draft\": {\"count\": 25},\n    \"trash\": {\"count\": 5}\n  }\n}"
      },
      {
        "title": "Users",
        "body": "List Site Users\n\nGET /wordpress/rest/v1.1/sites/{site}/users\n\nResponse:\n\n{\n  \"found\": 3,\n  \"users\": [\n    {\n      \"ID\": 277004271,\n      \"login\": \"username\",\n      \"name\": \"John Doe\",\n      \"email\": \"john@example.com\",\n      \"roles\": [\"administrator\"]\n    }\n  ]\n}"
      },
      {
        "title": "User Settings",
        "body": "Get User Settings\n\nGET /wordpress/rest/v1.1/me/settings\n\nResponse:\n\n{\n  \"enable_translator\": true,\n  \"surprise_me\": false,\n  \"holidaysnow\": false,\n  \"user_login\": \"username\"\n}\n\nUpdate User Settings\n\nPOST /wordpress/rest/v1.1/me/settings/\nContent-Type: application/json\n\n{\n  \"enable_translator\": false\n}"
      },
      {
        "title": "User Likes",
        "body": "Get User's Liked Posts\n\nGET /wordpress/rest/v1.1/me/likes\n\nResponse:\n\n{\n  \"found\": 10,\n  \"likes\": [\n    {\n      \"ID\": 83587,\n      \"site_ID\": 3584907,\n      \"title\": \"Liked Post Title\"\n    }\n  ]\n}"
      },
      {
        "title": "Embeds",
        "body": "Get Site Embeds\n\nGET /wordpress/rest/v1.1/sites/{site}/embeds\n\nReturns available embed handlers for the site."
      },
      {
        "title": "Shortcodes",
        "body": "Get Available Shortcodes\n\nGET /wordpress/rest/v1.1/sites/{site}/shortcodes\n\nReturns shortcodes available on the site."
      },
      {
        "title": "Pagination",
        "body": "WordPress.com uses cursor-based pagination with page_handle:\n\nimport os\nimport requests\n\nheaders = {\n    'Authorization': f'Bearer {os.environ[\"MATON_API_KEY\"]}'\n}\n\n# Initial request\nresponse = requests.get(\n    'https://gateway.maton.ai/wordpress/rest/v1.1/sites/{site}/posts',\n    headers=headers,\n    params={'number': 20}\n)\nresult = response.json()\nall_posts = result['posts']\n\n# Continue with page_handle\nwhile result.get('meta', {}).get('next_page'):\n    response = requests.get(\n        'https://gateway.maton.ai/wordpress/rest/v1.1/sites/{site}/posts',\n        headers=headers,\n        params={'number': 20, 'page_handle': result['meta']['next_page']}\n    )\n    result = response.json()\n    all_posts.extend(result['posts'])\n\nprint(f\"Total posts: {len(all_posts)}\")\n\nAlternatively, use offset for simple pagination:\n\nGET /wordpress/rest/v1.1/sites/{site}/posts?number=20&offset=20"
      },
      {
        "title": "JavaScript",
        "body": "const response = await fetch(\n  'https://gateway.maton.ai/wordpress/rest/v1.1/sites/{site}/posts?number=10',\n  {\n    headers: {\n      'Authorization': `Bearer ${process.env.MATON_API_KEY}`\n    }\n  }\n);\nconst data = await response.json();\nconsole.log(`Found ${data.found} posts`);"
      },
      {
        "title": "Python",
        "body": "import os\nimport requests\n\nresponse = requests.get(\n    'https://gateway.maton.ai/wordpress/rest/v1.1/sites/{site}/posts',\n    headers={'Authorization': f'Bearer {os.environ[\"MATON_API_KEY\"]}'},\n    params={'number': 10, 'status': 'publish'}\n)\ndata = response.json()\nprint(f\"Found {data['found']} posts\")"
      },
      {
        "title": "Python (Create Post)",
        "body": "import os\nimport requests\n\nresponse = requests.post(\n    'https://gateway.maton.ai/wordpress/rest/v1.1/sites/{site}/posts/new',\n    headers={\n        'Authorization': f'Bearer {os.environ[\"MATON_API_KEY\"]}',\n        'Content-Type': 'application/json'\n    },\n    json={\n        'title': 'My New Post',\n        'content': '<p>Hello World!</p>',\n        'status': 'draft',\n        'categories': 'news',\n        'tags': 'hello, first-post'\n    }\n)\npost = response.json()\nprint(f\"Created post ID: {post['ID']}\")"
      },
      {
        "title": "Notes",
        "body": "WordPress.com API uses REST v1.1 (not v2)\nSite identifiers can be numeric IDs or domain names\nPOST requests to /posts/{id} update the post (not PUT/PATCH)\nDELETE uses POST to /posts/{id}/delete (not HTTP DELETE)\nCategories and tags are created automatically when referenced in posts\nDate/time values are in ISO 8601 format\nAll content is HTML-formatted\nIMPORTANT: When piping curl output to jq or other commands, environment variables like $MATON_API_KEY may not expand correctly in some shell environments"
      },
      {
        "title": "Error Handling",
        "body": "StatusMeaning400Missing WordPress connection or bad request401Invalid or missing Maton API key403Insufficient permissions or OAuth scope404Site or resource not found429Rate limited4xx/5xxPassthrough error from WordPress.com API\n\nError responses include details:\n\n{\n  \"error\": \"unauthorized\",\n  \"message\": \"User cannot view users for specified site\"\n}"
      },
      {
        "title": "Troubleshooting: API Key Issues",
        "body": "Check that the MATON_API_KEY environment variable is set:\n\necho $MATON_API_KEY\n\nVerify the API key is valid by listing connections:\n\npython <<'EOF'\nimport urllib.request, os, json\nreq = urllib.request.Request('https://ctrl.maton.ai/connections')\nreq.add_header('Authorization', f'Bearer {os.environ[\"MATON_API_KEY\"]}')\nprint(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))\nEOF"
      },
      {
        "title": "Troubleshooting: Invalid App Name",
        "body": "Ensure your URL path starts with wordpress. For example:\n\nCorrect: https://gateway.maton.ai/wordpress/rest/v1.1/sites/{site_id}/posts\nIncorrect: https://gateway.maton.ai/rest/v1.1/sites/{site_id}/posts"
      },
      {
        "title": "Resources",
        "body": "WordPress.com REST API Overview\nGetting Started Guide\nAPI Reference\nOAuth Authentication\nMaton Community\nMaton Support"
      }
    ],
    "body": "WordPress.com\n\nAccess the WordPress.com REST API with managed OAuth authentication. Create and manage posts, pages, and site content on WordPress.com hosted sites.\n\nQuick Start\n# List posts from a site\npython <<'EOF'\nimport urllib.request, os, json\nreq = urllib.request.Request('https://gateway.maton.ai/wordpress/rest/v1.1/sites/{site_id}/posts?number=10')\nreq.add_header('Authorization', f'Bearer {os.environ[\"MATON_API_KEY\"]}')\nprint(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))\nEOF\n\nBase URL\nhttps://gateway.maton.ai/wordpress/rest/v1.1/{endpoint}\n\n\nThe gateway proxies requests to public-api.wordpress.com and automatically injects your OAuth token.\n\nNote: WordPress.com uses the REST v1.1 API. Site-specific endpoints use the pattern /sites/{site_id_or_domain}/{resource}.\n\nAuthentication\n\nAll requests require the Maton API key in the Authorization header:\n\nAuthorization: Bearer $MATON_API_KEY\n\n\nEnvironment Variable: Set your API key as MATON_API_KEY:\n\nexport MATON_API_KEY=\"YOUR_API_KEY\"\n\nGetting Your API Key\nSign in or create an account at maton.ai\nGo to maton.ai/settings\nCopy your API key\nConnection Management\n\nManage your WordPress.com OAuth connections at https://ctrl.maton.ai.\n\nList Connections\npython <<'EOF'\nimport urllib.request, os, json\nreq = urllib.request.Request('https://ctrl.maton.ai/connections?app=wordpress&status=ACTIVE')\nreq.add_header('Authorization', f'Bearer {os.environ[\"MATON_API_KEY\"]}')\nprint(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))\nEOF\n\nCreate Connection\npython <<'EOF'\nimport urllib.request, os, json\ndata = json.dumps({'app': 'wordpress'}).encode()\nreq = urllib.request.Request('https://ctrl.maton.ai/connections', data=data, method='POST')\nreq.add_header('Authorization', f'Bearer {os.environ[\"MATON_API_KEY\"]}')\nreq.add_header('Content-Type', 'application/json')\nprint(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))\nEOF\n\nGet Connection\npython <<'EOF'\nimport urllib.request, os, json\nreq = urllib.request.Request('https://ctrl.maton.ai/connections/{connection_id}')\nreq.add_header('Authorization', f'Bearer {os.environ[\"MATON_API_KEY\"]}')\nprint(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))\nEOF\n\n\nResponse:\n\n{\n  \"connection\": {\n    \"connection_id\": \"fb327990-1a43-4325-9c15-bad771b6a288\",\n    \"status\": \"ACTIVE\",\n    \"creation_time\": \"2026-02-10T07:46:26.908898Z\",\n    \"last_updated_time\": \"2026-02-10T07:49:33.440422Z\",\n    \"url\": \"https://connect.maton.ai/?session_token=...\",\n    \"app\": \"wordpress\",\n    \"metadata\": {}\n  }\n}\n\n\nOpen the returned url in a browser to complete OAuth authorization.\n\nDelete Connection\npython <<'EOF'\nimport urllib.request, os, json\nreq = urllib.request.Request('https://ctrl.maton.ai/connections/{connection_id}', method='DELETE')\nreq.add_header('Authorization', f'Bearer {os.environ[\"MATON_API_KEY\"]}')\nprint(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))\nEOF\n\nSpecifying Connection\n\nIf you have multiple WordPress.com connections, specify which one to use with the Maton-Connection header:\n\npython <<'EOF'\nimport urllib.request, os, json\nreq = urllib.request.Request('https://gateway.maton.ai/wordpress/rest/v1.1/sites/{site_id}/posts')\nreq.add_header('Authorization', f'Bearer {os.environ[\"MATON_API_KEY\"]}')\nreq.add_header('Maton-Connection', 'fb327990-1a43-4325-9c15-bad771b6a288')\nprint(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))\nEOF\n\n\nIf omitted, the gateway uses the default (oldest) active connection.\n\nAPI Reference\nSites\nGet Site Information\nGET /wordpress/rest/v1.1/sites/{site_id_or_domain}\n\n\nResponse:\n\n{\n  \"ID\": 252505333,\n  \"name\": \"My Blog\",\n  \"description\": \"Just another WordPress.com site\",\n  \"URL\": \"https://myblog.wordpress.com\",\n  \"capabilities\": {\n    \"edit_pages\": true,\n    \"edit_posts\": true,\n    \"edit_others_posts\": true,\n    \"delete_posts\": true\n  }\n}\n\n\nThe site identifier can be either:\n\nNumeric site ID (e.g., 252505333)\nDomain name (e.g., myblog.wordpress.com or en.blog.wordpress.com)\nPosts\nList Posts\nGET /wordpress/rest/v1.1/sites/{site}/posts\n\n\nQuery Parameters:\n\nnumber - Number of posts to return (default: 20, max: 100)\noffset - Offset for pagination\npage - Page number\npage_handle - Cursor for pagination (from response meta.next_page)\norder - Sort order: DESC or ASC\norder_by - Sort field: date, modified, title, comment_count, ID\nstatus - Post status: publish, draft, pending, private, future, trash, any\ntype - Post type: post, page, any\nsearch - Search term\ncategory - Category slug\ntag - Tag slug\nauthor - Author ID\nfields - Comma-separated list of fields to return\n\nResponse:\n\n{\n  \"found\": 150,\n  \"posts\": [\n    {\n      \"ID\": 83587,\n      \"site_ID\": 3584907,\n      \"author\": {\n        \"ID\": 257479511,\n        \"login\": \"username\",\n        \"name\": \"John Doe\"\n      },\n      \"date\": \"2026-02-09T15:00:00+00:00\",\n      \"modified\": \"2026-02-09T16:30:00+00:00\",\n      \"title\": \"My Post Title\",\n      \"excerpt\": \"<p>Post excerpt...</p>\",\n      \"content\": \"<p>Full post content...</p>\",\n      \"slug\": \"my-post-title\",\n      \"status\": \"publish\",\n      \"type\": \"post\",\n      \"categories\": {...},\n      \"tags\": {...}\n    }\n  ],\n  \"meta\": {\n    \"next_page\": \"value=2026-02-09T15%3A00%3A00%2B00%3A00&id=83587\"\n  }\n}\n\nGet Post\nGET /wordpress/rest/v1.1/sites/{site}/posts/{post_id}\n\n\nResponse:\n\n{\n  \"ID\": 83587,\n  \"site_ID\": 3584907,\n  \"author\": {...},\n  \"date\": \"2026-02-09T15:00:00+00:00\",\n  \"title\": \"My Post Title\",\n  \"content\": \"<p>Full post content...</p>\",\n  \"slug\": \"my-post-title\",\n  \"status\": \"publish\",\n  \"type\": \"post\",\n  \"categories\": {\n    \"news\": {\n      \"ID\": 123,\n      \"name\": \"News\",\n      \"slug\": \"news\"\n    }\n  },\n  \"tags\": {\n    \"featured\": {\n      \"ID\": 456,\n      \"name\": \"Featured\",\n      \"slug\": \"featured\"\n    }\n  }\n}\n\nCreate Post\nPOST /wordpress/rest/v1.1/sites/{site}/posts/new\nContent-Type: application/json\n\n{\n  \"title\": \"New Post Title\",\n  \"content\": \"<p>Post content here...</p>\",\n  \"status\": \"draft\",\n  \"categories\": \"news, updates\",\n  \"tags\": \"featured, important\"\n}\n\n\nParameters:\n\ntitle - Post title (required)\ncontent - Post content (HTML)\nexcerpt - Post excerpt\nstatus - publish, draft, pending, private, future\ndate - Post date (ISO 8601)\ncategories - Comma-separated category names or slugs\ntags - Comma-separated tag names or slugs\nformat - Post format: standard, aside, chat, gallery, link, image, quote, status, video, audio\nslug - URL slug\nfeatured_image - Featured image attachment ID\nsticky - Whether post is sticky (boolean)\npassword - Password to protect post\n\nResponse:\n\n{\n  \"ID\": 123,\n  \"site_ID\": 252505333,\n  \"title\": \"New Post Title\",\n  \"status\": \"draft\",\n  \"date\": \"2026-02-10T09:50:35+00:00\"\n}\n\nUpdate Post\nPOST /wordpress/rest/v1.1/sites/{site}/posts/{post_id}\nContent-Type: application/json\n\n{\n  \"title\": \"Updated Title\",\n  \"content\": \"<p>Updated content...</p>\"\n}\n\n\nUses the same parameters as Create Post.\n\nDelete Post\nPOST /wordpress/rest/v1.1/sites/{site}/posts/{post_id}/delete\n\n\nMoves post to trash. Returns the deleted post with status: \"trash\".\n\nPages\n\nPages use the same endpoints as posts with type=page:\n\nList Pages\nGET /wordpress/rest/v1.1/sites/{site}/posts?type=page\n\nCreate Page\nPOST /wordpress/rest/v1.1/sites/{site}/posts/new?type=page\nContent-Type: application/json\n\n{\n  \"title\": \"About Us\",\n  \"content\": \"<p>About page content...</p>\",\n  \"status\": \"publish\"\n}\n\nGet Page Dropdown List\nGET /wordpress/rest/v1.1/sites/{site}/dropdown-pages/\n\n\nReturns a simplified list of pages for dropdowns/menus.\n\nGet Page Templates\nGET /wordpress/rest/v1.1/sites/{site}/page-templates\n\n\nReturns available page templates for the site's theme.\n\nPost Likes\nGet Post Likes\nGET /wordpress/rest/v1.1/sites/{site}/posts/{post_id}/likes\n\n\nResponse:\n\n{\n  \"found\": 99,\n  \"i_like\": false,\n  \"can_like\": true,\n  \"site_ID\": 3584907,\n  \"post_ID\": 83587,\n  \"likes\": [...]\n}\n\nLike Post\nPOST /wordpress/rest/v1.1/sites/{site}/posts/{post_id}/likes/new\n\nUnlike Post\nPOST /wordpress/rest/v1.1/sites/{site}/posts/{post_id}/likes/mine/delete\n\nPost Reblogs\nCheck Reblog Status\nGET /wordpress/rest/v1.1/sites/{site}/posts/{post_id}/reblogs/mine\n\n\nResponse:\n\n{\n  \"can_reblog\": true,\n  \"can_user_reblog\": true,\n  \"is_reblogged\": false\n}\n\nPost Types\nList Post Types\nGET /wordpress/rest/v1.1/sites/{site}/post-types\n\n\nResponse:\n\n{\n  \"found\": 3,\n  \"post_types\": {\n    \"post\": {\n      \"name\": \"post\",\n      \"label\": \"Posts\",\n      \"labels\": {...}\n    },\n    \"page\": {\n      \"name\": \"page\",\n      \"label\": \"Pages\",\n      \"labels\": {...}\n    }\n  }\n}\n\nPost Counts\nGet Post Counts\nGET /wordpress/rest/v1.1/sites/{site}/post-counts/{post_type}\n\n\nExample: /sites/{site}/post-counts/post or /sites/{site}/post-counts/page\n\nResponse:\n\n{\n  \"counts\": {\n    \"all\": {\"count\": 150},\n    \"publish\": {\"count\": 120},\n    \"draft\": {\"count\": 25},\n    \"trash\": {\"count\": 5}\n  }\n}\n\nUsers\nList Site Users\nGET /wordpress/rest/v1.1/sites/{site}/users\n\n\nResponse:\n\n{\n  \"found\": 3,\n  \"users\": [\n    {\n      \"ID\": 277004271,\n      \"login\": \"username\",\n      \"name\": \"John Doe\",\n      \"email\": \"john@example.com\",\n      \"roles\": [\"administrator\"]\n    }\n  ]\n}\n\nUser Settings\nGet User Settings\nGET /wordpress/rest/v1.1/me/settings\n\n\nResponse:\n\n{\n  \"enable_translator\": true,\n  \"surprise_me\": false,\n  \"holidaysnow\": false,\n  \"user_login\": \"username\"\n}\n\nUpdate User Settings\nPOST /wordpress/rest/v1.1/me/settings/\nContent-Type: application/json\n\n{\n  \"enable_translator\": false\n}\n\nUser Likes\nGet User's Liked Posts\nGET /wordpress/rest/v1.1/me/likes\n\n\nResponse:\n\n{\n  \"found\": 10,\n  \"likes\": [\n    {\n      \"ID\": 83587,\n      \"site_ID\": 3584907,\n      \"title\": \"Liked Post Title\"\n    }\n  ]\n}\n\nEmbeds\nGet Site Embeds\nGET /wordpress/rest/v1.1/sites/{site}/embeds\n\n\nReturns available embed handlers for the site.\n\nShortcodes\nGet Available Shortcodes\nGET /wordpress/rest/v1.1/sites/{site}/shortcodes\n\n\nReturns shortcodes available on the site.\n\nPagination\n\nWordPress.com uses cursor-based pagination with page_handle:\n\nimport os\nimport requests\n\nheaders = {\n    'Authorization': f'Bearer {os.environ[\"MATON_API_KEY\"]}'\n}\n\n# Initial request\nresponse = requests.get(\n    'https://gateway.maton.ai/wordpress/rest/v1.1/sites/{site}/posts',\n    headers=headers,\n    params={'number': 20}\n)\nresult = response.json()\nall_posts = result['posts']\n\n# Continue with page_handle\nwhile result.get('meta', {}).get('next_page'):\n    response = requests.get(\n        'https://gateway.maton.ai/wordpress/rest/v1.1/sites/{site}/posts',\n        headers=headers,\n        params={'number': 20, 'page_handle': result['meta']['next_page']}\n    )\n    result = response.json()\n    all_posts.extend(result['posts'])\n\nprint(f\"Total posts: {len(all_posts)}\")\n\n\nAlternatively, use offset for simple pagination:\n\nGET /wordpress/rest/v1.1/sites/{site}/posts?number=20&offset=20\n\nCode Examples\nJavaScript\nconst response = await fetch(\n  'https://gateway.maton.ai/wordpress/rest/v1.1/sites/{site}/posts?number=10',\n  {\n    headers: {\n      'Authorization': `Bearer ${process.env.MATON_API_KEY}`\n    }\n  }\n);\nconst data = await response.json();\nconsole.log(`Found ${data.found} posts`);\n\nPython\nimport os\nimport requests\n\nresponse = requests.get(\n    'https://gateway.maton.ai/wordpress/rest/v1.1/sites/{site}/posts',\n    headers={'Authorization': f'Bearer {os.environ[\"MATON_API_KEY\"]}'},\n    params={'number': 10, 'status': 'publish'}\n)\ndata = response.json()\nprint(f\"Found {data['found']} posts\")\n\nPython (Create Post)\nimport os\nimport requests\n\nresponse = requests.post(\n    'https://gateway.maton.ai/wordpress/rest/v1.1/sites/{site}/posts/new',\n    headers={\n        'Authorization': f'Bearer {os.environ[\"MATON_API_KEY\"]}',\n        'Content-Type': 'application/json'\n    },\n    json={\n        'title': 'My New Post',\n        'content': '<p>Hello World!</p>',\n        'status': 'draft',\n        'categories': 'news',\n        'tags': 'hello, first-post'\n    }\n)\npost = response.json()\nprint(f\"Created post ID: {post['ID']}\")\n\nNotes\nWordPress.com API uses REST v1.1 (not v2)\nSite identifiers can be numeric IDs or domain names\nPOST requests to /posts/{id} update the post (not PUT/PATCH)\nDELETE uses POST to /posts/{id}/delete (not HTTP DELETE)\nCategories and tags are created automatically when referenced in posts\nDate/time values are in ISO 8601 format\nAll content is HTML-formatted\nIMPORTANT: When piping curl output to jq or other commands, environment variables like $MATON_API_KEY may not expand correctly in some shell environments\nError Handling\nStatus\tMeaning\n400\tMissing WordPress connection or bad request\n401\tInvalid or missing Maton API key\n403\tInsufficient permissions or OAuth scope\n404\tSite or resource not found\n429\tRate limited\n4xx/5xx\tPassthrough error from WordPress.com API\n\nError responses include details:\n\n{\n  \"error\": \"unauthorized\",\n  \"message\": \"User cannot view users for specified site\"\n}\n\nTroubleshooting: API Key Issues\nCheck that the MATON_API_KEY environment variable is set:\necho $MATON_API_KEY\n\nVerify the API key is valid by listing connections:\npython <<'EOF'\nimport urllib.request, os, json\nreq = urllib.request.Request('https://ctrl.maton.ai/connections')\nreq.add_header('Authorization', f'Bearer {os.environ[\"MATON_API_KEY\"]}')\nprint(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))\nEOF\n\nTroubleshooting: Invalid App Name\nEnsure your URL path starts with wordpress. For example:\nCorrect: https://gateway.maton.ai/wordpress/rest/v1.1/sites/{site_id}/posts\nIncorrect: https://gateway.maton.ai/rest/v1.1/sites/{site_id}/posts\nResources\nWordPress.com REST API Overview\nGetting Started Guide\nAPI Reference\nOAuth Authentication\nMaton Community\nMaton Support"
  },
  "trust": {
    "sourceLabel": "tencent",
    "provenanceUrl": "https://clawhub.ai/byungkyu/wordpress-api",
    "publisherUrl": "https://clawhub.ai/byungkyu/wordpress-api",
    "owner": "byungkyu",
    "version": "1.0.1",
    "license": null,
    "verificationStatus": "Indexed source record"
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/wordpress-api",
    "downloadUrl": "https://openagent3.xyz/downloads/wordpress-api",
    "agentUrl": "https://openagent3.xyz/skills/wordpress-api/agent",
    "manifestUrl": "https://openagent3.xyz/skills/wordpress-api/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/wordpress-api/agent.md"
  }
}