REST API Reference
REST API Reference
4 min readAPI Authentication & Security
How to authenticate against the LeadForge API using JWT Bearer tokens and API keys.
API Authentication & Security
All requests to protected LeadForge REST endpoints require Bearer authentication using JSON Web Tokens (JWT) or Workspace API Keys.
1. Obtaining a Token
bash
curl -X POST "http://127.0.0.1:8000/api/v1/auth/login" \
-H "Content-Type: application/json" \
-d '{"email": "user@example.com", "password": "yourpassword"}'Response:
json
{
"access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"token_type": "bearer",
"expires_in": 86400
}2. Using the Bearer Token
Include the token in the Authorization header for all subsequent API calls:
bash
curl -X GET "http://127.0.0.1:8000/api/v1/discovery/leads" \
-H "Authorization: Bearer <your_access_token>"Was this article helpful?
Help us improve LeadForge documentation with your feedback.