Quickstart
This guide walks you through the fastest path to getting products into agentlyleads: issue an API key, push a small catalog via POST /api/v1/products, and verify the result with GET /api/v1/products.
Time: ~5 minutes. What you need: an agentlyleads account with owner access and curl (or any HTTP client).
Step 1 — Issue an API key
- Sign in to agentlyleads and open Settings → API keys.
- Click Issue key, give it a name (e.g.
quickstart), and confirm. - Copy the full key —
alk_live_…— immediately. It is shown once and cannot be retrieved again.
Store the key as a secret. If it is exposed, revoke it from the same screen and issue a new one.
Set it as an environment variable for the next steps:
export AL_KEY="alk_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"Step 2 — Push your first products
Send a POST /api/v1/products request with a small array of products. The endpoint is an idempotent bulk upsert — it creates products that don't exist yet and updates any that do (matched by sku).
curl -s -X POST https://agentlyleads.com/api/v1/products \
-H "Authorization: Bearer $AL_KEY" \
-H "Content-Type: application/json" \
-d '{
"products": [
{ "name": "4G Router", "sku": "RTR-4G", "price": 199, "cost": 120, "category": "Electronics", "unit": "each", "stockQty": 50, "type": "PRODUCT" },
{ "name": "Pro Plan", "sku": "PRO-1", "price": 29, "category": "SaaS", "type": "SUBSCRIPTION", "billingPeriod": "MONTHLY" }
]
}'const res = await fetch("https://agentlyleads.com/api/v1/products", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.AL_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
products: [
{ name: "4G Router", sku: "RTR-4G", price: 199, cost: 120, category: "Electronics", unit: "each", stockQty: 50, type: "PRODUCT" },
{ name: "Pro Plan", sku: "PRO-1", price: 29, category: "SaaS", type: "SUBSCRIPTION", billingPeriod: "MONTHLY" },
],
}),
});
const data = await res.json();
console.log(res.status, data);import os, requests
res = requests.post(
"https://agentlyleads.com/api/v1/products",
headers={"Authorization": f"Bearer {os.environ['AL_KEY']}"},
json={
"products": [
{"name": "4G Router", "sku": "RTR-4G", "price": 199, "cost": 120, "category": "Electronics", "unit": "each", "stockQty": 50, "type": "PRODUCT"},
{"name": "Pro Plan", "sku": "PRO-1", "price": 29, "category": "SaaS", "type": "SUBSCRIPTION", "billingPeriod": "MONTHLY"},
]
},
)
print(res.status_code, res.json())A successful response looks like this:
{
"created": 2,
"updated": 0,
"errors": 0,
"results": [
{ "index": 0, "status": "created", "id": "cmq1abc2def3ghi4jkl5" },
{ "index": 1, "status": "created", "id": "cmq6mno7pqr8stu9vwx0" }
]
}200— every row succeeded.207— partial success: some rows succeeded, some failed. Checkresults[].statusandresults[].errorfor per-row details.
A row that fails validation does not abort the batch. Valid rows are written; failed rows are skipped and reported in results.
Step 3 — Verify
Confirm the products landed by fetching them back:
# List all products in your workspace
curl -s "https://agentlyleads.com/api/v1/products" \
-H "Authorization: Bearer $AL_KEY"
# Filter by SKU
curl -s "https://agentlyleads.com/api/v1/products?sku=RTR-4G" \
-H "Authorization: Bearer $AL_KEY"
# Filter by category
curl -s "https://agentlyleads.com/api/v1/products?category=Electronics" \
-H "Authorization: Bearer $AL_KEY"The response has this shape:
{
"products": [
{
"id": "cmq1abc2def3ghi4jkl5",
"name": "4G Router",
"sku": "RTR-4G",
"price": 199,
"category": "Electronics",
"active": true
}
]
}You can also verify in the UI: open Offerings in agentlyleads — the products appear there and are ready to add to deals and quotes.
Next steps
- Keep the catalog in sync — run the same
POST /api/v1/productsrequest on a schedule (e.g. nightly cron). It is safe to re-run: existing products are updated, new ones are created, nothing is duplicated. - Import from HubSpot — if your catalog lives in HubSpot, use the HubSpot UI Connector (no terminal) or the HubSpot CLI Connector (scripted).
- Connect an AI assistant — use the MCP Connector to let ChatGPT or Claude query and update the CRM through natural language.
- Full API reference — see Products API for all fields, error codes, and bulk limits.
MCP Connector
Connect ChatGPT or Claude to your agentlyleads CRM via the Model Context Protocol (MCP) — query contacts, log communications, manage tasks, and more from any AI assistant.
Automations
Run actions when records are created, change, reply or go quiet. Triggers, conditions, actions, the variables you can use, and how to read a rule's runs.