DEV Community

Keith Fawcett
Keith Fawcett

Posted on

Getting Started with Coherence API: Your First Integration

Getting Started with Coherence API: Your First Integration

Prerequisites

  • Coherence account (free tier works)
  • API key from dashboard
  • Your favorite HTTP client

Authentication

curl -H "Authorization: Bearer YOUR_API_KEY" \
  https://api.getcoherence.io/v1/workspaces
Enter fullscreen mode Exit fullscreen mode

Create Your First Lead

import { Coherence } from '@coherence/sdk';

const coherence = new Coherence({
  apiKey: process.env.COHERENCE_API_KEY
});

const lead = await coherence.leads.create({
  name: 'Jane Smith',
  email: 'jane@lawfirm.com',
  company: 'Big Law LLP',
  source: 'linkedin',
  score: 85,
  tags: ['legal-tech', 'enterprise']
});

console.log(`Created lead: ${lead.id}`);
Enter fullscreen mode Exit fullscreen mode

Set Up Webhooks

await coherence.webhooks.create({
  url: 'https://your-app.com/webhooks/coherence',
  events: [
    'lead.created',
    'deal.stage_changed',
    'deal.at_risk'
  ]
});
Enter fullscreen mode Exit fullscreen mode

Next Steps

  • Explore the full API reference
  • Check out our SDK examples
  • Join the developer community

docs.getcoherence.io →

Top comments (0)