{
  "schemaVersion": "1.0",
  "item": {
    "slug": "confluence-api",
    "name": "Confluence",
    "source": "tencent",
    "type": "skill",
    "category": "开发工具",
    "sourceUrl": "https://clawhub.ai/byungkyu/confluence-api",
    "canonicalUrl": "https://clawhub.ai/byungkyu/confluence-api",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadMode": "redirect",
    "downloadUrl": "/downloads/confluence-api",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=confluence-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",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-04-30T16:55:25.780Z",
      "expiresAt": "2026-05-07T16:55:25.780Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=network",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=network",
        "contentDisposition": "attachment; filename=\"network-1.0.0.zip\"",
        "redirectLocation": null,
        "bodySnippet": null
      },
      "scope": "source",
      "summary": "Source download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this source.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/confluence-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/confluence-api",
    "agentPageUrl": "https://openagent3.xyz/skills/confluence-api/agent",
    "manifestUrl": "https://openagent3.xyz/skills/confluence-api/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/confluence-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": "Confluence",
        "body": "Access the Confluence Cloud API with managed OAuth authentication. Manage pages, spaces, blogposts, comments, attachments, and properties."
      },
      {
        "title": "Quick Start",
        "body": "# List pages in your Confluence site\npython3 <<'EOF'\nimport urllib.request, os, json\n\n# First get your Cloud ID\nreq = urllib.request.Request('https://gateway.maton.ai/confluence/oauth/token/accessible-resources')\nreq.add_header('Authorization', f'Bearer {os.environ[\"MATON_API_KEY\"]}')\nresources = json.load(urllib.request.urlopen(req))\ncloud_id = resources[0]['id']\n\n# Then list pages\nreq = urllib.request.Request(f'https://gateway.maton.ai/confluence/ex/confluence/{cloud_id}/wiki/api/v2/pages')\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/confluence/{atlassian-api-path}\n\nConfluence Cloud uses two URL patterns:\n\nV2 API (recommended):\n\nhttps://gateway.maton.ai/confluence/ex/confluence/{cloudId}/wiki/api/v2/{resource}\n\nV1 REST API (limited):\n\nhttps://gateway.maton.ai/confluence/ex/confluence/{cloudId}/wiki/rest/api/{resource}\n\nThe {cloudId} is required for all API calls. Obtain it via the accessible-resources endpoint (see below)."
      },
      {
        "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 Confluence OAuth connections at https://ctrl.maton.ai."
      },
      {
        "title": "List Connections",
        "body": "python3 <<'EOF'\nimport urllib.request, os, json\nreq = urllib.request.Request('https://ctrl.maton.ai/connections?app=confluence&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": "python3 <<'EOF'\nimport urllib.request, os, json\ndata = json.dumps({'app': 'confluence'}).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": "python3 <<'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\": \"6cb7787f-7c32-4658-a3c3-4ddf1367a4ce\",\n    \"status\": \"ACTIVE\",\n    \"creation_time\": \"2026-02-13T00:00:00.000000Z\",\n    \"last_updated_time\": \"2026-02-13T00:00:00.000000Z\",\n    \"url\": \"https://connect.maton.ai/?session_token=...\",\n    \"app\": \"confluence\",\n    \"metadata\": {}\n  }\n}\n\nOpen the returned url in a browser to complete OAuth authorization."
      },
      {
        "title": "Delete Connection",
        "body": "python3 <<'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 Confluence connections, specify which one to use with the Maton-Connection header:\n\npython3 <<'EOF'\nimport urllib.request, os, json\ncloud_id = \"YOUR_CLOUD_ID\"\nreq = urllib.request.Request(f'https://gateway.maton.ai/confluence/ex/confluence/{cloud_id}/wiki/api/v2/pages')\nreq.add_header('Authorization', f'Bearer {os.environ[\"MATON_API_KEY\"]}')\nreq.add_header('Maton-Connection', '6cb7787f-7c32-4658-a3c3-4ddf1367a4ce')\nprint(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))\nEOF\n\nIf omitted, the gateway uses the default (oldest) active connection."
      },
      {
        "title": "Getting Your Cloud ID",
        "body": "Before making API calls, you must obtain your Confluence Cloud ID:\n\npython3 <<'EOF'\nimport urllib.request, os, json\nreq = urllib.request.Request('https://gateway.maton.ai/confluence/oauth/token/accessible-resources')\nreq.add_header('Authorization', f'Bearer {os.environ[\"MATON_API_KEY\"]}')\nresources = json.load(urllib.request.urlopen(req))\nprint(json.dumps(resources, indent=2))\n# Use resources[0]['id'] as your cloudId\nEOF\n\nResponse:\n\n[\n  {\n    \"id\": \"62909843-b784-4c35-b770-e4e2a26f024b\",\n    \"name\": \"your-site-name\",\n    \"url\": \"https://your-site.atlassian.net\",\n    \"scopes\": [\"read:confluence-content.all\", \"write:confluence-content\", ...],\n    \"avatarUrl\": \"https://...\"\n  }\n]"
      },
      {
        "title": "API Reference",
        "body": "All V2 API endpoints use the base path:\n\n/confluence/ex/confluence/{cloudId}/wiki/api/v2"
      },
      {
        "title": "Pages",
        "body": "List Pages\n\nGET /pages\nGET /pages?space-id={spaceId}\nGET /pages?limit=25\nGET /pages?status=current\nGET /pages?body-format=storage\n\nResponse:\n\n{\n  \"results\": [\n    {\n      \"id\": \"98391\",\n      \"status\": \"current\",\n      \"title\": \"My Page\",\n      \"spaceId\": \"98306\",\n      \"parentId\": \"98305\",\n      \"parentType\": \"page\",\n      \"authorId\": \"557058:...\",\n      \"createdAt\": \"2026-02-12T23:00:00.000Z\",\n      \"version\": {\n        \"number\": 1,\n        \"authorId\": \"557058:...\",\n        \"createdAt\": \"2026-02-12T23:00:00.000Z\"\n      },\n      \"_links\": {\n        \"webui\": \"/spaces/SPACEKEY/pages/98391/My+Page\"\n      }\n    }\n  ],\n  \"_links\": {\n    \"next\": \"/wiki/api/v2/pages?cursor=...\"\n  }\n}\n\nGet Page\n\nGET /pages/{pageId}\nGET /pages/{pageId}?body-format=storage\nGET /pages/{pageId}?body-format=atlas_doc_format\nGET /pages/{pageId}?body-format=view\n\nBody formats:\n\nstorage - Confluence storage format (XML-like)\natlas_doc_format - Atlassian Document Format (JSON)\nview - Rendered HTML\n\nCreate Page\n\nPOST /pages\nContent-Type: application/json\n\n{\n  \"spaceId\": \"98306\",\n  \"status\": \"current\",\n  \"title\": \"New Page Title\",\n  \"body\": {\n    \"representation\": \"storage\",\n    \"value\": \"<p>Page content in storage format</p>\"\n  }\n}\n\nTo create a child page, include parentId:\n\n{\n  \"spaceId\": \"98306\",\n  \"parentId\": \"98391\",\n  \"status\": \"current\",\n  \"title\": \"Child Page\",\n  \"body\": {\n    \"representation\": \"storage\",\n    \"value\": \"<p>Child page content</p>\"\n  }\n}\n\nResponse:\n\n{\n  \"id\": \"98642\",\n  \"status\": \"current\",\n  \"title\": \"New Page Title\",\n  \"spaceId\": \"98306\",\n  \"version\": {\n    \"number\": 1\n  }\n}\n\nUpdate Page\n\nPUT /pages/{pageId}\nContent-Type: application/json\n\n{\n  \"id\": \"98391\",\n  \"status\": \"current\",\n  \"title\": \"Updated Page Title\",\n  \"body\": {\n    \"representation\": \"storage\",\n    \"value\": \"<p>Updated content</p>\"\n  },\n  \"version\": {\n    \"number\": 2,\n    \"message\": \"Updated via API\"\n  }\n}\n\nNote: You must increment the version number with each update.\n\nDelete Page\n\nDELETE /pages/{pageId}\n\nReturns 204 No Content on success.\n\nGet Page Children\n\nGET /pages/{pageId}/children\n\nGet Page Versions\n\nGET /pages/{pageId}/versions\n\nGet Page Labels\n\nGET /pages/{pageId}/labels\n\nGet Page Attachments\n\nGET /pages/{pageId}/attachments\n\nGet Page Comments\n\nGET /pages/{pageId}/footer-comments\n\nGet Page Properties\n\nGET /pages/{pageId}/properties\nGET /pages/{pageId}/properties/{propertyId}\n\nCreate Page Property\n\nPOST /pages/{pageId}/properties\nContent-Type: application/json\n\n{\n  \"key\": \"my-property-key\",\n  \"value\": {\"customKey\": \"customValue\"}\n}\n\nUpdate Page Property\n\nPUT /pages/{pageId}/properties/{propertyId}\nContent-Type: application/json\n\n{\n  \"key\": \"my-property-key\",\n  \"value\": {\"customKey\": \"updatedValue\"},\n  \"version\": {\"number\": 2}\n}\n\nDelete Page Property\n\nDELETE /pages/{pageId}/properties/{propertyId}"
      },
      {
        "title": "Spaces",
        "body": "List Spaces\n\nGET /spaces\nGET /spaces?limit=25\nGET /spaces?type=global\n\nResponse:\n\n{\n  \"results\": [\n    {\n      \"id\": \"98306\",\n      \"key\": \"SPACEKEY\",\n      \"name\": \"Space Name\",\n      \"type\": \"global\",\n      \"status\": \"current\",\n      \"authorId\": \"557058:...\",\n      \"createdAt\": \"2026-02-12T23:00:00.000Z\",\n      \"homepageId\": \"98305\",\n      \"_links\": {\n        \"webui\": \"/spaces/SPACEKEY\"\n      }\n    }\n  ]\n}\n\nGet Space\n\nGET /spaces/{spaceId}\n\nGet Space Pages\n\nGET /spaces/{spaceId}/pages\n\nGet Space Blogposts\n\nGET /spaces/{spaceId}/blogposts\n\nGet Space Properties\n\nGET /spaces/{spaceId}/properties\n\nCreate Space Property\n\nPOST /spaces/{spaceId}/properties\nContent-Type: application/json\n\n{\n  \"key\": \"space-property-key\",\n  \"value\": {\"key\": \"value\"}\n}\n\nGet Space Permissions\n\nGET /spaces/{spaceId}/permissions\n\nGet Space Labels\n\nGET /spaces/{spaceId}/labels"
      },
      {
        "title": "Blogposts",
        "body": "List Blogposts\n\nGET /blogposts\nGET /blogposts?space-id={spaceId}\nGET /blogposts?limit=25\n\nGet Blogpost\n\nGET /blogposts/{blogpostId}\nGET /blogposts/{blogpostId}?body-format=storage\n\nCreate Blogpost\n\nPOST /blogposts\nContent-Type: application/json\n\n{\n  \"spaceId\": \"98306\",\n  \"title\": \"My Blog Post\",\n  \"body\": {\n    \"representation\": \"storage\",\n    \"value\": \"<p>Blog post content</p>\"\n  }\n}\n\nUpdate Blogpost\n\nPUT /blogposts/{blogpostId}\nContent-Type: application/json\n\n{\n  \"id\": \"458753\",\n  \"status\": \"current\",\n  \"title\": \"Updated Blog Post\",\n  \"body\": {\n    \"representation\": \"storage\",\n    \"value\": \"<p>Updated content</p>\"\n  },\n  \"version\": {\n    \"number\": 2\n  }\n}\n\nDelete Blogpost\n\nDELETE /blogposts/{blogpostId}\n\nGet Blogpost Labels\n\nGET /blogposts/{blogpostId}/labels\n\nGet Blogpost Versions\n\nGET /blogposts/{blogpostId}/versions\n\nGet Blogpost Comments\n\nGET /blogposts/{blogpostId}/footer-comments"
      },
      {
        "title": "Comments",
        "body": "List Footer Comments\n\nGET /footer-comments\nGET /footer-comments?body-format=storage\n\nGet Comment\n\nGET /footer-comments/{commentId}\n\nCreate Footer Comment\n\nPOST /footer-comments\nContent-Type: application/json\n\n{\n  \"pageId\": \"98391\",\n  \"body\": {\n    \"representation\": \"storage\",\n    \"value\": \"<p>Comment text</p>\"\n  }\n}\n\nFor blogpost comments:\n\n{\n  \"blogpostId\": \"458753\",\n  \"body\": {\n    \"representation\": \"storage\",\n    \"value\": \"<p>Comment on blogpost</p>\"\n  }\n}\n\nUpdate Comment\n\nPUT /footer-comments/{commentId}\nContent-Type: application/json\n\n{\n  \"version\": {\"number\": 2},\n  \"body\": {\n    \"representation\": \"storage\",\n    \"value\": \"<p>Updated comment</p>\"\n  }\n}\n\nDelete Comment\n\nDELETE /footer-comments/{commentId}\n\nGet Comment Replies\n\nGET /footer-comments/{commentId}/children\n\nList Inline Comments\n\nGET /inline-comments"
      },
      {
        "title": "Attachments",
        "body": "List Attachments\n\nGET /attachments\nGET /attachments?limit=25\n\nGet Attachment\n\nGET /attachments/{attachmentId}\n\nGet Page Attachments\n\nGET /pages/{pageId}/attachments"
      },
      {
        "title": "Tasks",
        "body": "List Tasks\n\nGET /tasks\n\nGet Task\n\nGET /tasks/{taskId}"
      },
      {
        "title": "Labels",
        "body": "List Labels\n\nGET /labels\nGET /labels?prefix=global"
      },
      {
        "title": "Custom Content",
        "body": "List Custom Content\n\nGET /custom-content\nGET /custom-content?type={customContentType}"
      },
      {
        "title": "User (V1 API)",
        "body": "The current user endpoint uses the V1 REST API:\n\nGET /confluence/ex/confluence/{cloudId}/wiki/rest/api/user/current\n\nResponse:\n\n{\n  \"type\": \"known\",\n  \"accountId\": \"557058:...\",\n  \"accountType\": \"atlassian\",\n  \"email\": \"user@example.com\",\n  \"publicName\": \"User Name\",\n  \"displayName\": \"User Name\"\n}"
      },
      {
        "title": "Pagination",
        "body": "The V2 API uses cursor-based pagination. Responses include a _links.next URL when more results are available.\n\nGET /pages?limit=25\n\nResponse:\n\n{\n  \"results\": [...],\n  \"_links\": {\n    \"next\": \"/wiki/api/v2/pages?cursor=eyJpZCI6Ijk4MzkyIn0\"\n  }\n}\n\nTo get the next page, extract the cursor and pass it:\n\nGET /pages?limit=25&cursor=eyJpZCI6Ijk4MzkyIn0"
      },
      {
        "title": "JavaScript",
        "body": "// Get Cloud ID first\nconst resourcesRes = await fetch(\n  'https://gateway.maton.ai/confluence/oauth/token/accessible-resources',\n  {\n    headers: {\n      'Authorization': `Bearer ${process.env.MATON_API_KEY}`\n    }\n  }\n);\nconst resources = await resourcesRes.json();\nconst cloudId = resources[0].id;\n\n// List pages\nconst response = await fetch(\n  `https://gateway.maton.ai/confluence/ex/confluence/${cloudId}/wiki/api/v2/pages`,\n  {\n    headers: {\n      'Authorization': `Bearer ${process.env.MATON_API_KEY}`\n    }\n  }\n);\nconst data = await response.json();"
      },
      {
        "title": "Python",
        "body": "import os\nimport requests\n\n# Get Cloud ID first\nresources = requests.get(\n    'https://gateway.maton.ai/confluence/oauth/token/accessible-resources',\n    headers={'Authorization': f'Bearer {os.environ[\"MATON_API_KEY\"]}'}\n).json()\ncloud_id = resources[0]['id']\n\n# List pages\nresponse = requests.get(\n    f'https://gateway.maton.ai/confluence/ex/confluence/{cloud_id}/wiki/api/v2/pages',\n    headers={'Authorization': f'Bearer {os.environ[\"MATON_API_KEY\"]}'}\n)\ndata = response.json()"
      },
      {
        "title": "Notes",
        "body": "Cloud ID Required: You must obtain your Cloud ID via /oauth/token/accessible-resources before making API calls\nV2 API Recommended: Use the V2 API (/wiki/api/v2/) for most operations. The V1 API (/wiki/rest/api/) is limited\nBody Formats: Use storage format for creating/updating content. Use view for rendered HTML\nVersion Numbers: When updating pages or blogposts, you must increment the version number\nStorage Format: Content uses Confluence storage format (XML-like). Example: <p>Paragraph</p>, <h1>Heading</h1>\nDelete Returns 204: DELETE operations return 204 No Content with no response body\nIDs are Strings: Page, space, and other IDs should be passed as strings\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": "StatusMeaning400Bad request or malformed data401Invalid API key or insufficient OAuth scopes403Permission denied404Resource not found409Conflict (e.g., duplicate title)429Rate limited4xx/5xxPassthrough error from Confluence API"
      },
      {
        "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\npython3 <<'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 confluence. For example:\n\nCorrect: https://gateway.maton.ai/confluence/ex/confluence/{cloudId}/wiki/api/v2/pages\nIncorrect: https://gateway.maton.ai/ex/confluence/{cloudId}/wiki/api/v2/pages"
      },
      {
        "title": "Troubleshooting: Scope Issues",
        "body": "If you receive a 401 error with \"scope does not match\", you may need to re-authorize with the required scopes. Delete your connection and create a new one:\n\n# Delete existing connection\npython3 <<'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\n# Create new connection\npython3 <<'EOF'\nimport urllib.request, os, json\ndata = json.dumps({'app': 'confluence'}).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": "Resources",
        "body": "Confluence REST API V2 Documentation\nConfluence REST API V2 Reference\nConfluence Storage Format\nMaton Community\nMaton Support"
      }
    ],
    "body": "Confluence\n\nAccess the Confluence Cloud API with managed OAuth authentication. Manage pages, spaces, blogposts, comments, attachments, and properties.\n\nQuick Start\n# List pages in your Confluence site\npython3 <<'EOF'\nimport urllib.request, os, json\n\n# First get your Cloud ID\nreq = urllib.request.Request('https://gateway.maton.ai/confluence/oauth/token/accessible-resources')\nreq.add_header('Authorization', f'Bearer {os.environ[\"MATON_API_KEY\"]}')\nresources = json.load(urllib.request.urlopen(req))\ncloud_id = resources[0]['id']\n\n# Then list pages\nreq = urllib.request.Request(f'https://gateway.maton.ai/confluence/ex/confluence/{cloud_id}/wiki/api/v2/pages')\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/confluence/{atlassian-api-path}\n\n\nConfluence Cloud uses two URL patterns:\n\nV2 API (recommended):\n\nhttps://gateway.maton.ai/confluence/ex/confluence/{cloudId}/wiki/api/v2/{resource}\n\n\nV1 REST API (limited):\n\nhttps://gateway.maton.ai/confluence/ex/confluence/{cloudId}/wiki/rest/api/{resource}\n\n\nThe {cloudId} is required for all API calls. Obtain it via the accessible-resources endpoint (see below).\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 Confluence OAuth connections at https://ctrl.maton.ai.\n\nList Connections\npython3 <<'EOF'\nimport urllib.request, os, json\nreq = urllib.request.Request('https://ctrl.maton.ai/connections?app=confluence&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\npython3 <<'EOF'\nimport urllib.request, os, json\ndata = json.dumps({'app': 'confluence'}).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\npython3 <<'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\": \"6cb7787f-7c32-4658-a3c3-4ddf1367a4ce\",\n    \"status\": \"ACTIVE\",\n    \"creation_time\": \"2026-02-13T00:00:00.000000Z\",\n    \"last_updated_time\": \"2026-02-13T00:00:00.000000Z\",\n    \"url\": \"https://connect.maton.ai/?session_token=...\",\n    \"app\": \"confluence\",\n    \"metadata\": {}\n  }\n}\n\n\nOpen the returned url in a browser to complete OAuth authorization.\n\nDelete Connection\npython3 <<'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 Confluence connections, specify which one to use with the Maton-Connection header:\n\npython3 <<'EOF'\nimport urllib.request, os, json\ncloud_id = \"YOUR_CLOUD_ID\"\nreq = urllib.request.Request(f'https://gateway.maton.ai/confluence/ex/confluence/{cloud_id}/wiki/api/v2/pages')\nreq.add_header('Authorization', f'Bearer {os.environ[\"MATON_API_KEY\"]}')\nreq.add_header('Maton-Connection', '6cb7787f-7c32-4658-a3c3-4ddf1367a4ce')\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\nGetting Your Cloud ID\n\nBefore making API calls, you must obtain your Confluence Cloud ID:\n\npython3 <<'EOF'\nimport urllib.request, os, json\nreq = urllib.request.Request('https://gateway.maton.ai/confluence/oauth/token/accessible-resources')\nreq.add_header('Authorization', f'Bearer {os.environ[\"MATON_API_KEY\"]}')\nresources = json.load(urllib.request.urlopen(req))\nprint(json.dumps(resources, indent=2))\n# Use resources[0]['id'] as your cloudId\nEOF\n\n\nResponse:\n\n[\n  {\n    \"id\": \"62909843-b784-4c35-b770-e4e2a26f024b\",\n    \"name\": \"your-site-name\",\n    \"url\": \"https://your-site.atlassian.net\",\n    \"scopes\": [\"read:confluence-content.all\", \"write:confluence-content\", ...],\n    \"avatarUrl\": \"https://...\"\n  }\n]\n\nAPI Reference\n\nAll V2 API endpoints use the base path:\n\n/confluence/ex/confluence/{cloudId}/wiki/api/v2\n\nPages\nList Pages\nGET /pages\nGET /pages?space-id={spaceId}\nGET /pages?limit=25\nGET /pages?status=current\nGET /pages?body-format=storage\n\n\nResponse:\n\n{\n  \"results\": [\n    {\n      \"id\": \"98391\",\n      \"status\": \"current\",\n      \"title\": \"My Page\",\n      \"spaceId\": \"98306\",\n      \"parentId\": \"98305\",\n      \"parentType\": \"page\",\n      \"authorId\": \"557058:...\",\n      \"createdAt\": \"2026-02-12T23:00:00.000Z\",\n      \"version\": {\n        \"number\": 1,\n        \"authorId\": \"557058:...\",\n        \"createdAt\": \"2026-02-12T23:00:00.000Z\"\n      },\n      \"_links\": {\n        \"webui\": \"/spaces/SPACEKEY/pages/98391/My+Page\"\n      }\n    }\n  ],\n  \"_links\": {\n    \"next\": \"/wiki/api/v2/pages?cursor=...\"\n  }\n}\n\nGet Page\nGET /pages/{pageId}\nGET /pages/{pageId}?body-format=storage\nGET /pages/{pageId}?body-format=atlas_doc_format\nGET /pages/{pageId}?body-format=view\n\n\nBody formats:\n\nstorage - Confluence storage format (XML-like)\natlas_doc_format - Atlassian Document Format (JSON)\nview - Rendered HTML\nCreate Page\nPOST /pages\nContent-Type: application/json\n\n{\n  \"spaceId\": \"98306\",\n  \"status\": \"current\",\n  \"title\": \"New Page Title\",\n  \"body\": {\n    \"representation\": \"storage\",\n    \"value\": \"<p>Page content in storage format</p>\"\n  }\n}\n\n\nTo create a child page, include parentId:\n\n{\n  \"spaceId\": \"98306\",\n  \"parentId\": \"98391\",\n  \"status\": \"current\",\n  \"title\": \"Child Page\",\n  \"body\": {\n    \"representation\": \"storage\",\n    \"value\": \"<p>Child page content</p>\"\n  }\n}\n\n\nResponse:\n\n{\n  \"id\": \"98642\",\n  \"status\": \"current\",\n  \"title\": \"New Page Title\",\n  \"spaceId\": \"98306\",\n  \"version\": {\n    \"number\": 1\n  }\n}\n\nUpdate Page\nPUT /pages/{pageId}\nContent-Type: application/json\n\n{\n  \"id\": \"98391\",\n  \"status\": \"current\",\n  \"title\": \"Updated Page Title\",\n  \"body\": {\n    \"representation\": \"storage\",\n    \"value\": \"<p>Updated content</p>\"\n  },\n  \"version\": {\n    \"number\": 2,\n    \"message\": \"Updated via API\"\n  }\n}\n\n\nNote: You must increment the version number with each update.\n\nDelete Page\nDELETE /pages/{pageId}\n\n\nReturns 204 No Content on success.\n\nGet Page Children\nGET /pages/{pageId}/children\n\nGet Page Versions\nGET /pages/{pageId}/versions\n\nGet Page Labels\nGET /pages/{pageId}/labels\n\nGet Page Attachments\nGET /pages/{pageId}/attachments\n\nGet Page Comments\nGET /pages/{pageId}/footer-comments\n\nGet Page Properties\nGET /pages/{pageId}/properties\nGET /pages/{pageId}/properties/{propertyId}\n\nCreate Page Property\nPOST /pages/{pageId}/properties\nContent-Type: application/json\n\n{\n  \"key\": \"my-property-key\",\n  \"value\": {\"customKey\": \"customValue\"}\n}\n\nUpdate Page Property\nPUT /pages/{pageId}/properties/{propertyId}\nContent-Type: application/json\n\n{\n  \"key\": \"my-property-key\",\n  \"value\": {\"customKey\": \"updatedValue\"},\n  \"version\": {\"number\": 2}\n}\n\nDelete Page Property\nDELETE /pages/{pageId}/properties/{propertyId}\n\nSpaces\nList Spaces\nGET /spaces\nGET /spaces?limit=25\nGET /spaces?type=global\n\n\nResponse:\n\n{\n  \"results\": [\n    {\n      \"id\": \"98306\",\n      \"key\": \"SPACEKEY\",\n      \"name\": \"Space Name\",\n      \"type\": \"global\",\n      \"status\": \"current\",\n      \"authorId\": \"557058:...\",\n      \"createdAt\": \"2026-02-12T23:00:00.000Z\",\n      \"homepageId\": \"98305\",\n      \"_links\": {\n        \"webui\": \"/spaces/SPACEKEY\"\n      }\n    }\n  ]\n}\n\nGet Space\nGET /spaces/{spaceId}\n\nGet Space Pages\nGET /spaces/{spaceId}/pages\n\nGet Space Blogposts\nGET /spaces/{spaceId}/blogposts\n\nGet Space Properties\nGET /spaces/{spaceId}/properties\n\nCreate Space Property\nPOST /spaces/{spaceId}/properties\nContent-Type: application/json\n\n{\n  \"key\": \"space-property-key\",\n  \"value\": {\"key\": \"value\"}\n}\n\nGet Space Permissions\nGET /spaces/{spaceId}/permissions\n\nGet Space Labels\nGET /spaces/{spaceId}/labels\n\nBlogposts\nList Blogposts\nGET /blogposts\nGET /blogposts?space-id={spaceId}\nGET /blogposts?limit=25\n\nGet Blogpost\nGET /blogposts/{blogpostId}\nGET /blogposts/{blogpostId}?body-format=storage\n\nCreate Blogpost\nPOST /blogposts\nContent-Type: application/json\n\n{\n  \"spaceId\": \"98306\",\n  \"title\": \"My Blog Post\",\n  \"body\": {\n    \"representation\": \"storage\",\n    \"value\": \"<p>Blog post content</p>\"\n  }\n}\n\nUpdate Blogpost\nPUT /blogposts/{blogpostId}\nContent-Type: application/json\n\n{\n  \"id\": \"458753\",\n  \"status\": \"current\",\n  \"title\": \"Updated Blog Post\",\n  \"body\": {\n    \"representation\": \"storage\",\n    \"value\": \"<p>Updated content</p>\"\n  },\n  \"version\": {\n    \"number\": 2\n  }\n}\n\nDelete Blogpost\nDELETE /blogposts/{blogpostId}\n\nGet Blogpost Labels\nGET /blogposts/{blogpostId}/labels\n\nGet Blogpost Versions\nGET /blogposts/{blogpostId}/versions\n\nGet Blogpost Comments\nGET /blogposts/{blogpostId}/footer-comments\n\nComments\nList Footer Comments\nGET /footer-comments\nGET /footer-comments?body-format=storage\n\nGet Comment\nGET /footer-comments/{commentId}\n\nCreate Footer Comment\nPOST /footer-comments\nContent-Type: application/json\n\n{\n  \"pageId\": \"98391\",\n  \"body\": {\n    \"representation\": \"storage\",\n    \"value\": \"<p>Comment text</p>\"\n  }\n}\n\n\nFor blogpost comments:\n\n{\n  \"blogpostId\": \"458753\",\n  \"body\": {\n    \"representation\": \"storage\",\n    \"value\": \"<p>Comment on blogpost</p>\"\n  }\n}\n\nUpdate Comment\nPUT /footer-comments/{commentId}\nContent-Type: application/json\n\n{\n  \"version\": {\"number\": 2},\n  \"body\": {\n    \"representation\": \"storage\",\n    \"value\": \"<p>Updated comment</p>\"\n  }\n}\n\nDelete Comment\nDELETE /footer-comments/{commentId}\n\nGet Comment Replies\nGET /footer-comments/{commentId}/children\n\nList Inline Comments\nGET /inline-comments\n\nAttachments\nList Attachments\nGET /attachments\nGET /attachments?limit=25\n\nGet Attachment\nGET /attachments/{attachmentId}\n\nGet Page Attachments\nGET /pages/{pageId}/attachments\n\nTasks\nList Tasks\nGET /tasks\n\nGet Task\nGET /tasks/{taskId}\n\nLabels\nList Labels\nGET /labels\nGET /labels?prefix=global\n\nCustom Content\nList Custom Content\nGET /custom-content\nGET /custom-content?type={customContentType}\n\nUser (V1 API)\n\nThe current user endpoint uses the V1 REST API:\n\nGET /confluence/ex/confluence/{cloudId}/wiki/rest/api/user/current\n\n\nResponse:\n\n{\n  \"type\": \"known\",\n  \"accountId\": \"557058:...\",\n  \"accountType\": \"atlassian\",\n  \"email\": \"user@example.com\",\n  \"publicName\": \"User Name\",\n  \"displayName\": \"User Name\"\n}\n\nPagination\n\nThe V2 API uses cursor-based pagination. Responses include a _links.next URL when more results are available.\n\nGET /pages?limit=25\n\n\nResponse:\n\n{\n  \"results\": [...],\n  \"_links\": {\n    \"next\": \"/wiki/api/v2/pages?cursor=eyJpZCI6Ijk4MzkyIn0\"\n  }\n}\n\n\nTo get the next page, extract the cursor and pass it:\n\nGET /pages?limit=25&cursor=eyJpZCI6Ijk4MzkyIn0\n\nCode Examples\nJavaScript\n// Get Cloud ID first\nconst resourcesRes = await fetch(\n  'https://gateway.maton.ai/confluence/oauth/token/accessible-resources',\n  {\n    headers: {\n      'Authorization': `Bearer ${process.env.MATON_API_KEY}`\n    }\n  }\n);\nconst resources = await resourcesRes.json();\nconst cloudId = resources[0].id;\n\n// List pages\nconst response = await fetch(\n  `https://gateway.maton.ai/confluence/ex/confluence/${cloudId}/wiki/api/v2/pages`,\n  {\n    headers: {\n      'Authorization': `Bearer ${process.env.MATON_API_KEY}`\n    }\n  }\n);\nconst data = await response.json();\n\nPython\nimport os\nimport requests\n\n# Get Cloud ID first\nresources = requests.get(\n    'https://gateway.maton.ai/confluence/oauth/token/accessible-resources',\n    headers={'Authorization': f'Bearer {os.environ[\"MATON_API_KEY\"]}'}\n).json()\ncloud_id = resources[0]['id']\n\n# List pages\nresponse = requests.get(\n    f'https://gateway.maton.ai/confluence/ex/confluence/{cloud_id}/wiki/api/v2/pages',\n    headers={'Authorization': f'Bearer {os.environ[\"MATON_API_KEY\"]}'}\n)\ndata = response.json()\n\nNotes\nCloud ID Required: You must obtain your Cloud ID via /oauth/token/accessible-resources before making API calls\nV2 API Recommended: Use the V2 API (/wiki/api/v2/) for most operations. The V1 API (/wiki/rest/api/) is limited\nBody Formats: Use storage format for creating/updating content. Use view for rendered HTML\nVersion Numbers: When updating pages or blogposts, you must increment the version number\nStorage Format: Content uses Confluence storage format (XML-like). Example: <p>Paragraph</p>, <h1>Heading</h1>\nDelete Returns 204: DELETE operations return 204 No Content with no response body\nIDs are Strings: Page, space, and other IDs should be passed as strings\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\tBad request or malformed data\n401\tInvalid API key or insufficient OAuth scopes\n403\tPermission denied\n404\tResource not found\n409\tConflict (e.g., duplicate title)\n429\tRate limited\n4xx/5xx\tPassthrough error from Confluence API\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:\npython3 <<'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\n\nEnsure your URL path starts with confluence. For example:\n\nCorrect: https://gateway.maton.ai/confluence/ex/confluence/{cloudId}/wiki/api/v2/pages\nIncorrect: https://gateway.maton.ai/ex/confluence/{cloudId}/wiki/api/v2/pages\nTroubleshooting: Scope Issues\n\nIf you receive a 401 error with \"scope does not match\", you may need to re-authorize with the required scopes. Delete your connection and create a new one:\n\n# Delete existing connection\npython3 <<'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\n# Create new connection\npython3 <<'EOF'\nimport urllib.request, os, json\ndata = json.dumps({'app': 'confluence'}).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\nResources\nConfluence REST API V2 Documentation\nConfluence REST API V2 Reference\nConfluence Storage Format\nMaton Community\nMaton Support"
  },
  "trust": {
    "sourceLabel": "tencent",
    "provenanceUrl": "https://clawhub.ai/byungkyu/confluence-api",
    "publisherUrl": "https://clawhub.ai/byungkyu/confluence-api",
    "owner": "byungkyu",
    "version": "1.0.0",
    "license": null,
    "verificationStatus": "Indexed source record"
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/confluence-api",
    "downloadUrl": "https://openagent3.xyz/downloads/confluence-api",
    "agentUrl": "https://openagent3.xyz/skills/confluence-api/agent",
    "manifestUrl": "https://openagent3.xyz/skills/confluence-api/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/confluence-api/agent.md"
  }
}