Skip to main content
GET
/
v1
/
billable-users
Get billable users
curl --request GET \
  --url https://api.petrasecurity.com/v1/billable-users \
  --header 'Authorization: Bearer <token>'
{
  "tenantId": "petra-tenant-123",
  "tenantDisplayName": "Acme Corporation",
  "microsoftTenantId": "abcd1234-5678-90ef-ghij-klmnopqrstuv",
  "reportGeneratedAt": "2026-01-06T12:00:00.000Z",
  "totalBillableUsers": 42,
  "projectedBillableUnitsThisMonth": 28,
  "users": [
    {
      "id": "user-id-1",
      "displayName": "John Doe",
      "userPrincipalName": "john.doe@example.com",
      "mail": "john.doe@example.com",
      "accountEnabled": true,
      "assignedLicenseSkuIds": [
        "sku-id-1",
        "sku-id-2"
      ]
    }
  ]
}

Documentation Index

Fetch the complete documentation index at: https://docs.petrasecurity.com/docs/llms.txt

Use this file to discover all available pages before exploring further.

For common API errors, see API Troubleshooting.
This route is limited to 10 requests per minute.

Authorizations

Authorization
string
header
required

Bearer token authentication. Include your API key in the Authorization header as 'Bearer YOUR_API_KEY'

Query Parameters

tenantId
string
required

The Petra tenant ID to get billable users for. The endpoint verifies that the requested tenant belongs to the organization associated with the API key.

Response

Successful response

tenantId
string

The Petra tenant ID

tenantDisplayName
string

The display name of the tenant

microsoftTenantId
string

The Microsoft tenant ID associated with this Petra tenant

reportGeneratedAt
string<date-time>

ISO 8601 timestamp indicating when this report was generated

totalBillableUsers
integer

The total count of billable users in the tenant

projectedBillableUnitsThisMonth
integer

The prorated number of billable units for this tenant in the current month. This value accounts for mid-month onboarding and is the number used for billing.

users
object[]

Array of billable user objects