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.

Usage → Get usage for a company

AI-generated

Summary

Returns usage information about a specific Phin Company, including current and last month billable users, enrolled users, and billing period details.

Inputs

  • partnerId (required) — Your Phin Partner ID
  • companyId (required) — The Company ID (obtainable from the Get Companies endpoint)

Output shape

Array of objects representing usage records. When returnAll is disabled, returns a single page of results. When enabled, returns all paginated results collected across pages.

Each item corresponds to one billing usage record from the API response.

Examples

Example 1: Retrieve a single page of usage data for a company.

Set returnAll to false (default). The node makes one GET request to /partners/{partnerId}/companies/{companyId}/billing/usage without pagination parameters.

Example 2: Retrieve all pages of usage data for a company.

Set returnAll to true. The node performs offset-based pagination by default, incrementing a page parameter each request and collecting items until an empty array, duplicate first item, partial page, or maxPages limit is reached. Pagination mode, page parameter name, start value, increment, page size, size parameter name, max pages, and request interval between pages are configurable.

Links

Discussion