Skip to main content
GET
/
beta
/
billable-users
Get billable users
curl --request GET \
  --url https://api.petrasecurity.com/beta/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,
  "users": [
    {
      "id": "user-id-1",
      "displayName": "John Doe",
      "userPrincipalName": "[email protected]",
      "mail": "[email protected]",
      "accountEnabled": true,
      "assignedLicenseSkuIds": [
        "sku-id-1",
        "sku-id-2"
      ]
    }
  ]
}

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

users
object[]

Array of billable user objects