Basic information
About keap
Keap API integration with managed OAuth. Manage contacts, companies, tags, tasks, orders, opportunities, and campaigns for CRM and marketing automation. Use this skill when users want to create and manage contacts, apply tags, track opportunities, or automate marketing workflows in Keap. For other third party apps, use the api-gateway skill (https://clawhub.ai/byungkyu/api-gateway). Requires network access and valid Maton API key.
keap is an agent skill listed in the AddMCP.net directory, published by openclaw. Source code is hosted on github.com.
Overview
What is keap?
name: keap description: | Keap API integration with managed OAuth. Manage contacts, companies, tags, tasks, orders, opportunities, and campaigns for CRM and marketing automation. Use this skill when users want to create and manage contacts, apply tags, track opportunities, or automate marketing workflows in Keap. For other third party apps, use the api-gateway skill (https://clawhub.ai/byungkyu/api-gateway). Requires network access and valid Maton API key. metadata: author: maton version: "1.0" clawdbot: emoji: 🧠 requires: env:
- MATON_API_KEY
Keap
Access the Keap API with managed OAuth authentication. Manage contacts, companies, tags, tasks, orders, opportunities, campaigns, and more for CRM and marketing automation.
Quick Start
# List contacts
python <<'EOF'
import urllib.request, os, json
req = urllib.request.Request('https://gateway.maton.ai/keap/crm/rest/v2/contacts?page_size=10')
req.add_header('Authorization', f'Bearer {os.environ["MATON_API_KEY"]}')
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
EOFBase URL
https://gateway.maton.ai/keap/crm/rest/{api-path}
The gateway proxies requests to api.infusionsoft.com/crm/rest and automatically injects your OAuth token.
Authentication
All requests require the Maton API key in the Authorization header:
Authorization: Bearer $MATON_API_KEY
Environment Variable: Set your API key as MATON_API_KEY:
export MATON_API_KEY="YOUR_API_KEY"
Getting Your API Key
- Sign in or create an account at maton.ai
- Go to maton.ai/settings
- Copy your API key
Connection Management
Manage your Keap OAuth connections at https://ctrl.maton.ai.
List Connections
python <<'EOF'
import urllib.request, os, json
req = urllib.request.Request('https://ctrl.maton.ai/connections?app=keap&status=ACTIVE')
req.add_header('Authorization', f'Bearer {os.environ["MATON_API_KEY"]}')
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
EOF
Create Connection
python <<'EOF'
import urllib.request, os, json
data = json.dumps({'app': 'keap'}).encode()
req = urllib.request.Request('https://ctrl.maton.ai/connections', data=data, method='POST')
req.add_header('Authorization', f'Bearer {os.environ["MATON_API_KEY"]}')
req.add_header('Content-Type', 'application/json')
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
EOF
Get Connection
python <<'EOF'
import urllib.request, os, json
req = urllib.request.Request('https://ctrl.maton.ai/connections/{connection_id}')
req.add_header('Authorization', f'Bearer {os.environ["MATON_API_KEY"]}')
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
EOF
Response:
{
"connection": {
"connection_id": "d5242090-02ae-4195-83e3-8deca823eb9a",
"status": "ACTIVE",
"creation_time": "2026-02-08T01:34:44.738374Z",
"last_updated_time": "2026-02-08T01:35:20.106942Z",
"url": "https://connect.maton.ai/?session_token=...",
"app": "keap",
"metadata": {}
}
}
Open the returned url in a browser to complete OAuth authorization.
Delete Connection
python <<'EOF'
import urllib.request, os, json
req = urllib.request.Request('https://ctrl.maton.ai/connections/{connection_id}', method='DELETE')
req.add_header('Authorization', f'Bearer {os.environ["MATON_API_KEY"]}')
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
EOF
Specifying Connection
If you have multiple Keap connections, specify which one to use with the Maton-Connection header:
python <<'EOF'
import urllib.request, os, json
req = urllib.request.Request('https://gateway.maton.ai/keap/crm/rest/v2/contacts')
req.add_header('Authorization', f'Bearer {os.environ["MATON_API_KEY"]}')
req.add_header('Maton-Connection', 'd5242090-02ae-4195-83e3-8deca823eb9a')
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
EOF
If omitted, the gateway uses the default (oldest) active connection.
API Reference
Email body
" } ``` ### User Operations #### List Users ```bash GET /keap/crm/rest/v2/users ``` #### Get User ```bash GET /keap/crm/rest/v2/users/{user_id} ``` ### Subscription Operations #### List Subscriptions ```bash GET /keap/crm/rest/v2/subscriptions ``` #### Get Subscription ```bash GET /keap/crm/rest/v2/subscriptions/{subscription_id} ``` ### Affiliate Operations #### List Affiliates ```bash GET /keap/crm/rest/v2/affiliates ``` #### Get Affiliate ```bash GET /keap/crm/rest/v2/affiliates/{affiliate_id} ``` ### Automation Operations #### List Automations ```bash GET /keap/crm/rest/v2/automations ``` #### Get Automation ```bash GET /keap/crm/rest/v2/automations/{automation_id} ```Pagination
Keap uses token-based pagination:
GET /keap/crm/rest/v2/contacts?page_size=50
Response:
{
"contacts": [...],
"next_page_token": "abc123"
}
For subsequent pages, use the page_token parameter:
GET /keap/crm/rest/v2/contacts?page_size=50&page_token=abc123
When next_page_token is empty, there are no more pages.
Filtering
Use the filter parameter for filtering results:
GET /keap/crm/rest/v2/contacts?filter=given_name==John
GET /keap/crm/rest/v2/[email protected]
GET /keap/crm/rest/v2/tasks?filter=completed==falseCode Examples
JavaScript
const response = await fetch(
'https://gateway.maton.ai/keap/crm/rest/v2/contacts?page_size=10',
{
headers: {
'Authorization': `Bearer ${process.env.MATON_API_KEY}`
}
}
);
const data = await response.json();
Python
import os
import requests
response = requests.get(
'https://gateway.maton.ai/keap/crm/rest/v2/contacts',
headers={'Authorization': f'Bearer {os.environ["MATON_API_KEY"]}'},
params={'page_size': 10}
)
data = response.json()Notes
- All API paths must include
/crm/restprefix (e.g.,/keap/crm/rest/v2/contacts) - Keap uses v2 REST API (previous v1 API is deprecated)
- Timestamps are in ISO 8601 format
- IDs are returned as strings
- Pagination uses
page_sizeandpage_token(not offset-based) - Maximum
page_sizeis 1000 - IMPORTANT: When piping curl output to
jqor other commands, environment variables like$MATON_API_KEYmay not expand correctly in some shell environments
Error Handling
| Status | Meaning | |--------|---------| | 400 | Missing Keap connection or invalid request | | 401 | Invalid or missing Maton API key | | 403 | Not authorized (check OAuth scopes) | | 404 | Resource not found | | 429 | Rate limited | | 4xx/5xx | Passthrough error from Keap API |
Troubleshooting: API Key Issues
- Check that the
MATON_API_KEYenvironment variable is set:
echo $MATON_API_KEY
- Verify the API key is valid by listing connections:
python <<'EOF'
import urllib.request, os, json
req = urllib.request.Request('https://ctrl.maton.ai/connections')
req.add_header('Authorization', f'Bearer {os.environ["MATON_API_KEY"]}')
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
EOF
Troubleshooting: Invalid App Name
- Ensure your URL path starts with
keap. For example:
- Correct:
https://gateway.maton.ai/keap/crm/rest/v2/contacts - Incorrect:
https://gateway.maton.ai/crm/rest/v2/contacts
Comments
No comments yet
Be the first to share feedback about this listing. Sign in to leave a comment.
Sign In