---
title: "Make a saved request run once per row by turning some of its values into typed inputs. Nothing runs and nothing is charged."
method: POST
path: "/v1/investigations/functions"
---

# Make a saved request run once per row by turning some of its values into typed inputs. Nothing runs and nothing is charged.

`POST /v1/investigations/functions`

## Request

- Base URL: `https://api.specstream.ai`
- URL: `https://api.specstream.ai/v1/investigations/functions`
- Auth: API key in header `Authorization`

## Request body

- InvestigationFunctionCreate
  - `name` string, required
  - `spec_id` string, required
  - `revision_id` string, required
  - `parameters` InvestigationParameter[], required
    - `name` string, required
    - `label` string, required
    - `paths` string[], required
    - `value_type` 'text' | 'integer' | 'number' | 'boolean' | 'url', required
    - `prefix` string
    - `suffix` string

## Response `201`

Make a saved request run once per row by turning some of its values into typed inputs. Nothing runs and nothing is charged.

- object
  - `data` InvestigationFunction, required
    - `function_id` string, required
    - `name` string, required
    - `spec_id` string, required
    - `revision_id` string, required
    - `project_id` string, nullable, required
    - `contract_hash` string, required
    - `parameters` InvestigationParameter[], required
      - `name` string, required
      - `label` string, required
      - `paths` string[], required
      - `value_type` 'text' | 'integer' | 'number' | 'boolean' | 'url', required
      - `prefix` string
      - `suffix` string
    - `request` string, required
    - `output_fields` string[], required
    - `results_per_input` integer, required
    - `created_at` string, date-time, required

## Other responses

- `default`: Error envelope

---

[API](https://skmtc.dev/specstream/apis/specstream-api.md) · [All operations](https://skmtc.dev/specstream/apis/specstream-api/llms.txt) · [OpenAPI document](https://skmtc.dev/specstream/apis/specstream-api/revisions/5a9f51143a13?raw)
