{
  "schemaVersion": "1.0",
  "item": {
    "slug": "keap",
    "name": "Keap",
    "source": "tencent",
    "type": "skill",
    "category": "开发工具",
    "sourceUrl": "https://clawhub.ai/byungkyu/keap",
    "canonicalUrl": "https://clawhub.ai/byungkyu/keap",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadMode": "redirect",
    "downloadUrl": "/downloads/keap",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=keap",
    "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/keap"
    },
    "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/keap",
    "agentPageUrl": "https://openagent3.xyz/skills/keap/agent",
    "manifestUrl": "https://openagent3.xyz/skills/keap/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/keap/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": "Keap",
        "body": "Access the Keap API with managed OAuth authentication. Manage contacts, companies, tags, tasks, orders, opportunities, campaigns, and more for CRM and marketing automation."
      },
      {
        "title": "Quick Start",
        "body": "# List contacts\npython <<'EOF'\nimport urllib.request, os, json\nreq = urllib.request.Request('https://gateway.maton.ai/keap/crm/rest/v2/contacts?page_size=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/keap/crm/rest/{api-path}\n\nThe gateway proxies requests to api.infusionsoft.com/crm/rest and automatically injects your OAuth token."
      },
      {
        "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 Keap 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=keap&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': 'keap'}).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\": \"d5242090-02ae-4195-83e3-8deca823eb9a\",\n    \"status\": \"ACTIVE\",\n    \"creation_time\": \"2026-02-08T01:34:44.738374Z\",\n    \"last_updated_time\": \"2026-02-08T01:35:20.106942Z\",\n    \"url\": \"https://connect.maton.ai/?session_token=...\",\n    \"app\": \"keap\",\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 Keap 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/keap/crm/rest/v2/contacts')\nreq.add_header('Authorization', f'Bearer {os.environ[\"MATON_API_KEY\"]}')\nreq.add_header('Maton-Connection', 'd5242090-02ae-4195-83e3-8deca823eb9a')\nprint(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))\nEOF\n\nIf omitted, the gateway uses the default (oldest) active connection."
      },
      {
        "title": "User Info",
        "body": "Get Current User\n\nGET /keap/crm/rest/v2/oauth/connect/userinfo\n\nResponse:\n\n{\n  \"email\": \"user@example.com\",\n  \"sub\": \"1\",\n  \"id\": \"4236128\",\n  \"keap_id\": \"user@example.com\",\n  \"family_name\": \"Doe\",\n  \"given_name\": \"John\",\n  \"is_admin\": true\n}"
      },
      {
        "title": "Contact Operations",
        "body": "List Contacts\n\nGET /keap/crm/rest/v2/contacts\n\nQuery parameters:\n\npage_size - Number of results per page (default 50, max 1000)\npage_token - Token for next page\nfilter - Filter expression\norder_by - Sort order\nfields - Fields to include in response\n\nResponse:\n\n{\n  \"contacts\": [\n    {\n      \"id\": \"9\",\n      \"family_name\": \"Park\",\n      \"given_name\": \"John\"\n    }\n  ],\n  \"next_page_token\": \"\"\n}\n\nGet Contact\n\nGET /keap/crm/rest/v2/contacts/{contact_id}\n\nCreate Contact\n\nPOST /keap/crm/rest/v2/contacts\nContent-Type: application/json\n\n{\n  \"given_name\": \"John\",\n  \"family_name\": \"Doe\",\n  \"email_addresses\": [\n    {\"email\": \"john@example.com\", \"field\": \"EMAIL1\"}\n  ],\n  \"phone_numbers\": [\n    {\"number\": \"555-1234\", \"field\": \"PHONE1\"}\n  ]\n}\n\nResponse:\n\n{\n  \"id\": \"13\",\n  \"family_name\": \"Doe\",\n  \"given_name\": \"John\"\n}\n\nUpdate Contact\n\nPATCH /keap/crm/rest/v2/contacts/{contact_id}\nContent-Type: application/json\n\n{\n  \"given_name\": \"Jane\"\n}\n\nDelete Contact\n\nDELETE /keap/crm/rest/v2/contacts/{contact_id}\n\nReturns 204 on success.\n\nGet Contact Notes\n\nGET /keap/crm/rest/v2/contacts/{contact_id}/notes\n\nCreate Contact Note\n\nPOST /keap/crm/rest/v2/contacts/{contact_id}/notes\nContent-Type: application/json\n\n{\n  \"body\": \"Note content here\",\n  \"title\": \"Note Title\"\n}"
      },
      {
        "title": "Company Operations",
        "body": "List Companies\n\nGET /keap/crm/rest/v2/companies\n\nGet Company\n\nGET /keap/crm/rest/v2/companies/{company_id}\n\nCreate Company\n\nPOST /keap/crm/rest/v2/companies\nContent-Type: application/json\n\n{\n  \"company_name\": \"Acme Corp\",\n  \"phone_number\": {\"number\": \"555-1234\", \"type\": \"MAIN\"},\n  \"website\": \"https://acme.com\"\n}\n\nUpdate Company\n\nPATCH /keap/crm/rest/v2/companies/{company_id}\nContent-Type: application/json\n\n{\n  \"company_name\": \"Acme Corporation\"\n}\n\nDelete Company\n\nDELETE /keap/crm/rest/v2/companies/{company_id}"
      },
      {
        "title": "Tag Operations",
        "body": "List Tags\n\nGET /keap/crm/rest/v2/tags\n\nResponse:\n\n{\n  \"tags\": [\n    {\n      \"id\": \"91\",\n      \"name\": \"Nurture Subscriber\",\n      \"description\": \"\",\n      \"category\": {\"id\": \"10\"},\n      \"create_time\": \"2017-04-24T17:26:26Z\",\n      \"update_time\": \"2017-04-24T17:26:26Z\"\n    }\n  ],\n  \"next_page_token\": \"\"\n}\n\nGet Tag\n\nGET /keap/crm/rest/v2/tags/{tag_id}\n\nCreate Tag\n\nPOST /keap/crm/rest/v2/tags\nContent-Type: application/json\n\n{\n  \"name\": \"VIP Customer\",\n  \"description\": \"High value customers\"\n}\n\nUpdate Tag\n\nPATCH /keap/crm/rest/v2/tags/{tag_id}\nContent-Type: application/json\n\n{\n  \"name\": \"Premium Customer\"\n}\n\nDelete Tag\n\nDELETE /keap/crm/rest/v2/tags/{tag_id}\n\nList Contacts with Tag\n\nGET /keap/crm/rest/v2/tags/{tag_id}/contacts\n\nApply Tags to Contacts\n\nPOST /keap/crm/rest/v2/tags/{tag_id}/contacts:applyTags\nContent-Type: application/json\n\n{\n  \"contact_ids\": [\"1\", \"2\", \"3\"]\n}\n\nRemove Tags from Contacts\n\nPOST /keap/crm/rest/v2/tags/{tag_id}/contacts:removeTags\nContent-Type: application/json\n\n{\n  \"contact_ids\": [\"1\", \"2\", \"3\"]\n}"
      },
      {
        "title": "Tag Category Operations",
        "body": "List Tag Categories\n\nGET /keap/crm/rest/v2/tags/categories\n\nCreate Tag Category\n\nPOST /keap/crm/rest/v2/tags/categories\nContent-Type: application/json\n\n{\n  \"name\": \"Customer Segments\"\n}"
      },
      {
        "title": "Task Operations",
        "body": "List Tasks\n\nGET /keap/crm/rest/v2/tasks\n\nGet Task\n\nGET /keap/crm/rest/v2/tasks/{task_id}\n\nCreate Task\n\nPOST /keap/crm/rest/v2/tasks\nContent-Type: application/json\n\n{\n  \"title\": \"Follow up call\",\n  \"description\": \"Call to discuss proposal\",\n  \"due_date\": \"2026-02-15T10:00:00Z\",\n  \"contact\": {\"id\": \"9\"}\n}\n\nUpdate Task\n\nPATCH /keap/crm/rest/v2/tasks/{task_id}\nContent-Type: application/json\n\n{\n  \"completed\": true\n}\n\nDelete Task\n\nDELETE /keap/crm/rest/v2/tasks/{task_id}"
      },
      {
        "title": "Opportunity Operations",
        "body": "List Opportunities\n\nGET /keap/crm/rest/v2/opportunities\n\nGet Opportunity\n\nGET /keap/crm/rest/v2/opportunities/{opportunity_id}\n\nCreate Opportunity\n\nPOST /keap/crm/rest/v2/opportunities\nContent-Type: application/json\n\n{\n  \"opportunity_title\": \"New Deal\",\n  \"contact\": {\"id\": \"9\"},\n  \"stage\": {\"id\": \"1\"},\n  \"estimated_close_date\": \"2026-03-01\"\n}\n\nUpdate Opportunity\n\nPATCH /keap/crm/rest/v2/opportunities/{opportunity_id}\nContent-Type: application/json\n\n{\n  \"stage\": {\"id\": \"2\"}\n}\n\nDelete Opportunity\n\nDELETE /keap/crm/rest/v2/opportunities/{opportunity_id}\n\nList Opportunity Stages\n\nGET /keap/crm/rest/v2/opportunities/stages"
      },
      {
        "title": "Order Operations",
        "body": "List Orders\n\nGET /keap/crm/rest/v2/orders\n\nGet Order\n\nGET /keap/crm/rest/v2/orders/{order_id}\n\nCreate Order\n\nPOST /keap/crm/rest/v2/orders\nContent-Type: application/json\n\n{\n  \"contact\": {\"id\": \"9\"},\n  \"order_date\": \"2026-02-08\",\n  \"order_title\": \"Product Order\"\n}\n\nAdd Order Item\n\nPOST /keap/crm/rest/v2/orders/{order_id}/items\nContent-Type: application/json\n\n{\n  \"product\": {\"id\": \"1\"},\n  \"quantity\": 2\n}"
      },
      {
        "title": "Product Operations",
        "body": "List Products\n\nGET /keap/crm/rest/v2/products\n\nGet Product\n\nGET /keap/crm/rest/v2/products/{product_id}\n\nCreate Product\n\nPOST /keap/crm/rest/v2/products\nContent-Type: application/json\n\n{\n  \"product_name\": \"Consulting Package\",\n  \"product_price\": 500.00,\n  \"product_short_description\": \"1 hour consulting\"\n}"
      },
      {
        "title": "Campaign Operations",
        "body": "List Campaigns\n\nGET /keap/crm/rest/v2/campaigns\n\nGet Campaign\n\nGET /keap/crm/rest/v2/campaigns/{campaign_id}\n\nList Campaign Sequences\n\nGET /keap/crm/rest/v2/campaigns/{campaign_id}/sequences\n\nAdd Contacts to Sequence\n\nPOST /keap/crm/rest/v2/campaigns/{campaign_id}/sequences/{sequence_id}:addContacts\nContent-Type: application/json\n\n{\n  \"contact_ids\": [\"1\", \"2\"]\n}\n\nRemove Contacts from Sequence\n\nPOST /keap/crm/rest/v2/campaigns/{campaign_id}/sequences/{sequence_id}:removeContacts\nContent-Type: application/json\n\n{\n  \"contact_ids\": [\"1\", \"2\"]\n}"
      },
      {
        "title": "Email Operations",
        "body": "List Emails\n\nGET /keap/crm/rest/v2/emails\n\nGet Email\n\nGET /keap/crm/rest/v2/emails/{email_id}\n\nSend Email\n\nPOST /keap/crm/rest/v2/emails:send\nContent-Type: application/json\n\n{\n  \"contacts\": [{\"id\": \"9\"}],\n  \"subject\": \"Hello\",\n  \"html_content\": \"<p>Email body</p>\"\n}"
      },
      {
        "title": "User Operations",
        "body": "List Users\n\nGET /keap/crm/rest/v2/users\n\nGet User\n\nGET /keap/crm/rest/v2/users/{user_id}"
      },
      {
        "title": "Subscription Operations",
        "body": "List Subscriptions\n\nGET /keap/crm/rest/v2/subscriptions\n\nGet Subscription\n\nGET /keap/crm/rest/v2/subscriptions/{subscription_id}"
      },
      {
        "title": "Affiliate Operations",
        "body": "List Affiliates\n\nGET /keap/crm/rest/v2/affiliates\n\nGet Affiliate\n\nGET /keap/crm/rest/v2/affiliates/{affiliate_id}"
      },
      {
        "title": "Automation Operations",
        "body": "List Automations\n\nGET /keap/crm/rest/v2/automations\n\nGet Automation\n\nGET /keap/crm/rest/v2/automations/{automation_id}"
      },
      {
        "title": "Pagination",
        "body": "Keap uses token-based pagination:\n\nGET /keap/crm/rest/v2/contacts?page_size=50\n\nResponse:\n\n{\n  \"contacts\": [...],\n  \"next_page_token\": \"abc123\"\n}\n\nFor subsequent pages, use the page_token parameter:\n\nGET /keap/crm/rest/v2/contacts?page_size=50&page_token=abc123\n\nWhen next_page_token is empty, there are no more pages."
      },
      {
        "title": "Filtering",
        "body": "Use the filter parameter for filtering results:\n\nGET /keap/crm/rest/v2/contacts?filter=given_name==John\nGET /keap/crm/rest/v2/contacts?filter=email_addresses.email==john@example.com\nGET /keap/crm/rest/v2/tasks?filter=completed==false"
      },
      {
        "title": "JavaScript",
        "body": "const response = await fetch(\n  'https://gateway.maton.ai/keap/crm/rest/v2/contacts?page_size=10',\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\nresponse = requests.get(\n    'https://gateway.maton.ai/keap/crm/rest/v2/contacts',\n    headers={'Authorization': f'Bearer {os.environ[\"MATON_API_KEY\"]}'},\n    params={'page_size': 10}\n)\ndata = response.json()"
      },
      {
        "title": "Notes",
        "body": "All API paths must include /crm/rest prefix (e.g., /keap/crm/rest/v2/contacts)\nKeap uses v2 REST API (previous v1 API is deprecated)\nTimestamps are in ISO 8601 format\nIDs are returned as strings\nPagination uses page_size and page_token (not offset-based)\nMaximum page_size is 1000\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 Keap connection or invalid request401Invalid or missing Maton API key403Not authorized (check OAuth scopes)404Resource not found429Rate limited4xx/5xxPassthrough error from Keap 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\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 keap. For example:\n\nCorrect: https://gateway.maton.ai/keap/crm/rest/v2/contacts\nIncorrect: https://gateway.maton.ai/crm/rest/v2/contacts"
      },
      {
        "title": "Resources",
        "body": "Keap Developer Portal\nKeap REST API V2 Documentation\nGetting Started Guide\nOAuth 2.0 Authentication\nMaton Community\nMaton Support"
      }
    ],
    "body": "Keap\n\nAccess the Keap API with managed OAuth authentication. Manage contacts, companies, tags, tasks, orders, opportunities, campaigns, and more for CRM and marketing automation.\n\nQuick Start\n# List contacts\npython <<'EOF'\nimport urllib.request, os, json\nreq = urllib.request.Request('https://gateway.maton.ai/keap/crm/rest/v2/contacts?page_size=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/keap/crm/rest/{api-path}\n\n\nThe gateway proxies requests to api.infusionsoft.com/crm/rest and automatically injects your OAuth token.\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 Keap 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=keap&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': 'keap'}).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\": \"d5242090-02ae-4195-83e3-8deca823eb9a\",\n    \"status\": \"ACTIVE\",\n    \"creation_time\": \"2026-02-08T01:34:44.738374Z\",\n    \"last_updated_time\": \"2026-02-08T01:35:20.106942Z\",\n    \"url\": \"https://connect.maton.ai/?session_token=...\",\n    \"app\": \"keap\",\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 Keap 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/keap/crm/rest/v2/contacts')\nreq.add_header('Authorization', f'Bearer {os.environ[\"MATON_API_KEY\"]}')\nreq.add_header('Maton-Connection', 'd5242090-02ae-4195-83e3-8deca823eb9a')\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\nUser Info\nGet Current User\nGET /keap/crm/rest/v2/oauth/connect/userinfo\n\n\nResponse:\n\n{\n  \"email\": \"user@example.com\",\n  \"sub\": \"1\",\n  \"id\": \"4236128\",\n  \"keap_id\": \"user@example.com\",\n  \"family_name\": \"Doe\",\n  \"given_name\": \"John\",\n  \"is_admin\": true\n}\n\nContact Operations\nList Contacts\nGET /keap/crm/rest/v2/contacts\n\n\nQuery parameters:\n\npage_size - Number of results per page (default 50, max 1000)\npage_token - Token for next page\nfilter - Filter expression\norder_by - Sort order\nfields - Fields to include in response\n\nResponse:\n\n{\n  \"contacts\": [\n    {\n      \"id\": \"9\",\n      \"family_name\": \"Park\",\n      \"given_name\": \"John\"\n    }\n  ],\n  \"next_page_token\": \"\"\n}\n\nGet Contact\nGET /keap/crm/rest/v2/contacts/{contact_id}\n\nCreate Contact\nPOST /keap/crm/rest/v2/contacts\nContent-Type: application/json\n\n{\n  \"given_name\": \"John\",\n  \"family_name\": \"Doe\",\n  \"email_addresses\": [\n    {\"email\": \"john@example.com\", \"field\": \"EMAIL1\"}\n  ],\n  \"phone_numbers\": [\n    {\"number\": \"555-1234\", \"field\": \"PHONE1\"}\n  ]\n}\n\n\nResponse:\n\n{\n  \"id\": \"13\",\n  \"family_name\": \"Doe\",\n  \"given_name\": \"John\"\n}\n\nUpdate Contact\nPATCH /keap/crm/rest/v2/contacts/{contact_id}\nContent-Type: application/json\n\n{\n  \"given_name\": \"Jane\"\n}\n\nDelete Contact\nDELETE /keap/crm/rest/v2/contacts/{contact_id}\n\n\nReturns 204 on success.\n\nGet Contact Notes\nGET /keap/crm/rest/v2/contacts/{contact_id}/notes\n\nCreate Contact Note\nPOST /keap/crm/rest/v2/contacts/{contact_id}/notes\nContent-Type: application/json\n\n{\n  \"body\": \"Note content here\",\n  \"title\": \"Note Title\"\n}\n\nCompany Operations\nList Companies\nGET /keap/crm/rest/v2/companies\n\nGet Company\nGET /keap/crm/rest/v2/companies/{company_id}\n\nCreate Company\nPOST /keap/crm/rest/v2/companies\nContent-Type: application/json\n\n{\n  \"company_name\": \"Acme Corp\",\n  \"phone_number\": {\"number\": \"555-1234\", \"type\": \"MAIN\"},\n  \"website\": \"https://acme.com\"\n}\n\nUpdate Company\nPATCH /keap/crm/rest/v2/companies/{company_id}\nContent-Type: application/json\n\n{\n  \"company_name\": \"Acme Corporation\"\n}\n\nDelete Company\nDELETE /keap/crm/rest/v2/companies/{company_id}\n\nTag Operations\nList Tags\nGET /keap/crm/rest/v2/tags\n\n\nResponse:\n\n{\n  \"tags\": [\n    {\n      \"id\": \"91\",\n      \"name\": \"Nurture Subscriber\",\n      \"description\": \"\",\n      \"category\": {\"id\": \"10\"},\n      \"create_time\": \"2017-04-24T17:26:26Z\",\n      \"update_time\": \"2017-04-24T17:26:26Z\"\n    }\n  ],\n  \"next_page_token\": \"\"\n}\n\nGet Tag\nGET /keap/crm/rest/v2/tags/{tag_id}\n\nCreate Tag\nPOST /keap/crm/rest/v2/tags\nContent-Type: application/json\n\n{\n  \"name\": \"VIP Customer\",\n  \"description\": \"High value customers\"\n}\n\nUpdate Tag\nPATCH /keap/crm/rest/v2/tags/{tag_id}\nContent-Type: application/json\n\n{\n  \"name\": \"Premium Customer\"\n}\n\nDelete Tag\nDELETE /keap/crm/rest/v2/tags/{tag_id}\n\nList Contacts with Tag\nGET /keap/crm/rest/v2/tags/{tag_id}/contacts\n\nApply Tags to Contacts\nPOST /keap/crm/rest/v2/tags/{tag_id}/contacts:applyTags\nContent-Type: application/json\n\n{\n  \"contact_ids\": [\"1\", \"2\", \"3\"]\n}\n\nRemove Tags from Contacts\nPOST /keap/crm/rest/v2/tags/{tag_id}/contacts:removeTags\nContent-Type: application/json\n\n{\n  \"contact_ids\": [\"1\", \"2\", \"3\"]\n}\n\nTag Category Operations\nList Tag Categories\nGET /keap/crm/rest/v2/tags/categories\n\nCreate Tag Category\nPOST /keap/crm/rest/v2/tags/categories\nContent-Type: application/json\n\n{\n  \"name\": \"Customer Segments\"\n}\n\nTask Operations\nList Tasks\nGET /keap/crm/rest/v2/tasks\n\nGet Task\nGET /keap/crm/rest/v2/tasks/{task_id}\n\nCreate Task\nPOST /keap/crm/rest/v2/tasks\nContent-Type: application/json\n\n{\n  \"title\": \"Follow up call\",\n  \"description\": \"Call to discuss proposal\",\n  \"due_date\": \"2026-02-15T10:00:00Z\",\n  \"contact\": {\"id\": \"9\"}\n}\n\nUpdate Task\nPATCH /keap/crm/rest/v2/tasks/{task_id}\nContent-Type: application/json\n\n{\n  \"completed\": true\n}\n\nDelete Task\nDELETE /keap/crm/rest/v2/tasks/{task_id}\n\nOpportunity Operations\nList Opportunities\nGET /keap/crm/rest/v2/opportunities\n\nGet Opportunity\nGET /keap/crm/rest/v2/opportunities/{opportunity_id}\n\nCreate Opportunity\nPOST /keap/crm/rest/v2/opportunities\nContent-Type: application/json\n\n{\n  \"opportunity_title\": \"New Deal\",\n  \"contact\": {\"id\": \"9\"},\n  \"stage\": {\"id\": \"1\"},\n  \"estimated_close_date\": \"2026-03-01\"\n}\n\nUpdate Opportunity\nPATCH /keap/crm/rest/v2/opportunities/{opportunity_id}\nContent-Type: application/json\n\n{\n  \"stage\": {\"id\": \"2\"}\n}\n\nDelete Opportunity\nDELETE /keap/crm/rest/v2/opportunities/{opportunity_id}\n\nList Opportunity Stages\nGET /keap/crm/rest/v2/opportunities/stages\n\nOrder Operations\nList Orders\nGET /keap/crm/rest/v2/orders\n\nGet Order\nGET /keap/crm/rest/v2/orders/{order_id}\n\nCreate Order\nPOST /keap/crm/rest/v2/orders\nContent-Type: application/json\n\n{\n  \"contact\": {\"id\": \"9\"},\n  \"order_date\": \"2026-02-08\",\n  \"order_title\": \"Product Order\"\n}\n\nAdd Order Item\nPOST /keap/crm/rest/v2/orders/{order_id}/items\nContent-Type: application/json\n\n{\n  \"product\": {\"id\": \"1\"},\n  \"quantity\": 2\n}\n\nProduct Operations\nList Products\nGET /keap/crm/rest/v2/products\n\nGet Product\nGET /keap/crm/rest/v2/products/{product_id}\n\nCreate Product\nPOST /keap/crm/rest/v2/products\nContent-Type: application/json\n\n{\n  \"product_name\": \"Consulting Package\",\n  \"product_price\": 500.00,\n  \"product_short_description\": \"1 hour consulting\"\n}\n\nCampaign Operations\nList Campaigns\nGET /keap/crm/rest/v2/campaigns\n\nGet Campaign\nGET /keap/crm/rest/v2/campaigns/{campaign_id}\n\nList Campaign Sequences\nGET /keap/crm/rest/v2/campaigns/{campaign_id}/sequences\n\nAdd Contacts to Sequence\nPOST /keap/crm/rest/v2/campaigns/{campaign_id}/sequences/{sequence_id}:addContacts\nContent-Type: application/json\n\n{\n  \"contact_ids\": [\"1\", \"2\"]\n}\n\nRemove Contacts from Sequence\nPOST /keap/crm/rest/v2/campaigns/{campaign_id}/sequences/{sequence_id}:removeContacts\nContent-Type: application/json\n\n{\n  \"contact_ids\": [\"1\", \"2\"]\n}\n\nEmail Operations\nList Emails\nGET /keap/crm/rest/v2/emails\n\nGet Email\nGET /keap/crm/rest/v2/emails/{email_id}\n\nSend Email\nPOST /keap/crm/rest/v2/emails:send\nContent-Type: application/json\n\n{\n  \"contacts\": [{\"id\": \"9\"}],\n  \"subject\": \"Hello\",\n  \"html_content\": \"<p>Email body</p>\"\n}\n\nUser Operations\nList Users\nGET /keap/crm/rest/v2/users\n\nGet User\nGET /keap/crm/rest/v2/users/{user_id}\n\nSubscription Operations\nList Subscriptions\nGET /keap/crm/rest/v2/subscriptions\n\nGet Subscription\nGET /keap/crm/rest/v2/subscriptions/{subscription_id}\n\nAffiliate Operations\nList Affiliates\nGET /keap/crm/rest/v2/affiliates\n\nGet Affiliate\nGET /keap/crm/rest/v2/affiliates/{affiliate_id}\n\nAutomation Operations\nList Automations\nGET /keap/crm/rest/v2/automations\n\nGet Automation\nGET /keap/crm/rest/v2/automations/{automation_id}\n\nPagination\n\nKeap uses token-based pagination:\n\nGET /keap/crm/rest/v2/contacts?page_size=50\n\n\nResponse:\n\n{\n  \"contacts\": [...],\n  \"next_page_token\": \"abc123\"\n}\n\n\nFor subsequent pages, use the page_token parameter:\n\nGET /keap/crm/rest/v2/contacts?page_size=50&page_token=abc123\n\n\nWhen next_page_token is empty, there are no more pages.\n\nFiltering\n\nUse the filter parameter for filtering results:\n\nGET /keap/crm/rest/v2/contacts?filter=given_name==John\nGET /keap/crm/rest/v2/contacts?filter=email_addresses.email==john@example.com\nGET /keap/crm/rest/v2/tasks?filter=completed==false\n\nCode Examples\nJavaScript\nconst response = await fetch(\n  'https://gateway.maton.ai/keap/crm/rest/v2/contacts?page_size=10',\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\nresponse = requests.get(\n    'https://gateway.maton.ai/keap/crm/rest/v2/contacts',\n    headers={'Authorization': f'Bearer {os.environ[\"MATON_API_KEY\"]}'},\n    params={'page_size': 10}\n)\ndata = response.json()\n\nNotes\nAll API paths must include /crm/rest prefix (e.g., /keap/crm/rest/v2/contacts)\nKeap uses v2 REST API (previous v1 API is deprecated)\nTimestamps are in ISO 8601 format\nIDs are returned as strings\nPagination uses page_size and page_token (not offset-based)\nMaximum page_size is 1000\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 Keap connection or invalid request\n401\tInvalid or missing Maton API key\n403\tNot authorized (check OAuth scopes)\n404\tResource not found\n429\tRate limited\n4xx/5xx\tPassthrough error from Keap 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:\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 keap. For example:\nCorrect: https://gateway.maton.ai/keap/crm/rest/v2/contacts\nIncorrect: https://gateway.maton.ai/crm/rest/v2/contacts\nResources\nKeap Developer Portal\nKeap REST API V2 Documentation\nGetting Started Guide\nOAuth 2.0 Authentication\nMaton Community\nMaton Support"
  },
  "trust": {
    "sourceLabel": "tencent",
    "provenanceUrl": "https://clawhub.ai/byungkyu/keap",
    "publisherUrl": "https://clawhub.ai/byungkyu/keap",
    "owner": "byungkyu",
    "version": "1.0.2",
    "license": null,
    "verificationStatus": "Indexed source record"
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/keap",
    "downloadUrl": "https://openagent3.xyz/downloads/keap",
    "agentUrl": "https://openagent3.xyz/skills/keap/agent",
    "manifestUrl": "https://openagent3.xyz/skills/keap/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/keap/agent.md"
  }
}