## Quickstart Get started with Lusha’s API in a few steps: 1. **API Key Setup** - Generate and manage your key in the Lusha dashboard. - Store securely (e.g., environment variables). 2. **Authenticate Requests** - Add `Authorization` header: `Bearer YOUR_API_KEY`. - Example (cURL & Node.js snippets included). 3. **First Call: `GET /v2/person`** - Send `firstName`, `lastName`, `company`. - Parse JSON and locate fields like `email`, `phone`. 4. **Error Handling Tips** - Check for 4xx/5xx codes. - Handle rate limits (HTTP 429) with retry logic. ## Core Concepts Key concepts for consistent, reliable usage: - **Endpoints at a Glance** | Resource | Endpoint | Purpose | | --- | --- | --- | | Person | `GET /v2/person` | Lookup contact details | | | `POST /v2/person` | Bulk person enrichment | | Company | `GET /v2/company` | Lookup company info | | | `POST /v2/company` | Bulk company enrichment | | Prospect | `POST /prospecting/contact/search` | Search for contacts | | | `POST /prospecting/contact/enrich` | Enrich contact data | | | `POST /prospecting/company/search` | Search for companies | | | `POST /prospecting/company/enrich` | Enrich company data | | Account | `GET /account/usage` | Check credit usage | - **Data Models** - Important fields: `email`, `phone`, `location`, `linkedin`. - Nested JSON objects: validate with provided schemas. - **Rate Limits & Pagination** - Rate limit: 25 requests/minute. - Pagination: define `page: X` token in request. - **Error Codes & Debugging** - Check table of common HTTP statuses + Lusha error codes. - Logging best practices to capture request/response. ## Integration Guides Step-by-step tutorials for common platforms: - **Salesforce** - Apex trigger on `Lead` creation → call Lusha API → update fields. - Flows for easy webhook API implementation. - **HubSpot** - Workflow → custom webhook - Map response to HubSpot properties (YAML/JSON examples). - **Webhooks** - Subscribe to events (e.g., data updates). - Verify signatures; Node.js/Express listener example. - **Bulk Enrichment** - Python script: read CSV, `POST /v1/bulk`, poll for results, write CSV/database. - **SDK Examples (Node.js, Python, Java)** - Community wrappers: install, initialize, fetch data. - Equivalent raw HTTP examples. ## Advanced Topics Deep dives for power users: - **Performance & Cost** - Batch requests, caching (Redis/in-memory), cost optimization. - **Complex Queries** - Combine parameters for higher accuracy, client-side fuzzy matching. - **Security Best Practices** - Encrypt API keys, rotate keys, enforce least privilege, audit logging. - **Orchestration Workflows** - Slack `/enrich` slash command → serverless → Lusha → Slack. - Terraform/CloudFormation snippets for AWS Lambda and API Gateway. - **Data Quality & Fallbacks** - Handle missing fields: fallback to alternative data sources, merge multiple enrichers. - **Schema & Data Modeling** - DB table structures (Postgres, MongoDB), indexing (email hash, domain), migration strategies. - **Compliance & Privacy** - GDPR/CCPA guidelines: retention policies, anonymization, privacy disclaimers. - **Custom Connectors** - Build for Workato, Zapier, Make: HTTP module config, auth, mapping, error patterns. ## Resources - [**Full API Doc**](/apis/openapi): Complete endpoint docs with examples (cURL, Node.js, Python, Java). - [**Changelog & Release Notes**](/changelog): Track new endpoints, parameter changes, deprecations. - [**Help Center**](/tutorials): Links to community-driven wrappers; installation and usage. - **Explore the Postman Public Environment**: Test out the API endpoints and see how the data is structured. You can access our public Postman workspace to experiment with live examples and understand the response formats - [Access Lusha's Postman Workspace!](https://www.postman.com/lushateam/workspace/lusha-s-api/collection/28683568-fc849873-9ae1-47dd-8159-0d4deda04750)