Skip to content

Get licenses

GET/licenses

Licensing API · Licensing

Get tenant licenses.

Required permissionaccount_management:read

Parameters

Name In Type Required Description
X-Tenant-ID header string (uuid) Yes Tenant ID.

Request samples

curl -X GET "https://api.central.sophos.com/licenses/v1/licenses" -H "Authorization: Bearer <access-token>" -H "X-Tenant-ID: <tenant-id>"

import requests

response = requests.get(
    "https://api.central.sophos.com/licenses/v1/licenses",
    headers={
        "Authorization": "Bearer <access-token>",
        "X-Tenant-ID": "<tenant-id>",
    },
)
print(response.json())

$headers = @{
    "Authorization" = "Bearer <access-token>"
    "X-Tenant-ID" = "<tenant-id>"
}
Invoke-RestMethod -Method GET -Uri "https://api.central.sophos.com/licenses/v1/licenses" -Headers $headers

package main

import (
    "fmt"
    "io"
    "net/http"
)

func main() {
    req, err := http.NewRequest("GET", "https://api.central.sophos.com/licenses/v1/licenses", nil)
    if err != nil {
        panic(err)
    }
    req.Header.Set("Authorization", "Bearer <access-token>")
    req.Header.Set("X-Tenant-ID", "<tenant-id>")

    resp, err := http.DefaultClient.Do(req)
    if err != nil {
        panic(err)
    }
    defer resp.Body.Close()

    body, _ := io.ReadAll(resp.Body)
    fmt.Println(string(body))
}

const response = await fetch("https://api.central.sophos.com/licenses/v1/licenses", {
  method: "GET",
  headers: {
    "Authorization": "Bearer <access-token>",
    "X-Tenant-ID": "<tenant-id>",
  },
});
const data = await response.json();
console.log(data);

Responses

200 — Tenant licenses.

Response fields

organizationobjectrequired
Tenant's organization.
Show child attributesHide child attributes
idstring (uuid)required
Organization ID.
partnerobject
Tenant's partner.
Show child attributesHide child attributes
idstring (uuid)required
Partner ID.
tenantobject
Linked tenant.
Show child attributesHide child attributes
idstring (uuid)required
Tenant ID.
licensesarray of objectrequired
Items must be unique.
License object.
Show child attributesHide child attributes
idstringrequired
License ID.
licenseIdentifierstringrequired
License identifier.
productobjectrequired
Licensed product.
Show child attributesHide child attributes
codestringrequired
Product code.
namestring
Product name.
genericCodestring
Generic product code.
startDatestring (date)required
License start date. The license is valid from the start of the day in the UTC timezone.
endDatestring (date)
License end date. The license is valid until the end of the day in the UTC timezone. Not present for perpetual licenses.
perpetualbooleanrequired
Whether the license is perpetual or not.
typestringrequired
License type.
Must be one of: trial, term, usage, ordered, enterprise, perpetual.
quantityinteger
Assigned quantity.
unlimitedbooleanrequired
True if quantity is missing.
usageobject
License usage records.
Show child attributesHide child attributes
currentobjectrequired
License usage count for a specific date.
Show child attributesHide child attributes
countintegerrequired
License usage count.
datestring (date)required
License usage date.
collectedAtstring (date-time)required
Date and time when the usage was collected.

Errors

Status Meaning
500 Unexpected error.

All error responses share the same shape — see the error response object.

Response examples

200

{
  "organization": {
    "id": "00000000-0000-0000-0000-000000000000"
  },
  "partner": {
    "id": "00000000-0000-0000-0000-000000000000"
  },
  "tenant": {
    "id": "00000000-0000-0000-0000-000000000000"
  },
  "licenses": [
    {
      "id": "string",
      "licenseIdentifier": "string",
      "product": {
        "code": "string",
        "name": "string",
        "genericCode": "string"
      },
      "startDate": "2026-07-28",
      "endDate": "2026-07-28",
      "perpetual": true,
      "type": "trial",
      "quantity": 0,
      "unlimited": true,
      "usage": {
        "current": {
          "count": 0,
          "date": "2026-07-28",
          "collectedAt": "2026-07-28T00:00:00Z"
        }
      }
    }
  ]
}

See the guide for a narrative walkthrough of this API.