Skip to main content
This method lists upcoming license expirations using the same rules as the Devolens Licenses Expire report. This method requires Usage Analytics permission. Returning customer names, company names, and email addresses also requires Get Customers permission. It returns expiring license objects.

Parameters

This method is accessed by https://api.cryptolens.io/api/ai/GetExpiringLicenses

Results

Example results

This response illustrates a request made on 27 October 2026 at 12:00 UTC with Window=30d. One qualifying license expires on 30 October; the window ends on 26 November. IDs and values are illustrative.

Remarks

  • This method supports GET with query parameters and POST with a form or JSON body. Send the access token in the token header, query string, or form field. For JSON requests, use Content-Type: application/json and send the token separately; it is not read from the JSON body.
  • JSON responses use camel-case field names. All timestamps are Unix seconds in UTC; date strings use yyyy-MM-dd.
  • An out-of-range page returns an empty list. Total counts all rows in the authorized result before pagination; Returned counts only this page.
  • Product and key locks apply before counting, summaries, and paging. With a key-locked token, only the authorized key can be returned.
  • A license qualifies when its expiration is strictly after the request time and at or before ExpiresBeforeUtc, and its product makes all licenses time-limited or an enabled feature is configured as time-limited.
  • CustomerId is returned only for customers in the same account. CustomerName, CustomerCompany, and CustomerEmail additionally require the token’s Get Customers permission; missing or disallowed details are null.
  • Window examples include 7, 2w, 3m, and 1y. Month and year windows use calendar arithmetic, preserving UTC time of day and adjusting the date at month boundaries.
  • A zero-length Window produces an empty license list. The summary still reports the next 30 days. Invalid or overflowing durations are rejected.
  • NextSevenDays counts expirations through now + 7 days. DaysEightToFourteen counts those after 7 and through 14 days; DaysFifteenToThirty counts those after 14 and through 30 days. TotalExpiring is the sum of these three nonoverlapping buckets.
  • The summary is independent of Window and pagination. It respects the same owner, product/key, customer, blocked-license, and time-limited-license filters as the list.
  • Each request reads current license records. GeneratedUtc is the request time, not a frozen paging snapshot.

Example request

Replace YOUR_USAGE_ANALYTICS_TOKEN and the sample identifiers with your own values. This POST example sends form-encoded parameters.

Errors

Errors return Result=1 with an explanation in Message. Common errors include: View the original Web API reference