PhishFortress
    Features

    Phishing Simulation

    Test employee awareness with realistic phishing campaigns

    Security Training

    Interactive modules to educate your team

    Threat Detection

    AI-powered detection of sophisticated phishing attempts

    Incident Response

    Automated workflows to contain and remediate threats

    Solutions

    Financial Services

    Protect sensitive financial data and customer trust

    Healthcare

    Secure patient data and medical systems

    Government

    Defend critical infrastructure and sensitive data

    Education

    Protect student data and research

    Enterprise

    Comprehensive protection for large organizations

    Pricing
    Resources

    Blog

    Latest insights on phishing and security

    Documentation

    Detailed guides and API references

    Webinars

    Educational sessions with security experts

    Case Studies

    Success stories from our customers

    About
    Sign inSign up free
    PhishFortress

    Protecting organizations from sophisticated phishing attacks with AI-powered detection, simulation, and response capabilities.

    Product

    • Features
    • Pricing
    • Security
    • Enterprise
    • Customer Stories

    Resources

    • Documentation
    • Guides
    • API Reference
    • Blog
    • Community

    Company

    • About Us
    • Careers
    • Contact
    • Partners

    © 2026 PhishFortress. All rights reserved.

    Privacy PolicyTerms of ServiceCookie PolicyData Processing Agreement

    Campaigns API

    Create, manage, and analyze phishing campaigns programmatically

    Overview

    The Campaigns API allows you to programmatically create, manage, and monitor phishing simulation campaigns. You can automate campaign creation, retrieve results, and integrate PhishFortress campaigns into your security workflows.

    Required Permissions
    To use the Campaigns API, your API key must have campaigns:read and campaigns:write permissions.

    API Endpoints

    The Campaigns API provides endpoints for complete campaign lifecycle management.

    List Campaigns
    Retrieve all campaigns with optional filtering
    GET/v1/campaigns

    Query Parameters

    ParameterTypeDescription
    statusstringFilter by campaign status (draft, active, completed)
    limitintegerNumber of results to return (default: 50, max: 100)
    offsetintegerNumber of results to skip for pagination
    Create Campaign
    Create a new phishing simulation campaign
    POST/v1/campaigns

    Request Body Example

    {
      "name": "Q1 Security Awareness Campaign",
      "description": "Quarterly phishing simulation for all employees",
      "template_id": "template_123",
      "target_groups": ["finance", "hr", "engineering"],
      "schedule": {
        "start_date": "2024-02-01T09:00:00Z",
        "end_date": "2024-02-15T17:00:00Z",
        "send_immediately": false
      },
      "settings": {
        "track_clicks": true,
        "track_credentials": true,
        "enable_training": true,
        "training_delay_minutes": 5
      }
    }
    Get Campaign Details
    Retrieve detailed information about a specific campaign
    GET/v1/campaigns/{id}

    Response Example

    {
      "id": "campaign_123",
      "name": "Q1 Security Awareness Campaign",
      "status": "active",
      "created_at": "2024-01-15T10:00:00Z",
      "started_at": "2024-02-01T09:00:00Z",
      "statistics": {
        "emails_sent": 1250,
        "emails_opened": 892,
        "links_clicked": 156,
        "credentials_submitted": 23,
        "users_reported": 67
      },
      "template": {
        "id": "template_123",
        "name": "Password Reset Notification"
      }
    }

    Campaign Lifecycle

    Understanding the campaign lifecycle helps you manage campaigns effectively through the API.

    Campaign States

    Draft

    Campaign is created but not yet scheduled or launched. Can be edited freely.

    Scheduled

    Campaign is scheduled to start at a future date. Limited editing allowed.

    Active

    Campaign is currently running. Emails are being sent and results are being collected.

    Completed

    Campaign has finished. All emails sent and final results are available.

    Cancelled

    Campaign was stopped before completion. Partial results may be available.

    Campaign Results & Analytics

    Retrieve detailed campaign results and analytics data for reporting and analysis.

    Get Campaign Results
    Retrieve detailed results and analytics for a campaign
    GET/v1/campaigns/{id}/results

    Response Example

    {
      "campaign_id": "campaign_123",
      "summary": {
        "total_recipients": 1250,
        "emails_sent": 1250,
        "emails_delivered": 1198,
        "emails_opened": 892,
        "links_clicked": 156,
        "credentials_submitted": 23,
        "users_reported": 67,
        "training_completed": 134
      },
      "metrics": {
        "click_rate": 12.5,
        "credential_rate": 1.8,
        "report_rate": 5.4,
        "training_completion_rate": 85.9
      },
      "department_breakdown": [
        {
          "department": "finance",
          "recipients": 45,
          "clicked": 8,
          "reported": 12
        },
        {
          "department": "hr",
          "recipients": 32,
          "clicked": 3,
          "reported": 18
        }
      ],
      "timeline": [
        {
          "timestamp": "2024-02-01T09:00:00Z",
          "event": "campaign_started",
          "count": 1250
        },
        {
          "timestamp": "2024-02-01T09:15:00Z",
          "event": "first_click",
          "user_id": "user_456"
        }
      ]
    }
    Export Results
    Export campaign results in various formats
    POST/v1/campaigns/{id}/export

    Supported Formats

    • CSV: Raw data for spreadsheet analysis
    • PDF: Executive summary report
    • JSON: Structured data for further processing
    • Excel: Formatted workbook with charts

    Error Handling

    The Campaigns API returns specific error codes to help you handle different scenarios.

    Common Error Scenarios
    Always check the response status code and error message when handling API responses.
    Error CodeHTTP StatusDescription
    CAMPAIGN_NOT_FOUND404Campaign with specified ID doesn't exist
    INVALID_TEMPLATE400Specified template ID is invalid or inactive
    INSUFFICIENT_PERMISSIONS403API key lacks required campaign permissions
    CAMPAIGN_LIMIT_EXCEEDED429Maximum number of active campaigns reached

    Best Practices

    Follow these best practices when working with the Campaigns API.

    Campaign Management
    • Test campaigns first: Always test with a small group before launching to all users
    • Monitor actively: Check campaign progress regularly, especially in the first hour
    • Handle errors gracefully: Implement proper error handling and retry logic
    • Use webhooks: Set up webhooks for real-time notifications instead of polling
    • Respect rate limits: Don't exceed API rate limits when creating multiple campaigns
    Performance Optimization
    • Batch operations: Use bulk endpoints when creating multiple campaigns
    • Pagination: Use pagination for large result sets to improve response times
    • Caching: Cache campaign data that doesn't change frequently
    • Filtering: Use query parameters to filter results and reduce payload size
    AuthenticationTemplates API