---
title: "List Custom Functions"
method: GET
path: "/v1/custom_functions"
tags: ["API v1", "Custom Functions", "Custom Functions CRUD"]
---

# List Custom Functions

`GET /v1/custom_functions`

## Request

- Base URL: `https://api.xpander.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://api.xpander.ai/v1/custom_functions`
- Auth: API key in header `x-api-key`

List all custom functions in the organization. Custom functions are user-defined Python functions that can be attached to agents as tools using attached_tools with id='xpander-custom-functions'.

## Query parameters

- `page` integer: Page number (starting from 1)
- `per_page` integer: Items per page (max 50)

## Response `200`

Successful Response

- PaginatedResponseCustomFunctionItem
  - `items` CustomFunctionItem[], required
    - `id` string, required: Unique identifier of the custom function.
    - `name` string, required: Human-readable name of the function.
    - `description` string, nullable: Description of what the function does.
    - `technical_description` string, nullable: Auto-generated technical description from code analysis. Explains the function's logic, inputs, and outputs.
    - `status` string, nullable: Current function status. 'analysing' = being analyzed after create/update, 'ready' = available for execution, 'error' = analysis failed (check analysis_error_details), 'draft' = not yet analyzed.
    - `limits` CustomFunctionLimitsModel: Resource limits for custom function execution.
      - `max_run_time` integer, nullable: Maximum execution time in seconds. The function will be terminated if it exceeds this limit. Default: 15 seconds.
    - `input_schema` object, nullable: Auto-detected JSON schema of the function's input parameters. Generated during analysis from the function signature and type hints.
    - `source_code` string, nullable: Python source code of the function. Only included in get-by-id responses, not in list.
    - `analysis_error_details` string, nullable: Error details if the function analysis failed. Only present when status is 'error'.
    - `organization_id` string, nullable: Organization that owns this function.
    - `project_id` string, nullable: The project the item belongs to; unset means the org's Default project on create.
    - `created_at` string, nullable: ISO timestamp of when the function was created.
  - `total` integer, required
  - `page` integer, required
  - `per_page` integer, required
  - `total_pages` integer, required

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/xpander/apis/xpander-ai-api-service.md) - [All operations](https://skmtc.dev/xpander/apis/xpander-ai-api-service/llms.txt) - [OpenAPI document](https://skmtc.dev/xpander/apis/xpander-ai-api-service/revisions/725c0066d5df?raw)
