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 detailed information about all currently active campaigns for a specific company, including campaign ID, name, type, enrolled user count, next scheduled run, recurrence pattern, end time for fixed campaigns, and whether the campaign is shared at the partner level, enabling integration with PSA tools or reporting dashboards.
How to retrieve active campaigns for a company using the Phin Public API
Use the Phin Public API to list a company’s active campaigns, including campaign type, enrolled user count, schedule, recurrence, and end date
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.
Campaign Attribute Reference
| Field Name | Description | Type |
| id | Unique ID of this campaign. | String |
| name | The title of this campaign. | String |
| type | The campaign type. See CampaignType. | String |
| enrolledUserCount | The total users enrolled in this campaign. | Number |
| nextFireTimestamp | The ISO timestamp of the next fire. | String |
| recurrence | The campaign schedule represented as a description. | String |
| endTime | The ISO timestamp of the end of this campaign. Only present for fixed length campaigns. | String |
| isSharedCampaign | Whether this campaign is a partner shared campaign. | Boolean |
Example Request
curl -s \
"https://api.phinsec.io/partners/{partnerId}/companies/{companyId}/campaigns"
Example Response
{
"activeCampaignCount": 2,
"campaigns": [\
{\
"id": "OzCPyuYYN7sRJB7rsGYs",\
"name": "Company phishing",\
"type": "Phishing - Continuous",\
"enrolledUserCount": 120,\
"nextFireTimestamp": "2026-10-05T12:00:00.000",\
"recurrence": "Monthly",\
"endTime": null,\
"isSharedCampaign": false\
},\
{\
"id": "5zDy2wYbN7s76B7rsy2o",\
"name": "Partner training",\
"type": "Training - Continuous",\
"enrolledUserCount": 56,\
"nextFireTimestamp": "2026-10-12T12:00:00.000",\
"recurrence": "Monthly",\
"endTime": null,\
"isSharedCampaign": true\
}\
]
}
Campaign Type Reference
The type field is a string representation of the campaign's type as seen in the Phin Portal. It can be any of the following options:
- Phishing - Continuous
- Training - Continuous
- Phishing - Fixed
- Training - Fixed
- Training - Onboarding
Was this article helpful?
YesNo