Skip to main content
Developer Resources

LeadNod API Documentation

Build powerful integrations with the LeadNod platform. Our RESTful API gives you programmatic access to manage engagements, track performance, process payments, and automate your sales operations.

Getting Started

The LeadNod API provides programmatic access to the LeadNod platform, enabling you to integrate sales professional matching, engagement management, payment processing, and analytics into your own applications. Our API follows RESTful principles, uses standard HTTP methods, and returns JSON responses.

Whether you are building a custom CRM integration, automating your sales operations, or creating a white-label solution, our API provides the flexibility and power you need. This documentation covers everything from basic authentication to advanced webhook configurations, with code examples in multiple programming languages.

API Capabilities

The LeadNod API enables you to perform a wide range of operations including managing user accounts and profiles programmatically, creating and managing sales opportunities, searching and filtering sales professional matches, initiating and managing engagements between parties, processing payments through our escrow system, tracking performance metrics and generating reports, sending and receiving platform messages, and configuring webhooks for real-time event notifications.

Prerequisites

Before you can start using the LeadNod API, you will need a LeadNod account with API access enabled, API credentials consisting of a Client ID and Client Secret, and basic understanding of RESTful APIs and HTTP methods. API access is available on our Professional and Enterprise plans. If you are on a different plan and need API access, please contact our sales team to discuss upgrade options.

Authentication

The LeadNod API uses OAuth 2.0 for authentication. All API requests must include a valid access token in the Authorization header. Access tokens are obtained through the OAuth 2.0 token endpoint using your client credentials.

Obtaining Access Tokens

To obtain an access token, make a POST request to our token endpoint with your client credentials. The response will include an access token that you can use for subsequent API requests. Access tokens are valid for one hour by default, after which you will need to request a new token.

# Request an access token

curl -X POST https://api.leadnod.com/oauth/token \
  -H "Content-Type: application/json" \
  -d '{
    "grant_type": "client_credentials",
    "client_id": "your_client_id",
    "client_secret": "your_client_secret"
  }'

# Response

{
  "access_token": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9...",
  "token_type": "Bearer",
  "expires_in": 3600,
  "scope": "read write"
}

Using Access Tokens

Include the access token in the Authorization header of all API requests. The token should be prefixed with "Bearer " followed by a space and then the token value.

# Making an authenticated request

curl -X GET https://api.leadnod.com/v1/users/me \
  -H "Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9..."

Token Security

Protect your API credentials and access tokens carefully. Never expose your client secret in client-side code or public repositories. Store credentials securely using environment variables or a secrets management system. Rotate your client secret periodically and immediately if you suspect it has been compromised. Use HTTPS for all API communications to prevent token interception.

Base URL

All API requests should be made to the following base URL:

https://api.leadnod.com/v1

We also provide a sandbox environment for testing and development purposes. The sandbox environment uses separate credentials and contains test data only.

https://sandbox.api.leadnod.com/v1

All endpoints are relative to these base URLs. For example, to access the users endpoint, you would make a request to https://api.leadnod.com/v1/users in production or https://sandbox.api.leadnod.com/v1/users in the sandbox environment.

Rate Limits

To ensure fair usage and maintain platform stability, the LeadNod API implements rate limiting. Rate limits vary based on your subscription plan and the specific endpoint being accessed.

Plan Requests/Minute Requests/Day
Professional 60 10,000
Enterprise 300 100,000
Custom Negotiable Negotiable

Rate Limit Headers

Every API response includes headers that provide information about your current rate limit status:

X-RateLimit-Limit: Maximum requests allowed per window

X-RateLimit-Remaining: Requests remaining in current window

X-RateLimit-Reset: Unix timestamp when the rate limit resets

Handling Rate Limits

When you exceed the rate limit, the API returns a 429 Too Many Requests response. Your application should handle this gracefully by implementing exponential backoff. Wait for the time indicated in the Retry-After header before making additional requests. Consider caching responses where appropriate to reduce the number of API calls needed.

API Endpoints

The LeadNod API is organized around REST resources. Below is a comprehensive reference for all available endpoints, organized by resource type.

Users

The Users API allows you to manage user accounts, profiles, and preferences. You can retrieve user information, update profiles, and manage team members for Client accounts.

GET /users/me Get current user profile
PATCH /users/me Update current user profile
GET /users/{id} Get user by ID
GET /users/search Search sales professionals

# Example: Get current user profile

curl -X GET https://api.leadnod.com/v1/users/me \
  -H "Authorization: Bearer {access_token}"

# Response
{
  "id": "usr_abc123",
  "type": "client",
  "email": "[email protected]",
  "name": "John Smith",
  "company": "Acme Corp",
  "industry": "saas",
  "created_at": "2024-01-15T10:30:00Z",
  "profile": {
    "avatar_url": "https://...",
    "bio": "...",
    "website": "https://acme.com"
  }
}

Opportunities

The Opportunities API enables Clients to create and manage sales opportunities. Sales Professionals can browse and express interest in available opportunities.

GET /opportunities List all opportunities
POST /opportunities Create new opportunity
GET /opportunities/{id} Get opportunity details
PATCH /opportunities/{id} Update opportunity
DELETE /opportunities/{id} Delete opportunity
GET /opportunities/{id}/matches Get matched candidates

# Example: Create a new opportunity

curl -X POST https://api.leadnod.com/v1/opportunities \
  -H "Authorization: Bearer {access_token}" \
  -H "Content-Type: application/json" \
  -d '{
    "title": "Enterprise Account Executive",
    "industry": "saas",
    "description": "Looking for experienced AE...",
    "compensation_model": "hybrid",
    "base_salary_range": {"min": 80000, "max": 120000},
    "commission_rate": 0.10,
    "duration": "ongoing",
    "requirements": ["5+ years experience", "Enterprise sales"]
  }'

