> Documentation index for AI agents: https://docs.pagerduty.com/llms.txt

# List License Allocations

`GET https://api.pagerduty.com/license_allocations`

List the Licenses allocated to Users within your Account

Scoped OAuth requires: `licenses.read`

## Authorization

- **api_key** (apiKey) — `Authorization` header. The API Key with format `Token token=<API_KEY>`

## Query parameters

| Name | Type | Required | Description |
|---|---|---|---|
| `limit` | integer |  | The number of results per page. |
| `offset` | integer |  | Offset to start pagination search results. |

## Header parameters

| Name | Type | Required | Description |
|---|---|---|---|
| `Accept` | string | yes | The `Accept` header is used as a versioning header. Default: `application/vnd.pagerduty+json;version=2`. |

## Response 200

License allocations to Users within your Account

### `application/json`

| Field | Type | Required | Description |
|---|---|---|---|
| `license_allocations` | array of object |  |  |
| `license_allocations[].user` | object | yes |  |
| `license_allocations[].user.id` | string | yes | Read-only. |
| `license_allocations[].user.summary` | string \| null |  | A short-form, server-generated string that provides succinct, important information about an object suitable for primary labeling of an entity in a client. In many cases, this will be identical to `name`, though it is not intended to be an identifier. Read-only. |
| `license_allocations[].user.type` | string | yes | One of: `user_reference`. |
| `license_allocations[].user.self` | string \| null (url) |  | the API show URL at which the object is accessible. Read-only. |
| `license_allocations[].user.html_url` | string \| null (url) |  | a URL at which the entity is uniquely displayed in the Web app. Read-only. |
| `license_allocations[].license` | object | yes |  |
| `license_allocations[].license.id` | string | yes | Uniquely identifies the resource. |
| `license_allocations[].license.description` | string | yes | Description of the License. May include the names of add-ons associated with the License, if there are any. |
| `license_allocations[].license.name` | string | yes | Name of the License. |
| `license_allocations[].license.valid_roles` | array of string | yes | The roles a User with this License can have. |
| `license_allocations[].license.role_group` | string |  | Indicates whether this License is assignable to full or stakeholder Users. One of: `FullUser`, `Stakeholder`. |
| `license_allocations[].license.type` | string |  | Type of object. |
| `license_allocations[].license.self` | string |  | API URL to access the License. |
| `license_allocations[].license.html_url` | string |  | HTML URL to access the License. |
| `license_allocations[].license.summary` | string |  | Summary of the License. |
| `license_allocations[].allocated_at` | string (date-time) | yes | Indicates the date and time the License was allocated to the User. |
| `offset` | integer |  | Echoes offset pagination property. Read-only. |
| `limit` | integer |  | Echoes limit pagination property. Read-only. |
| `more` | boolean |  | Indicates if there are additional records to return. Read-only. |
| `total` | integer \| null |  | The total number of records matching the given query. Read-only. |

Example: Response Example

```json
{
  "license_allocations": [
    {
      "license": {
        "id": "PIP248G",
        "name": "Business (Full User)",
        "description": "Event Intelligence",
        "valid_roles": [
          "owner",
          "admin",
          "user",
          "limited_user",
          "observer",
          "restricted_access"
        ],
        "role_group": "FullUser",
        "summary": "Business (Full User)",
        "type": "license",
        "self": null,
        "html_url": null
      },
      "user": {
        "id": "PIP248H",
        "type": "user_reference"
      },
      "allocated_at": "2021-06-01T00:00:00-05:00"
    }
  ],
  "offset": 0,
  "limit": 1,
  "more": false,
  "total": 2
}
```

## Response 401

Caller did not supply credentials or did not provide the correct credentials.
If you are using an API key, it may be invalid or your Authorization header may be malformed.

### `application/json`

| Field | Type | Required | Description |
|---|---|---|---|
| `error` | object |  |  |
| `error.code` | integer |  | Read-only. |
| `error.message` | string |  | Error message string. Read-only. |
| `error.errors` | array of string |  | Read-only. |

## Response 403

Caller is not authorized to view the requested resource.
While your authentication is valid, the authenticated user or token does not have permission to perform this action.

### `application/json`

| Field | Type | Required | Description |
|---|---|---|---|
| `error` | object |  |  |
| `error.code` | integer |  | Read-only. |
| `error.message` | string |  | Error message string. Read-only. |
| `error.errors` | array of string |  | Read-only. |

## Response 404

The requested resource was not found.

### `application/json`

| Field | Type | Required | Description |
|---|---|---|---|
| `error` | object |  |  |
| `error.code` | integer |  | Read-only. |
| `error.message` | string |  | Error message string. Read-only. |
| `error.errors` | array of string |  | Read-only. |

## Developer Agreement

Your access to and use of the PagerDuty Developer Services is governed by the [PagerDuty Developer Agreement](https://docs.pagerduty.com/developer/pagerduty-developer-agreement).
