Phin Security

How to retrieve active campaigns for a company using the Phin Public API

The Phin Public API's Get Active Campaigns endpoint allows partners to retrieve all currently active campaigns for a specific company, including both company-level and partner-shared campaigns, by sending a GET request to `/partners/{partnerId}/companies/{companyId}/campaigns`, which returns details such as campaign ID, name, type, enrolled user count, scheduling info, and a flag indicating if the campaign is shared.

Use the Phin Public API to List a Company’s Active Campaigns

The Get Active Campaigns endpoint returns all currently active campaigns for a specific company under your partner account. Use it to sync campaign status into your PSA, reporting dashboard, or other integrations.

This endpoint returns company-level campaigns and also includes partner-level shared campaigns, noted by the isSharedCampaign field.

Endpoint

GET /partners/{partnerId}/companies/{companyId}/campaigns

Path Parameters

  • partnerId (required): Your Phin partner ID.
  • companyId (required): The company (client) ID within your partner account.

Example Request

curl -s \
  "https://api.phinsec.io/partners/{partnerId}/companies/{companyId}/campaigns"

Example Response (HTTP 200)

{
  "activeCampaignCount": 2,
  "campaigns": [
    {
      "id": "Am9AzrIaiaMlxHccH8es",
      "name": "testing dynamic onboarding",
      "type": "Training - Onboarding",
      "enrolledUserCount": 4,
      "nextFireTimestamp": null,
      "recurrence": null,
      "endTime": null,
      "isSharedCampaign": false
    },
    {
      "id": "CiQBYz48iBmhaSH0KISQ",
      "name": "continuous training campaign",
      "type": "Training - Continuous",
      "enrolledUserCount": 0,
      "nextFireTimestamp": "2025-09-20T10:00:00.000",
      "recurrence": "Monthly",
      "endTime": null,
      "isSharedCampaign": true
    }
  ]
}