Engagements

The Engagements API manages active working relationships between Clients and Sales Professionals. Create engagements, track progress, log activities, and manage the engagement lifecycle.

GET /engagements List all engagements
POST /engagements Create new engagement
GET /engagements/{id}/activities Get engagement activities
POST /engagements/{id}/activities Log new activity
GET /engagements/{id}/metrics Get performance metrics

Payments

The Payments API handles all financial transactions including escrow funding, payment releases, and transaction history. All payment operations are processed through our secure escrow system.

GET /payments List payment history
POST /payments/escrow/fund Fund escrow account
POST /payments/escrow/release Release escrow payment
GET /payments/balance Get escrow balance

Messages

The Messages API enables secure communication between users on the platform. Send messages, retrieve conversation history, and manage notification preferences.

GET /messages/conversations List conversations
GET /messages/conversations/{id} Get conversation messages
POST /messages/send Send a message

Analytics

The Analytics API provides access to performance data, reports, and insights. Generate custom reports, track KPIs, and export data for analysis.

GET /analytics/summary Get analytics summary
GET /analytics/engagement/{id} Get engagement analytics
POST /analytics/reports Generate custom report
GET /analytics/export Export analytics data

Webhooks

Webhooks enable real-time notifications when events occur on the LeadNod platform. Instead of polling our API for changes, you can register webhook endpoints to receive HTTP POST requests with event data automatically.

Supported Events

LeadNod supports webhooks for a wide variety of events across the platform. These include user events such as user.created, user.updated, and user.verified. Opportunity events include opportunity.created, opportunity.updated, opportunity.closed, and opportunity.matched. Engagement events cover engagement.created, engagement.started, engagement.completed, engagement.terminated, and activity.logged. Payment events include payment.received, payment.released, escrow.funded, and escrow.dispute. Message events include message.received and conversation.started.

Webhook Configuration

Configure webhooks through the API or your account dashboard. Each webhook configuration includes a URL endpoint, the events to subscribe to, and an optional secret for signature verification.

# Register a webhook endpoint

curl -X POST https://api.leadnod.com/v1/webhooks \
  -H "Authorization: Bearer {access_token}" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://your-app.com/webhooks/leadnod",
    "events": ["engagement.created", "payment.received"],
    "secret": "your_webhook_secret"
  }'

Webhook Payload

Webhook payloads are delivered as JSON and include the event type, timestamp, and relevant data. All webhooks include a signature header that you should verify to ensure the request originated from LeadNod.

# Example webhook payload

{
  "id": "evt_123abc",
  "type": "engagement.created",
  "created": "2024-03-15T14:30:00Z",
  "data": {
    "engagement_id": "eng_456def",
    "client_id": "usr_789ghi",
    "sales_pro_id": "usr_012jkl",
    "status": "pending"
  }
}

Signature Verification

Each webhook request includes an X-LeadNod-Signature header containing an HMAC-SHA256 signature of the payload using your webhook secret. Verify this signature to confirm the request is authentic and has not been tampered with. Always verify signatures before processing webhook data.

SDKs and Libraries

We provide official SDKs for popular programming languages to simplify integration with the LeadNod API. These libraries handle authentication, request formatting, error handling, and provide convenient methods for all API operations.

JS

JavaScript / Node.js

npm install @leadnod/sdk

Full-featured SDK for Node.js applications with TypeScript support. Works in both server and browser environments with appropriate configurations.

PY

Python

pip install leadnod

Python SDK with async support, type hints, and comprehensive documentation. Compatible with Python 3.8 and above.

RB

Ruby

gem install leadnod

Ruby gem following Rails conventions with clean, idiomatic interfaces. Supports Ruby 2.7 and above.

PHP

PHP

composer require leadnod/sdk

PHP library compatible with PHP 8.0 and above. Integrates well with Laravel, Symfony, and other frameworks.

All SDKs are open source and available on GitHub. Community contributions and feedback are welcome. If you need an SDK for a language not listed here, please contact our developer relations team or consider contributing one to our community.

Error Handling

The LeadNod API uses conventional HTTP response codes to indicate the success or failure of requests. Codes in the 2xx range indicate success, codes in the 4xx range indicate client errors, and codes in the 5xx range indicate server errors.

Code Description
200 Success - Request completed successfully
201 Created - Resource created successfully
400 Bad Request - Invalid parameters or malformed request
401 Unauthorized - Invalid or missing authentication
403 Forbidden - Insufficient permissions for this action
404 Not Found - Requested resource does not exist
429 Too Many Requests - Rate limit exceeded
500 Internal Server Error - Something went wrong on our end

Error Response Format

Error responses include a JSON body with details about what went wrong:

{
  "error": {
    "code": "invalid_parameter",
    "message": "The 'email' field must be a valid email address.",
    "param": "email",
    "doc_url": "https://docs.leadnod.com/errors/invalid_parameter"
  }
}

Changelog

v1.5.0 March 2024
  • Added analytics export endpoint for bulk data download
  • Introduced custom report generation API
  • Enhanced webhook payload with additional metadata
  • Improved rate limit headers with reset timestamps
v1.4.0 January 2024
  • New engagement activity logging endpoints
  • Added support for bulk opportunity creation
  • Enhanced search filters for sales professional discovery
  • Python SDK released with async support
v1.3.0 October 2023
  • Webhook signature verification added
  • New payment dispute resolution endpoints
  • Enhanced error messages with documentation links
  • PHP SDK released

Need Help?

Our developer support team is here to assist you with integration questions, troubleshooting, and best practices.