> For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://learning.postman.com/llms.txt.

# Get a package

GET https://api.postman.com/packages/{packageId}

Gets an active package's metadata and its current index script content.

Reference: https://learning.postman.com/api-docs/api-reference/packages/get-package

## Authentication

- `x-api-key` header (required)

## Servers

- `https://api.postman.com` (https://api.postman.com, default)
- `https://api.eu.postman.com` (https://api.eu.postman.com)

## Request

### Path parameters

- `packageId` (string, required) — The package's ID.

## Response

### 200

Successful Response

- `data` (object, optional) — Information about the package.
  - `id` (string, required) — The package's ID.
  - `name` (string, required) — The package's immutable, lowercase import name.
  - `description` (string, required) — The package's description. This value may be empty and only supports printable ASCII characters.
  - `script` (string, required) — The package's current index script content. This value may be empty.
  - `createdBy` (integer, required) — The user ID of the user who created the package.
  - `createdAt` (datetime, required) — The date and time at which the package was created.
  - `updatedAt` (datetime, required) — The date and time at which the package or its script was last updated.

## Examples

**Response**

```json
{
  "createdAt": "2026-08-01T20:11:17.000Z",
  "createdBy": 12345678,
  "description": "This package contains utility functions to do math.",
  "id": "3b60f5f3-cd98-4e04-b560-3eb039fe85d8",
  "name": "my-math-package",
  "script": "module.exports = { add: (a, b) => a + b };",
  "updatedAt": "2026-08-01T20:11:17.000Z"
}
```

**SDK Code**

```python Unified Package
import requests

url = "https://api.postman.com/packages/3b60f5f3-cd98-4e04-b560-3eb039fe85d8"

headers = {"x-api-key": "<apiKey>"}

response = requests.get(url, headers=headers)

print(response.json())
```

```javascript Unified Package
const url = 'https://api.postman.com/packages/3b60f5f3-cd98-4e04-b560-3eb039fe85d8';
const options = {method: 'GET', headers: {'x-api-key': '<apiKey>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Unified Package
package main

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

func main() {

	url := "https://api.postman.com/packages/3b60f5f3-cd98-4e04-b560-3eb039fe85d8"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("x-api-key", "<apiKey>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Unified Package
require 'uri'
require 'net/http'

url = URI("https://api.postman.com/packages/3b60f5f3-cd98-4e04-b560-3eb039fe85d8")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<apiKey>'

response = http.request(request)
puts response.read_body
```

```java Unified Package
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api.postman.com/packages/3b60f5f3-cd98-4e04-b560-3eb039fe85d8")
  .header("x-api-key", "<apiKey>")
  .asString();
```

```php Unified Package
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.postman.com/packages/3b60f5f3-cd98-4e04-b560-3eb039fe85d8', [
  'headers' => [
    'x-api-key' => '<apiKey>',
  ],
]);

echo $response->getBody();
```

```csharp Unified Package
using RestSharp;

var client = new RestClient("https://api.postman.com/packages/3b60f5f3-cd98-4e04-b560-3eb039fe85d8");
var request = new RestRequest(Method.GET);
request.AddHeader("x-api-key", "<apiKey>");
IRestResponse response = client.Execute(request);
```

```swift Unified Package
import Foundation

let headers = ["x-api-key": "<apiKey>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.postman.com/packages/3b60f5f3-cd98-4e04-b560-3eb039fe85d8")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```