Phin Security icon

Phin Security

The Phin Security API allows partners to access their data programmatically. It provides endpoints for managing companies, retrieving historical phishing and training data, accessing reporting artifacts, and viewing usage information. The API must be enabled through the Phin Portal. Authentication uses OAuth2 Client Credentials flow via Auth0.

HistoricalData → Get historical data for a company

AI-generated

Summary

Fetches historical user data for a Phin company, returning phishing simulation results and training completion status for each user over the last 12 months.

Inputs

  • partnerId (required) — Your Phin Partner ID
  • companyId (required) — The Company ID
  • returnAll — Whether to return all results or only a single page. When disabled, no pagination parameters are sent and only one page of results is returned.
  • customBody — Optional. Send arbitrary JSON in the request body. This will be deep-merged with any fields above (custom body values take priority). Leave as {} to skip.
  • headerFilters — Add custom HTTP headers to the request.
  • queryFilters — Add query-string filters. Set the parameter name and value for each filter.
  • batching — Input items will be grouped in batches of this size. The node will make one request per input item, pausing between batches.
  • debug — When enabled, includes the actual URL, query parameters, headers, and body sent for each API request in the output under a debug entry. Useful for troubleshooting.
  • pagination — Configure how pagination is handled for list operations.
  • timeout — Time in milliseconds to wait for the server to send response headers before aborting the request. Default is 300000 (5 minutes).

Output shape

array

When returnAll is false, returns the response from a single GET request wrapped as a JSON item. When returnAll is true, returns an array containing all items accumulated across all paginated pages using offset, cursor, or URL pagination modes configured in the pagination setting.

Examples

Example 1: Single page fetch

Partner ID and Company ID provided; returnAll left disabled; default pagination (offset-based, page=1, pageSize=50) applied.

Example 2: Full historical data retrieval

Partner ID and Company ID provided; returnAll enabled; pagination set to offset-based with maxPages=0 (no limit) to retrieve all available historical records.

Links

Discussion