Developer docs · v1
JournoPilot API v1 Documentation
This documentation covers our secure API v1 endpoints designed primarily for enterprise customer integrations.
https://journopilot.com/api/v1
Authentication
All API requests require authentication using API keys. Contact your account manager to obtain API credentials.
API Key Authentication
Include your API key in the request header:
X-API-Key: your_api_key_here
HMAC Signature (Optional)
For enhanced security on critical endpoints, you can use HMAC signature validation:
X-API-Signature: hmac_sha256_signature
X-API-Timestamp: unix_timestamp
Rate Limiting
Standard
100
requests per minute
Burst
200
requests per minute
Enterprise
Custom
limits available for enterprise customers
Rate limit information is included in response headers:
| Header | Description |
|---|---|
X-RateLimit-Limit | Your rate limit |
X-RateLimit-Remaining | Remaining requests in current window |
X-RateLimit-Reset | When the current window resets |
Security Best Practices
- Use HTTPS: All API calls must use HTTPS
- Validate certificates: Always verify SSL certificates
- Store credentials securely: Use environment variables or secure vaults
- Implement retry logic: Handle rate limits gracefully
- Log security events: Monitor for unusual API usage patterns
- Rotate credentials: Regularly rotate API keys
API Endpoints
GET /api/v1/info
Rate limit 50/min
Get API version and basic information
Response example
{
"timestamp": "2024-01-15T10:30:00Z",
"status": "success",
"data": {
"version": "1.0",
"timestamp": "2024-01-15T10:30:00Z",
"documentation": "https://journopilot.com/api/v1/docs",
"rate_limits": {
"default": 50,
"burst": 200
}
}
}
GET /api/v1/user
Rate limit 10/min
Get current user information and API usage statistics
Response example
{
"timestamp": "2024-01-15T10:30:00Z",
"status": "success",
"data": {
"id": 123,
"email": "partner@company.com",
"organization": "Company Inc",
"api_access": {
"enabled": true,
"rate_limit": 100,
"total_requests": 1500
},
"subscribed_feeds_count": 15
}
}
GET /api/v1/feeds
Rate limit 30/min
Get user's subscribed feeds with metadata
Query parameters
| Parameter | Type | Description | Default |
|---|---|---|---|
include_recent | boolean | Include recent leads count | false |
limit | integer | Max feeds to return (max 100) | 50 |
Response example
{
"timestamp": "2024-01-15T10:30:00Z",
"status": "success",
"data": [
{
"id": 1,
"name": "Tech News",
"description": "Latest technology news",
"is_collection": false,
"recent_leads_count": 25
}
],
"meta": {
"total_count": 1,
"limit": 50
}
}
GET /api/v1/leads
Rate limit 20/min
Get user's recent leads
Query parameters
| Parameter | Type | Description | Default |
|---|---|---|---|
feed_id | integer | Filter by specific feed | - |
limit | integer | Max leads to return (max 100) | 20 |
days | integer | Days back to search (max 30) | 7 |
processed_only | boolean | Only processed leads | false |
priority | string | Filter by priority | - |
Response example
{
"timestamp": "2024-01-15T10:30:00Z",
"status": "success",
"data": [
{
"id": 12345,
"title": "Breaking: Major Tech Announcement",
"summary": "AI-generated summary of the lead",
"link": "https://source.com/article",
"published_at": "2024-01-15T09:00:00Z",
"source_name": "TechCrunch",
"is_processed": true,
"priority": "high",
"sentiment": "positive",
"keywords": ["AI", "technology"],
"tickers": ["AAPL", "GOOGL"],
"companies": ["Apple", "Google"],
"themes": ["artificial intelligence"]
}
]
}
GET /api/v1/leads/{lead_id}
Rate limit 100/min
Get full content for a specific lead
Path parameters
| Parameter | Type | Description |
|---|---|---|
lead_id | integer | ID of the lead to retrieve |
Response example
{
"timestamp": "2024-01-15T10:30:00Z",
"status": "success",
"data": {
"id": 12345,
"title": "Breaking: Major Tech Announcement",
"summary": "AI-generated summary",
"content": "Full article content...",
"link": "https://source.com/article",
"published_at": "2024-01-15T09:00:00Z",
"is_processed": true,
"priority": "high",
"sentiment": "positive",
"follow_up_required": false,
"keywords": ["AI", "technology"],
"tickers": ["AAPL"],
"companies": ["Apple"],
"themes": ["artificial intelligence"],
"geographies": ["United States"]
}
}
Error Handling
All errors follow a consistent format:
{
"timestamp": "2024-01-15T10:30:00Z",
"status": "error",
"error": "Error description"
}
HTTP Status Codes
| Status | Meaning | Description |
|---|---|---|
| 200 | OK | Request successful |
| 400 | Bad Request | Invalid request parameters |
| 401 | Unauthorized | Invalid or missing API key |
| 403 | Forbidden | Access denied to resource |
| 404 | Not Found | Resource not found |
| 429 | Too Many Requests | Rate limit exceeded |
| 500 | Internal Server Error | Server error |
Code Examples
Python
import requests
API_KEY = 'your_api_key_here'
BASE_URL = 'https://journopilot.com/api/v1'
headers = {
'X-API-Key': API_KEY,
'Content-Type': 'application/json'
}
# Get feeds
response = requests.get(f'{BASE_URL}/feeds', headers=headers)
if response.status_code == 200:
feeds = response.json()['data']
print(f"Found {len(feeds)} feeds")
else:
print(f"Error: {response.status_code} - {response.json()}")
# Get recent leads
params = {
'limit': 10,
'processed_only': 'true',
'priority': 'high'
}
response = requests.get(f'{BASE_URL}/leads', headers=headers, params=params)
leads = response.json()['data']
cURL
# Get API info
curl -H "X-API-Key: your_api_key_here" \
https://journopilot.com/api/v1/info
# Get leads with filters
curl -H "X-API-Key: your_api_key_here" \
"https://journopilot.com/api/v1/leads?limit=5&priority=high"
JavaScript
const API_KEY = 'your_api_key_here';
const BASE_URL = 'https://journopilot.com/api/v1';
async function getFeeds() {
try {
const response = await fetch(`${BASE_URL}/feeds`, {
headers: {
'X-API-Key': API_KEY
}
});
if (!response.ok) {
throw new Error(`HTTP error! status: ${response.status}`);
}
const data = await response.json();
return data.data;
} catch (error) {
console.error('Error fetching feeds:', error);
}
}