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
API Reference
Advanced
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.
/users/me
Get current user profile
/users/me
Update current user profile
/users/{id}
Get user by ID
/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.
/opportunities
List all opportunities
/opportunities
Create new opportunity
/opportunities/{id}
Get opportunity details
/opportunities/{id}
Update opportunity
/opportunities/{id}
Delete opportunity
/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.
/engagements
List all engagements
/engagements
Create new engagement
/engagements/{id}/activities
Get engagement activities
/engagements/{id}/activities
Log new activity
/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.
/payments
List payment history
/payments/escrow/fund
Fund escrow account
/payments/escrow/release
Release escrow payment
/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.
/messages/conversations
List conversations
/messages/conversations/{id}
Get conversation messages
/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.
/analytics/summary
Get analytics summary
/analytics/engagement/{id}
Get engagement analytics
/analytics/reports
Generate custom report
/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.
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.
Python
pip install leadnod
Python SDK with async support, type hints, and comprehensive documentation. Compatible with Python 3.8 and above.
Ruby
gem install leadnod
Ruby gem following Rails conventions with clean, idiomatic interfaces. Supports Ruby 2.7 and above.
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
- 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
- New engagement activity logging endpoints
- Added support for bulk opportunity creation
- Enhanced search filters for sales professional discovery
- Python SDK released with async support
- 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.