---
title: "Return hosting plan extension templates"
method: GET
path: "/_getpkgextensionform"
tags: ["Packages", "Hosting Plan Extensions"]
---

# Return hosting plan extension templates

`GET /_getpkgextensionform`

This function retrieves a hosting plan's package extension templates. When you call this
function, the system checks the hosting plan's `_PACKAGE_EXTENSIONS` value.  The function
returns the contents of the `/var/cpanel/packages/extensions/name.tt2` file for each package
extension in the list, where name represents the package extension's name.

For more information, read our
[Guide to Package Extensions](https://go.cpanel.net/GuidetoPackageExtensions).

**Note:**

This function returns only metadata if the hosting plan does not use package extensions, or
if the extensions' template files are empty.

## Query parameters

- `pkg` string, required

## Response `200`

HTTP Request was successful.

- object
  - `data` object
    - `html` string — The HTML and Template Toolkit soure code for the hosting plan's extensions' templates.
  - `metadata` object
    - `command` string — The method name called.
    - `reason` string — The reason the API function failed when the `metadata.result` field is 0. This field may display a success message when a function succeeds.
    - `result` 0 | 1 — * `1` - Success * `0` - Failed: Check the reason field for more details.
    - `version` integer — The version of the API function.

---

[API](https://skmtc.net/cpanel/apis/whm-api.md) · [All operations](https://skmtc.net/cpanel/apis/whm-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/cpanel/whm-api/revisions/3da41671c02c/schema)
