leadgenius-apilisted
Install: claude install-skill thierryteisseire/leadgenius-skill
# LeadGenius Pro API — Skill Reference
This skill provides a comprehensive interface for interacting with the **LeadGenius Pro API v1.1**.
> **Base URL:** `https://last.leadgenius.app/api`
> **Full Reference:** See [references/api_reference.md](references/api_reference.md)
---
## Authentication
LeadGenius supports three authentication methods, tried in order by `getAuthContext`:
| Priority | Method | How It Works | Use Case |
|----------|--------|--------------|----------|
| 1 | **Cognito Cookies** | Automatic via browser session (`next/headers` cookies) | Web app (frontend) |
| 2 | **Bearer JWT** ✨ | `Authorization: Bearer <accessToken>` header; JWT `sub` claim extracted as owner | **External scripts, agents, CLI tools** |
| 3 | **API Key** | `x-api-key: <key>` + `x-user-id: <sub>` headers | Bulk data extraction, service-to-service |
### Getting a JWT Token
```bash
# Option 1: Use the test/auth script
python3 scripts/auth.py --email your@email.com
# Option 2: Direct API call
curl -X POST https://last.leadgenius.app/api/auth \
-H "Content-Type: application/json" \
-d '{"username": "your@email.com", "password": "YourPassword"}'
```
**Response:**
```json
{
"success": true,
"tokens": {
"accessToken": "eyJra...",
"idToken": "eyJra...",
"refreshToken": "eyJj...",
"expiresIn": 3600
}
}
```
Use `tokens.accessToken` as the Bearer token for all subsequent API calls. Tokens expire after 1 hour.
### Token Refresh
When your access token expires, use