Official SDKs
Integrate Hone CRM into your application with our official client libraries. All examples below use TypeScript; for raw HTTP, see the API reference.
TypeScript
Available@honecrm/sdkPython
Coming soonhonecrm (pypi)Go
Coming soongithub.com/honecrm/honecrm-gonpm install @honecrm/sdk
API keys start with hone_ and are passed via Authorization: Bearer under the hood. Create a key in Settings → Developer, scope it narrowly (read-only where possible), and rotate regularly.
// 1. Create an API key in Settings → Developer → API Keys.
// Copy the raw key immediately — it's only shown once.
//
// 2. Pass it to the SDK client. Never commit keys to source control;
// use an env var or a secret manager in production.
const client = new HoneCRM({
apiKey: process.env.HONE_API_KEY!,
});The Hone CRM CLI lets you manage your CRM directly from the terminal. Install globally via npm, authenticate with your API key, and use the same resources available in the SDK.
Install & Authenticate
# Install globally npm install -g @honecrm/cli # Authenticate hone auth login hone_xxxx_your_api_key # Or use an environment variable export HONE_API_KEY=hone_xxxx_your_api_key
Usage
All commands support --json for machine-readable output. Pipe to jq, scripts, or other tools.
# List deals hone deals list hone deals list --stage negotiation --status active --json # Get deal details hone deals get deal_abc123 # Create a deal hone deals create --name "Acme Renewal" --value 50000 \ --contact-name "Jane Doe" --contact-email "jane@acme.com" # Update a deal hone deals update deal_abc123 --stage closed_won # Manage contacts hone contacts list --limit 50 hone contacts create --name "Jane Doe" --email "jane@acme.com" # Manage companies hone companies list hone companies create --name "Acme Corp" --domain acme.com # Notes hone notes create --entity-type deal --entity-id deal_abc123 \ --content "Discussed renewal terms" # Search across everything hone search "acme" # Workflows hone workflows list hone workflows trigger workflow_abc123 hone workflows runs workflow_abc123 # Output as JSON (pipe to jq, scripts, etc.) hone deals list --json | jq '.[] | .name' # Check auth status hone auth status # Point to a different API (staging, local dev) hone auth login hone_xxxx --url https://api.staging.honecrm.com/v1
import { HoneCRM } from '@honecrm/sdk';
const client = new HoneCRM({
apiKey: 'hone_xxxx',
});
// List deals
const { deals } = await client.deals.list({ stage: 'qualified' });
// Create a deal
const deal = await client.deals.create({
name: 'Acme renewal',
contact: { name: 'Jane Doe', email: 'jane@acme.com' },
value: 50_000,
});const client = new HoneCRM({
apiKey: 'hone_xxxx', // Required
baseUrl: 'https://api.honecrm.com/v1', // Default
timeout: 30_000, // Default (ms)
});Full CRUD operations on sales deals.
// List with filters
const { deals, totalCount } = await client.deals.list({
stage: 'negotiation',
minValue: 10_000,
limit: 25,
});
// Get a single deal
const deal = await client.deals.get('deal-id');
// Create
const newDeal = await client.deals.create({
name: 'Enterprise contract',
contact: { name: 'John Smith', email: 'john@corp.com', company: 'Corp Inc' },
value: 120_000,
stage: 'proposal',
tags: ['enterprise', 'q2'],
});
// Update
await client.deals.update('deal-id', { stage: 'closed_won' });
// Delete
await client.deals.delete('deal-id');Manage contact records linked to deals and companies.
const { contacts } = await client.contacts.list({ search: 'jane' });
const contact = await client.contacts.create({
name: 'Jane Doe',
email: 'jane@acme.com',
companyName: 'Acme Corp',
});
await client.contacts.update('contact-id', { phone: '+1-555-0123' });
await client.contacts.delete('contact-id');Manage company records with firmographic enrichment.
const { companies } = await client.companies.list({ industry: 'SaaS' });
const company = await client.companies.create({
name: 'Acme Corp',
domain: 'acme.com',
industry: 'SaaS',
});Attach notes to deals, contacts, or companies.
const { notes } = await client.notes.list({
entityType: 'deal',
entityId: 'deal-id',
});
await client.notes.create({
entityType: 'deal',
entityId: 'deal-id',
content: 'Follow-up call went well.',
});Create and manage reminders linked to entities.
const { reminders } = await client.reminders.list({ status: 'pending' });
await client.reminders.create({
entityType: 'deal',
entityId: 'deal-id',
title: 'Send proposal',
dueAt: '2026-03-15T09:00:00Z',
});Create and manage automated DAG-based workflows with event, schedule, or manual triggers.
const { workflows } = await client.workflows.list();
// Create a workflow
const workflow = await client.workflows.create({
name: 'Auto-assign high-value deals',
trigger: { type: 'event', eventType: 'deal.created' },
steps: [
{
id: 'check-value',
name: 'Check deal value',
type: 'condition',
condition: {
field: 'trigger.data.deal.value',
operator: 'gte',
value: 100_000,
trueBranch: 'assign-senior',
},
},
{
id: 'assign-senior',
name: 'Assign to senior rep',
type: 'action',
action: {
type: 'assign_deal',
params: {
dealId: '{{trigger.data.deal.id}}',
assigneeId: 'senior-rep-user-id',
},
},
},
],
});
// Trigger manually
const run = await client.workflows.trigger('workflow-id', { dealId: 'deal-123' });
// Check run status
const { runs } = await client.workflows.listRuns('workflow-id');
const details = await client.workflows.getRun('workflow-id', run.id);Configure outbound webhook subscriptions for real-time event delivery.
const webhook = await client.webhooks.create({
url: 'https://your-app.com/webhooks',
events: ['deal.created', 'deal.updated'],
});
const { webhooks } = await client.webhooks.list();
await client.webhooks.update('webhook-id', { isActive: false });
await client.webhooks.delete('webhook-id');Full-text and vector similarity search across all entities.
// Text search
const results = await client.search.query('acme');
// Similarity search
const similar = await client.search.similar({
text: 'enterprise SaaS deal',
types: ['deal', 'company'],
limit: 10,
});Create and manage API keys with scoped permissions.
const { apiKeys } = await client.apiKeys.list();
// Create — rawKey is only returned once
const { apiKey, rawKey } = await client.apiKeys.create({
name: 'CI integration',
scopes: ['deals:read', 'deals:write'],
});Register and manage AI agents with scoped access and rate limits.
const agent = await client.agents.create({
name: 'Deal Enrichment Bot',
apiKeyId: 'key-id',
scopes: ['deals:read', 'deals:write', 'companies:read'],
maxActionsPerHour: 100,
});
const { agents } = await client.agents.list();
await client.agents.update('agent-id', { status: 'suspended' });
await client.agents.delete('agent-id');
// View agent audit log
const { logs } = await client.agents.audit('agent-id');
// Execute action (with dry-run)
const result = await client.agents.execute('agent-id', {
action: 'create_deal',
params: { name: 'Test', value: 1000 },
}, { dryRun: true });Track all interactions and events. Filter by entity, type, or actor.
// List activities for a deal
const { activities } = await client.activities.list({
dealId: 'deal-id',
limit: 50,
});
// Filter by actor type (user, agent, system)
const agentActivities = await client.activities.list({
actorType: 'agent',
});
// Create a manual activity
await client.activities.create({
type: 'meeting',
entityType: 'deal',
entityId: 'deal-id',
description: 'Discovery call with CTO',
});AI-powered predictions: best contact time, deal velocity, churn risk, and anomaly detection.
// Best contact time (Starter+)
const contactTime = await client.predictive.contactTime();
// Deal velocity prediction (Pro+)
const velocity = await client.predictive.velocity('deal-id');
const bulkVelocity = await client.predictive.velocityBulk({ teamId: 'team-id' });
// Churn risk scoring (Team+)
const churn = await client.predictive.churn('deal-id');
const teamChurn = await client.predictive.churnBulk({ minScore: 0.5 });
// Pipeline anomalies (Team+)
const anomalies = await client.predictive.anomalies({ period: 'week' });
// Combined dashboard (Pro+)
const dashboard = await client.predictive.dashboard();Manage user preferences, AI configuration, and email preferences.
// Get user settings
const settings = await client.settings.get();
// Configure AI provider key
await client.settings.setApiKey({
provider: 'anthropic',
apiKey: 'sk-ant-...',
});
// Set AI model for a feature
await client.settings.setAiModel({
feature: 'insights',
provider: 'anthropic',
model: 'claude-sonnet-4-6',
});
// Get AI token usage
const usage = await client.settings.aiUsage({
startDate: '2026-01-01',
endDate: '2026-03-31',
});
// Update email preferences
await client.settings.updateEmailPreferences({
dealNotifications: true,
activityAlerts: true,
marketingEmails: false,
});All list endpoints support cursor-based pagination with limit and nextToken.
let nextToken: string | undefined;
do {
const response = await client.deals.list({ limit: 50, nextToken });
// process response.deals
nextToken = response.nextToken;
} while (nextToken);All SDKs throw/return typed errors with code, status, message, and request ID.
import { HoneCRM, HoneCRMError } from '@honecrm/sdk';
try {
await client.deals.get('nonexistent-id');
} catch (err) {
if (err instanceof HoneCRMError) {
console.error(err.message); // "Deal not found"
console.error(err.code); // "NOT_FOUND"
console.error(err.statusCode); // 404
console.error(err.requestId); // "req_abc123"
}
}