> 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 all custom functions

GET https://api.postman.com/custom-functions

Gets a list of the team's custom functions. The response doesn't include function content.

Reference: https://learning.postman.com/api-docs/api-reference/api-governance/get-all-custom-functions

## Authentication

- `x-api-key` header (required) — API Key authentication via header

## Servers

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

## Request

### Query parameters

- `cursor` (string, optional) — The pointer to the first record of the set of paginated results. To view the next response, use the `nextCursor` value for this parameter.
- `limit` (integer, optional, default: 10) — The maximum number of results to return per page.

## Response

### 200

Successful Response

- `data` (list of customFunctionSummary, optional) — A list of custom functions.
- `meta` (meta, optional) — The response's meta information for paginated results.

## Errors

### 400 Bad Request Error

Bad Request

- `GetAllCustomFunctionsRequestBadRequestError`

### 401 Unauthorized Error

Unauthorized

- `GetAllCustomFunctionsRequestUnauthorizedError`

### 403 Forbidden Error

Forbidden

- `GetAllCustomFunctionsRequestForbiddenError`

### 500 Internal Server Error

Internal Server Error

- `GetAllCustomFunctionsRequestInternalServerError`

## Types

### customFunctionSummary

Information about the custom function, without its content.

- `id` (string, optional) — The custom function's ID.
- `name` (string, optional) — The custom function's name, derived from its path.
- `path` (string, optional) — The custom function's path, in the form `functions/<name>.js`.
- `description` (string, optional) — The custom function's description.
- `type` (enum, optional) — The custom function's type.
  - Allowed values: `system`, `custom`
- `createdBy` (string, optional) — The ID of the user who created the custom function.
- `updatedBy` (string, optional) — The ID of the user who last updated the custom function.
- `createdAt` (datetime, optional) — The date and time at which the custom function was created.
- `updatedAt` (datetime, optional) — The date and time at which the custom function was last updated.

### meta

The response's meta information for paginated results.

- `nextCursor` (string, optional, nullable) — The pagination cursor that points to the next record in the results set.

### commonErrorTypeTitleDetail

- `type` (string, optional) — The type of error.
- `title` (string, optional) — A short summary of the problem.
- `detail` (CommonErrorTypeTitleDetailDetail, optional) — Information about the error.

### commonErrorTypeTitleDetailStatus

- `type` (CommonErrorTypeTitleDetailStatusType, optional) — The type of error.
- `title` (string, optional) — A short summary of the problem.
- `detail` (string, optional) — Information about the error.
- `status` (integer, optional) — The error's HTTP status code.

### commonErrorNameMessageDetails

- `error` (CommonErrorNameMessageDetailsError, optional) — Information about the error.

### commonErrorNameMessage

- `error` (CommonErrorNameMessageError, optional) — Information about the error.

### CommonErrorTypeTitleDetailDetail

Information about the error.

### CommonErrorTypeTitleDetailStatusType

The type of error.

### CommonErrorNameMessageDetailsError

Information about the error.

- `name` (string, optional) — The error name.
- `message` (string, optional) — The error message.
- `details` (CommonErrorNameMessageDetailsErrorDetails, optional) — Information about the error.

### CommonErrorNameMessageError

Information about the error.

- `name` (string, optional) — The error name.
- `message` (string, optional) — The error message.

### CommonErrorNameMessageDetailsErrorDetails

Information about the error.

## Examples

**Response**

```json
{
  "data": [
    {
      "id": "01JCUSTOMFN0123456789ABCDE",
      "name": "checkResourceNesting",
      "path": "functions/checkResourceNesting.js",
      "description": "Custom Spectral function.",
      "type": "custom",
      "createdBy": "12345678",
      "updatedBy": "12345678",
      "createdAt": "2026-07-13T10:15:30.000Z",
      "updatedAt": "2026-07-13T11:20:00.000Z"
    }
  ],
  "meta": {
    "nextCursor": "eyJvZmZzZXQiOjEwfQ=="
  }
}
```

**SDK Code**

```python Successful Response
import requests

url = "https://api.postman.com/custom-functions"

querystring = {"cursor":"RnJpIEZlYiAyNCAyMDIzIDEzOjI0OjA5IEdNVCswMDAwIChDb29yZGluYXRlZCBVbml2ZXJzYWwgVGltZSk=","limit":"10"}

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

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

print(response.json())
```

```javascript Successful Response
const url = 'https://api.postman.com/custom-functions?cursor=RnJpIEZlYiAyNCAyMDIzIDEzOjI0OjA5IEdNVCswMDAwIChDb29yZGluYXRlZCBVbml2ZXJzYWwgVGltZSk%3D&limit=10';
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 Successful Response
package main

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

func main() {

	url := "https://api.postman.com/custom-functions?cursor=RnJpIEZlYiAyNCAyMDIzIDEzOjI0OjA5IEdNVCswMDAwIChDb29yZGluYXRlZCBVbml2ZXJzYWwgVGltZSk%3D&limit=10"

	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 Successful Response
require 'uri'
require 'net/http'

url = URI("https://api.postman.com/custom-functions?cursor=RnJpIEZlYiAyNCAyMDIzIDEzOjI0OjA5IEdNVCswMDAwIChDb29yZGluYXRlZCBVbml2ZXJzYWwgVGltZSk%3D&limit=10")

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 Successful Response
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api.postman.com/custom-functions?cursor=RnJpIEZlYiAyNCAyMDIzIDEzOjI0OjA5IEdNVCswMDAwIChDb29yZGluYXRlZCBVbml2ZXJzYWwgVGltZSk%3D&limit=10")
  .header("x-api-key", "<apiKey>")
  .asString();
```

```php Successful Response
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.postman.com/custom-functions?cursor=RnJpIEZlYiAyNCAyMDIzIDEzOjI0OjA5IEdNVCswMDAwIChDb29yZGluYXRlZCBVbml2ZXJzYWwgVGltZSk%3D&limit=10', [
  'headers' => [
    'x-api-key' => '<apiKey>',
  ],
]);

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

```csharp Successful Response
using RestSharp;

var client = new RestClient("https://api.postman.com/custom-functions?cursor=RnJpIEZlYiAyNCAyMDIzIDEzOjI0OjA5IEdNVCswMDAwIChDb29yZGluYXRlZCBVbml2ZXJzYWwgVGltZSk%3D&limit=10");
var request = new RestRequest(Method.GET);
request.AddHeader("x-api-key", "<apiKey>");
IRestResponse response = client.Execute(request);
```

```swift Successful Response
import Foundation

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

let request = NSMutableURLRequest(url: NSURL(string: "https://api.postman.com/custom-functions?cursor=RnJpIEZlYiAyNCAyMDIzIDEzOjI0OjA5IEdNVCswMDAwIChDb29yZGluYXRlZCBVbml2ZXJzYWwgVGltZSk%3D&limit=10")! 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()
```