The Agent Lab ICP Generator provides a REST API for AI agents, automation tools (Zapier, Make, n8n), and custom integrations to generate, store, and retrieve Ideal Customer Profiles.
https://nteiowzcwwckdaggqrjg.supabase.co
All API endpoints require license-based authentication. Include your credentials in the request body or query parameters:
{
"license_id": "your-license-id",
"api_key": "your-api-key"
}
Endpoint: POST /functions/v1/validate-icp-license
Description: Validates your license, returns configuration and available API endpoints for your license tier.
Request:
{
"license_id": "lic_abc123def456",
"api_key": "sk_live_abc123def456xyz"
}
Response (Success 200):
{
"valid": true,
"customer_name": "Acme Corp",
"config": {
"version": 1,
"fields": [
{
"name": "company_size",
"type": "dropdown",
"options": ["early", "growth", "scale", "enterprise"]
}
]
},
"config_version": 1,
"integrations_enabled": {
"crm": true,
"email": false,
"slack": true,
"zapier": true
},
"api_endpoints": {
"generate": "/functions/v1/generate-icp-profile",
"list_profiles": "/functions/v1/list-icp-profiles",
"update_profile": "/functions/v1/update-icp-profile",
"sync_webhook": "https://webhook.your-domain.com/icp"
}
}
Response (Error 401):
{
"valid": false,
"error": "Invalid license or API key"
}
Endpoint: POST /functions/v1/generate-icp-profile
Description: Creates and stores a new ICP profile. Returns immediately with the saved profile ID.
Request:
{
"license_id": "lic_abc123def456",
"api_key": "sk_live_abc123def456xyz",
"profile_name": "Tech SaaS ICP Q4 2024",
"profile_data": {
"companySize": "growth",
"revenue": "1-10m",
"industry": ["tech", "finance"],
"stage": "growth",
"decisionRole": ["director", "c-suite"],
"departments": ["sales", "operations"],
"buyingPower": "committee",
"painPoints": [
"Limited operational visibility",
"Tool fragmentation and data silos",
"Lost revenue from missed follow-ups"
],
"budget": "50-200k",
"salesCycle": "3-6mo",
"tools": ["Salesforce", "HubSpot", "Slack"]
}
}
Response (Success 201):
{
"success": true,
"profile_id": "uuid-12345678-abcd",
"profile_name": "Tech SaaS ICP Q4 2024",
"profile_data": { /* same as request */ },
"created_at": "2024-07-08T14:32:00Z"
}
Response (Error 401):
{
"error": "Invalid license or API key"
}
Response (Error 400):
{
"error": "Missing license_id, api_key, or profile_data"
}
Endpoint: GET /functions/v1/list-icp-profiles?license_id=...&api_key=...&limit=50&offset=0
Alternative: POST /functions/v1/list-icp-profiles
Description: Retrieves all saved ICP profiles for your license. Supports pagination.
Query Parameters (GET):
license_id (required): Your license IDapi_key (required): Your API keylimit (optional, default 50): Number of profiles to return (max 100)offset (optional, default 0): Pagination offsetRequest Body (POST):
{
"license_id": "lic_abc123def456",
"api_key": "sk_live_abc123def456xyz",
"limit": 20,
"offset": 0
}
Response (Success 200):
{
"success": true,
"profiles": [
{
"id": "uuid-12345678-abcd",
"license_id": "lic_abc123def456",
"profile_name": "Tech SaaS ICP Q4 2024",
"profile_data": { /* profile object */ },
"synced_to": {
"hubspot": {
"timestamp": "2024-07-08T10:00:00Z",
"contact_id": "hubspot_123"
}
},
"created_at": "2024-07-08T14:32:00Z",
"updated_at": "2024-07-08T14:32:00Z"
}
],
"pagination": {
"limit": 20,
"offset": 0,
"total": 145,
"has_more": true
}
}
POST https://nteiowzcwwckdaggqrjg.supabase.co/functions/v1/generate-icp-profile
profile_data structureprofile_id to trigger downstream actions (create CRM contact, send email, etc.)POSTprofile_id) to your next module for further automations{
"nodes": [
{
"name": "Generate ICP",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.1,
"position": [250, 300],
"parameters": {
"url": "https://nteiowzcwwckdaggqrjg.supabase.co/functions/v1/generate-icp-profile",
"method": "POST",
"sendBody": true,
"bodyParameters": {
"parameters": [
{
"name": "license_id",
"value": "={{ $env['ICP_LICENSE_ID'] }}"
},
{
"name": "api_key",
"value": "={{ $env['ICP_API_KEY'] }}"
},
{
"name": "profile_name",
"value": "={{ $node['Trigger'].json.trigger_name }}"
},
{
"name": "profile_data",
"value": "={{ $node['Transform Data'].json }}"
}
]
}
}
}
]
}
Use your License ID and API Key in your agent’s tools:
import anthropic
import requests
import json
client = anthropic.Anthropic()
tools = [
{
"name": "generate_icp_profile",
"description": "Generate and save an ICP profile based on company criteria",
"input_schema": {
"type": "object",
"properties": {
"company_size": {"type": "string", "enum": ["early", "growth", "scale", "enterprise"]},
"revenue": {"type": "string", "enum": ["0-1m", "1-10m", "10-100m", "100m+"]},
"industry": {"type": "array", "items": {"type": "string"}},
"stage": {"type": "string"},
"decision_roles": {"type": "array", "items": {"type": "string"}},
"profile_name": {"type": "string"}
},
"required": ["company_size", "revenue", "profile_name"]
}
},
{
"name": "list_icp_profiles",
"description": "List all saved ICP profiles for this license",
"input_schema": {
"type": "object",
"properties": {
"limit": {"type": "integer", "default": 10}
}
}
}
]
def generate_icp(profile_data):
response = requests.post(
"https://nteiowzcwwckdaggqrjg.supabase.co/functions/v1/generate-icp-profile",
json={
"license_id": "your-license-id",
"api_key": "your-api-key",
"profile_name": profile_data.get("profile_name"),
"profile_data": profile_data
}
)
return response.json()
def list_icps(limit=10):
response = requests.get(
f"https://nteiowzcwwckdaggqrjg.supabase.co/functions/v1/list-icp-profiles?license_id=your-license-id&api_key=your-api-key&limit={limit}"
)
return response.json()
# Run your agentic loop
while True:
response = client.messages.create(
model="claude-opus-4-1",
max_tokens=1024,
tools=tools,
messages=[
{"role": "user", "content": "Generate an ICP for a B2B SaaS company selling to mid-market tech companies"}
]
)
for block in response.content:
if block.type == "tool_use":
if block.name == "generate_icp_profile":
result = generate_icp(block.input)
elif block.name == "list_icp_profiles":
result = list_icps(block.input.get("limit", 10))
When you configure a webhook URL on your license, we’ll POST events to it automatically:
Event: Profile Generated
{
"event": "icp_profile_generated",
"license_id": "lic_abc123def456",
"profile_id": "uuid-12345678-abcd",
"timestamp": "2024-07-08T14:32:00Z"
}
Use webhooks to trigger downstream actions:
Rate limit headers are included in all responses:
X-RateLimit-Limit: 1000
X-RateLimit-Remaining: 995
X-RateLimit-Reset: 1720444800
All errors return JSON with a status code and error message:
| Status | Error | Meaning |
|---|---|---|
| 400 | Missing required fields | Check your request body |
| 401 | Invalid license or API key | Verify credentials |
| 401 | License expired | Renew your license |
| 405 | Method not allowed | Use the correct HTTP verb |
| 500 | Internal server error | Retry with exponential backoff |
For API issues, integrations help, or to report bugs:
Your license configuration is cached and updated hourly. To force an immediate refresh:
validate-icp-license endpointconfig_version and integrations_enabled fieldsLast Updated: July 8, 2024
API Version: 1.0
Base URL: https://nteiowzcwwckdaggqrjg.supabase.co