---
title: "List function secrets"
method: GET
path: "/functions/{function_id}/secrets"
tags: ["Functions"]
---

# List function secrets

`GET /functions/{function_id}/secrets`

Retrieve all secret names configured for this function. Secret values are NEVER included in list responses for security.

Secrets are injected as environment variables when your function executes. Use this endpoint to:
- Audit which secrets are configured
- Verify secret names before creating new ones
- Check secret types (text, json, inherited)

Important: If the function is not deployed, this endpoint returns an empty array. Secrets can only be managed for deployed functions.

Secret values are only returned once when creating a secret via POST /functions/{id}/secrets. After creation, values cannot be retrieved - only the secret name and type are visible.

## Response `200`

Secrets retrieved successfully (values not included)

- FunctionSecretListResponse — List of function secrets. Note: Secret values are never included in list responses for security. Values are only returned when creating a secret.
  - `data` object[], required
    - `name` string, required — Secret name
    - `type` 'text' | 'json' | 'inherited', required — Secret value type

## Other responses

- `401` — Missing or invalid API key
- `404` — Resource not found
- `502` — Error communicating with Cloudflare API

---

[API](https://skmtc.net/kapso/apis/kapso-platform-api.md) · [All operations](https://skmtc.net/kapso/apis/kapso-platform-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/kapso/kapso-platform-api/versions/18ff5548a33f/schema)
