> ## Documentation Index
> Fetch the complete documentation index at: https://docs.getpara.com/llms.txt
> Use this file to discover all available pages before exploring further.

# listPartnerPolicyVersions

> Lists the versions of a policy that are active or were active before, newest first.

## Import

Call this method on a server-side ParaRestClient created with your server secret key.

```ts theme={null}
import { ParaRestClient } from "@getpara/rest-sdk";
```

async

Lists the versions of a policy that are active or were active before, newest first.

Copy method signature

### Returns

[`Promise<PermissionsV2PolicyVersionsResponse>`](/v3/references/types/permissions#permissionsv2policyversionsresponse)

Published versions of the policy, newest first.

## Route

Drafts and versions that were never activated are left out.

```text theme={null}
GET /v1/permissions-v2/policies/{policyId}/versions
```

## Example

`versions` contains the policy's published versions, newest first.

```ts theme={null}
const { versions } = await para.listPartnerPolicyVersions(policyId);
```

## Errors

A non-success response throws `ParaRestError` with the HTTP `status`, the error `code` and a `message`. [Permissions errors](/v3/references/permissions/errors) lists every error code.

An empty path argument throws `ParaRestValidationError` before the request is sent.

| Status | Code | When |
| - | - | - |
| 404 | `NOT_FOUND` | The policy has no version that is or was active. |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.