Developer docs · v1

JournoPilot API v1 Documentation

This documentation covers our secure API v1 endpoints designed primarily for enterprise customer integrations.

Base URL 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:

HeaderDescription
X-RateLimit-LimitYour rate limit
X-RateLimit-RemainingRemaining requests in current window
X-RateLimit-ResetWhen 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

ParameterTypeDescriptionDefault
include_recentbooleanInclude recent leads countfalse
limitintegerMax 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

ParameterTypeDescriptionDefault
feed_idintegerFilter by specific feed-
limitintegerMax leads to return (max 100)20
daysintegerDays back to search (max 30)7
processed_onlybooleanOnly processed leadsfalse
prioritystringFilter 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

ParameterTypeDescription
lead_idintegerID 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

StatusMeaningDescription
200OKRequest successful
400Bad RequestInvalid request parameters
401UnauthorizedInvalid or missing API key
403ForbiddenAccess denied to resource
404Not FoundResource not found
429Too Many RequestsRate limit exceeded
500Internal Server ErrorServer 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);
    }
}
Support: For technical support or questions about API integration, contact our technical team at api-support@journopilot.com
Rate limit increases: Need higher rate limits? Contact your account manager to discuss enterprise options.
J

Sign in

Welcome back to JournoPilot.

Forgot password?