---
title: "Update a Function"
method: PATCH
path: "/v3/functions/{functionName}"
tags: ["Functions"]
---

# Update a Function

`PATCH /v3/functions/{functionName}`

**Update a function. Updates create a new version.**

The previous version remains addressable and immutable. Workflow
nodes that pinned the function with a `versionNum` continue to use
the pinned version; nodes that reference the function by name with
no version automatically pick up the new version on their next call.

## What you can change

Any field allowed by the function's type. Most commonly:
`outputSchema` (for `extract`/`join`), `classifications` (for
`classify`), `displayName`, and `tags`.

## Versioning behaviour

- Each successful update increments `currentVersionNum` by 1.
- `displayName`, `tags`, and `functionName` updates also create a
new version, so the version history is a complete record of every
change.
- To revert, fetch the previous version and re-submit its
configuration as a new update — versions themselves are immutable.

## Path parameters

- `functionName` string, required

## Request body

- union
  - object
    - `functionName` string — Name of function. Must be UNIQUE on a per-environment basis.
    - `displayName` string — Display name of function. Human-readable name to help you identify the function.
    - `tags` string[] — Array of tags to categorize and organize functions.
    - `type` 'extract', required
    - `outputSchemaName` string — Name of output schema object.
    - `outputSchema` object — Desired output structure defined in standard JSON Schema convention.
    - `tabularChunkingEnabled` boolean — Whether tabular chunking is enabled. When true, tables in CSV/Excel files are processed in row batches rather than all at once.
    - `enableBoundingBoxes` boolean — Whether bounding box extraction is enabled. Applies to vision input types (pdf, png, jpeg, heic, heif, webp) that dispatch through the analyze path. When true, the function returns the document regions (page, coordinates) from which each field was extracted. Enabling this automatically configures the function to use the bounding box model. Disabling resets to the default.
    - `preCount` boolean — Reducing the risk of the model stopping early on long documents. Trade-off: Increases total latency. Compatible with `enableBoundingBoxes`.
  - object — V3 create/update variants of the shared function payloads. The V3 Functions API no longer accepts the legacy `transform` or `analyze` function types when creating new functions or updating existing ones — both have been unified under `extract`. Existing functions of those types remain readable and callable via V3, so the V3 read-side unions still include `transform` and `analyze` variants. The V3 API also exposes `classify` in place of the legacy `route` type on create/update, with `classifications` in place of `routes`. Read-side `ClassifyFunction` / `ClassifyFunctionVersion` / `ClassificationList` are defined in the shared functions models and used by both the V2 and V3 response unions (existing classify functions are returned from V2 GET endpoints verbatim).V3 wire form of the classify function upsert payload.
    - `functionName` string — Name of function. Must be UNIQUE on a per-environment basis.
    - `displayName` string — Display name of function. Human-readable name to help you identify the function.
    - `tags` string[] — Array of tags to categorize and organize functions.
    - `type` 'classify', required
    - `description` string — Description of classifier. Can be used to provide additional context on classifier's purpose and expected inputs.
    - `classifications` object[] — List of classifications a classify function can produce. Shares the underlying route list shape.
      - `name` string, required
      - `description` string
      - `isErrorFallback` boolean
      - `origin` object
        - `email` object
          - `patterns` string[]
      - `regex` object
        - `patterns` string[]
      - `functionID` string
      - `functionName` string
    - `nativeVisualInput` boolean — When true, image and PDF inputs are sent directly to the model for routing instead of being OCR'd to text first. Defaults to true for new classify functions and false for the legacy route type.
  - object
    - `functionName` string — Name of function. Must be UNIQUE on a per-environment basis.
    - `displayName` string — Display name of function. Human-readable name to help you identify the function.
    - `tags` string[] — Array of tags to categorize and organize functions.
    - `type` 'send', required
    - `destinationType` 'webhook' | 's3' | 'google_drive' — Destination type for a Send function.
    - `webhookUrl` string — Webhook URL to POST the payload to. Required when destinationType is webhook.
    - `webhookSigningEnabled` boolean — Whether to sign webhook deliveries with an HMAC-SHA256 `bem-signature` header. Defaults to `true` when omitted — signing is on by default for new send functions. Set explicitly to `false` to disable.
    - `s3Bucket` string — S3 bucket to upload the payload to. Required when destinationType is s3.
    - `s3Prefix` string — Optional S3 key prefix (folder path).
    - `googleDriveFolderId` string — Google Drive folder ID. Required when destinationType is google_drive. Managed via Paragon OAuth.
  - object
    - `functionName` string — Name of function. Must be UNIQUE on a per-environment basis.
    - `displayName` string — Display name of function. Human-readable name to help you identify the function.
    - `tags` string[] — Array of tags to categorize and organize functions.
    - `splitType` 'print_page' | 'semantic_page'
    - `printPageSplitConfig` object
      - `nextFunctionID` string
      - `nextFunctionName` string
    - `semanticPageSplitConfig` object
      - `itemClasses` SplitFunctionSemanticPageItemClass[]
        - `name` string, required
        - `description` string
        - `nextFunctionID` string — The unique ID of the function you want to use for this item class.
        - `nextFunctionName` string — The unique name of the function you want to use for this item class.
    - `type` 'split', required
  - object
    - `functionName` string — Name of function. Must be UNIQUE on a per-environment basis.
    - `displayName` string — Display name of function. Human-readable name to help you identify the function.
    - `tags` string[] — Array of tags to categorize and organize functions.
    - `type` 'join', required
    - `description` string — Description of join function.
    - `joinType` 'standard' — The type of join to perform.
    - `outputSchemaName` string — Name of output schema object.
    - `outputSchema` object — Desired output structure defined in standard JSON Schema convention.
  - object — A function that transforms and customizes input payloads using JMESPath expressions. Payload shaping allows you to extract specific data, perform calculations, and reshape complex input structures into simplified, standardized output formats tailored to your downstream systems or business requirements.
    - `functionName` string — Name of function. Must be UNIQUE on a per-environment basis.
    - `displayName` string — Display name of function. Human-readable name to help you identify the function.
    - `tags` string[] — Array of tags to categorize and organize functions.
    - `type` 'payload_shaping', required
    - `shapingSchema` string — JMESPath expression that defines how to transform and customize the input payload structure. Payload shaping allows you to extract, reshape, and reorganize data from complex input payloads into a simplified, standardized output format. Use JMESPath syntax to select specific fields, perform calculations, and create new data structures tailored to your needs.
  - object
    - `config` EnrichConfig — Configuration for an enrich function. **How Enrich Functions Work:** Enrich functions augment JSON input with data from external sources. They take JSON input (typically from a previous function), extract specified fields, fetch or search for matching data, and inject the results back into the JSON. **Data Sources:** - **Collections** (`source: "collection"`): Vector/keyword search against a BEM collection. Best for semantic matching against pre-indexed documents. - **Endpoints** (`source: "endpoint"`): HTTP call to any user-provided REST API. Best for looking up live data from CRMs, ERPs, or other external systems. Optionally uses LLM agent reasoning to rank candidates returned by the endpoint. **Input Requirements:** - Must receive JSON input (typically from a previous function's output) **Example Use Cases:** - Match product descriptions to SKU codes from a product catalog collection - Enrich customer data with account details from a CRM endpoint - Use LLM agent reasoning to fuzzy-match line item descriptions to catalog products **Configuration:** - Define named endpoints (for endpoint-source steps) - Define one or more enrichment steps; steps are executed sequentially
      - `steps` EnrichStep[], required — Array of enrichment steps to execute sequentially.
        - `source` 'collection' | 'endpoint' — Where to fetch enrichment data from (default: `"collection"`). - `"collection"`: Vector/keyword search against a BEM collection. Requires `collectionName`. - `"endpoint"`: HTTP call to a named endpoint defined in `enrichConfig.endpoints`. Requires `endpointName`.
        - `sourceField` string, required — JMESPath expression to extract source data. Can extract a single value or an array. Each extracted value is looked up independently.
        - `collectionName` string — Name of the collection to search against. Required when `source` is `"collection"`. The collection must exist and contain items. Supports hierarchical paths when used with `includeSubcollections`.
        - `endpointName` string — Name of an endpoint defined in `enrichConfig.endpoints`. Required when `source` is `"endpoint"`.
        - `targetField` string, required — Field path where enriched results should be placed. Use simple field names (e.g., "enriched_products"). Results are always injected as an array (list), regardless of topK value.
        - `topK` integer — Number of top matching results to return per query (default: 1). Results are always returned as an array (list), sorted best match first (by cosine distance for `semantic`/`exact`, or by fused relevance score for `hybrid`). Duplicate items are collapsed, so results are distinct: you get `topK` distinct matches unless the collection contains fewer. - 1: Returns array with single best match: `[{...}]` - >1: Returns array with multiple matches: `[{...}, {...}, ...]` When re-ranking is on (the default for `semantic`/`hybrid`), `topK` is still the number of results returned — re-ranking changes their order, not the count. The candidate pool the LLM chooses from is widened internally to at least 5, so even `topK: 1` re-ranks a real pool and returns the single best match.
        - `searchMode` 'semantic' | 'exact' | 'hybrid' — Search mode to use for enrichment (default: "semantic"). **semantic**: Vector similarity search using dense embeddings. Best for finding conceptually similar items. - Use for: Product descriptions, natural language content - Example: "red sports car" matches "crimson convertible automobile" **exact**: Exact keyword matching using PostgreSQL text search. Best for exact identifiers. - Use for: SKU numbers, routing numbers, account IDs, exact tags - Example: "SKU-12345" only matches items containing that exact text **hybrid**: Fuses the dense (semantic) and sparse (keyword) rankings with weighted Reciprocal Rank Fusion (k=60, 0.5 dense / 0.5 sparse). Because RRF combines rank positions rather than raw scores, semantic meaning and exact-token overlap contribute on the same scale. - Use for: Tags, categories, partial identifiers - Example: Balances semantic meaning with exact keyword matching
        - `scoreThreshold` number — Maximum cosine distance threshold for filtering results (default: 0.6). Results with cosine distance above this threshold are excluded. **Applies to `semantic` and `hybrid` search modes.** For `hybrid`, the Reciprocal Rank Fusion score is mapped onto the same 0–2 dissimilarity scale as cosine distance, so a single threshold works for both. `exact` uses keyword matching and ignores this setting. Note the default `0.6` is calibrated for cosine distance and is relatively strict for hybrid. Cosine distance ranges from 0.0 (identical) to 2.0 (opposite): - 0.0 - 0.3: Very similar (strict threshold, high-quality matches only) - 0.3 - 0.6: Reasonably similar (moderate threshold) - 0.6 - 1.0: Loosely related (lenient threshold) - > 1.0: Rarely useful — allows nearly unrelated results For most semantic search use cases, good matches typically fall in the 0.2 - 0.5 range.
        - `includeScore` boolean — Whether to include retrieval scores in results. When enabled, each result includes a `score` field and a `scoreType` identifying the metric: - `"cosineDistance"` (semantic): 0.0 (perfect match) to 2.0 (completely dissimilar) — lower is better. - `"hybridScore"` (hybrid): an RRF score mapped onto cosine distance's 0–2 scale — lower is better (0.0 = top of both rankings).
        - `includeSubcollections` boolean — When true, searches all collections under the hierarchical path. For example, "customers" will match "customers", "customers.premium", etc.
      - `endpoints` EnrichEndpoint[] — Named HTTP endpoints available to endpoint-source steps. Each endpoint must have a unique `name` referenced by the step's `endpointName`. Required when any step uses `source: "endpoint"`.
        - `name` string, required — Unique name for this endpoint, referenced by enrichStep.endpointName.
        - `url` string, required — Full URL of the endpoint (must be http:// or https://).
        - `method` 'GET' | 'POST', required — HTTP method to use.
        - `headers` object — Additional HTTP headers to include in every request (e.g. `Authorization: Bearer <token>`).
        - `queryParam` string — Query parameter name used to pass the extracted source value. **Required for GET endpoints.** The value is URL-encoded and appended as `?{queryParam}={sourceValue}`. Example: `queryParam: "q"` → `GET /products?q=blue+widget`
        - `bodyTemplate` string — JSON body template for POST requests. **Required for POST endpoints.** Must contain the `{value}` placeholder, which is replaced with the extracted source value at runtime. Example: `bodyTemplate: "{\"query\": \"{value}\", \"limit\": 10}"`
        - `responsePath` string — JMESPath expression applied to the response body to extract the enrichment value. Omit to use the entire response body as the result. **For agent reasoning:** use a wildcard projection (e.g. `items[*]` or `results[*].data`) so the endpoint's list of candidates is flattened into an array before being passed to the LLM. A non-wildcard path (e.g. `data.product`) extracts a single value treated as one candidate. **Response size:** the platform reads at most 50 MB of the response body before decoding, regardless of the Content-Length header.
        - `matchInstructions` string — Natural-language instructions for LLM agent reasoning. When set, the candidates fetched from the endpoint are passed to an LLM with these instructions, which selects the best match(es) and returns them ranked best-first. Each injected result has the shape `{ data, rank, confidence, reasoning? }` (rank is 1-based, 1 = best). When omitted, the raw fetched value is injected without any LLM involvement.
        - `matchTopK` integer — Maximum number of ranked matches to return per source value when `matchInstructions` is set (default: 1). Ignored when `matchInstructions` is empty.
        - `maxCandidates` integer — LLM batch size during agent reasoning (default: 50). All candidates — across all fetched pages — are scored in batches of this size. Smaller values reduce per-call token usage; larger values mean fewer LLM calls. Ignored when `matchInstructions` is empty.
        - `nextPagePath` string — JMESPath expression applied to each raw response to extract the cursor or token for the next page (e.g. `"nextCursor"`, `"pagination.nextToken"`). An absent, null, or empty-string result stops pagination. Both string and numeric values are supported — numbers are converted to their decimal string representation before being forwarded as a query parameter. Must be set together with `nextPageParam`. **Supported pagination styles:** - **Cursor/token-based** — server returns an opaque token in the response body (e.g. `{"nextCursor": "abc123"}`). Set `nextPagePath: "nextCursor"` and the platform forwards it verbatim on the next request. - **Server-computed offset/page** — server echoes back the next offset or page number in the response body (e.g. `{"nextOffset": 50}` or `{"nextPage": 2}`). Set `nextPagePath: "nextOffset"` and the platform forwards the value as-is. **Not supported:** - **Client-computed offset** — APIs where the client must compute `offset += limit` itself (e.g. `?offset=0&limit=50` with no next-offset in the response). Workaround: ask the API provider to return the next offset in the response body, or bake a fixed page size into the URL and use a server-side cursor instead. - **Client-computed page number** — APIs where the client increments `?page=N` itself with no next-page value in the response. Same workaround applies. - **Link header** — `Link: <url>; rel="next"` in HTTP response headers. The platform only inspects the response body.
        - `nextPageParam` string — Query parameter name used to pass the cursor on subsequent GET requests, or the `{placeholder}` name used in the POST `bodyTemplate` (e.g. `"cursor"`, `"pageToken"`, `"offset"`). Must be set together with `nextPagePath`.
        - `maxPages` integer — Maximum number of pages to fetch (default: 10). Acts as a safety cap against infinite pagination loops when the server never returns an empty cursor.
    - `type` 'enrich', required
  - object
    - `functionName` string — Name of function. Must be UNIQUE on a per-environment basis.
    - `displayName` string — Display name of function. Human-readable name to help you identify the function.
    - `tags` string[] — Array of tags to categorize and organize functions.
    - `type` 'parse', required
    - `parseConfig` ParseConfig — Per-version configuration for a Parse function. Parse renders document pages (PDF, image) via vision LLM and emits structured JSON. The two toggles below independently control entity extraction (a per-call output concern) and cross-document memory linking (an environment-wide concern).
      - `extractEntities` boolean — When true, extract named entities (people, organizations, products, studies, identifiers, etc.) and the relationships between them, and dedupe by canonical name within the document. When false, only `sections[]` is extracted; `entities[]` and `relationships[]` come back empty in the parse output. Defaults to true.
      - `linkAcrossDocuments` boolean — When true, link this document's entities to entities seen in earlier documents in this environment, building one canonical record per real-world thing across the corpus. Visible in the Memory tab and queryable via `POST /v3/fs` (op=find / open / xref). Doesn't change this call's parse output. Requires `extractEntities=true`. Defaults to true.
      - `schema` object — Optional JSONSchema. When provided, each chunk performs schema-guided extraction. When absent, chunks perform open-ended discovery and return sections, entities, and relationships per the discovery schema.
      - `defaultBucket` string — Optional bucket NAME that parse-extracted entities land in when no call-level bucket is supplied. Lower precedence than a call-level bucket, higher than the account+environment default.
    - `extraConfig` ParseExtraFunctionConfiguration — Cross-cutting toggles for Parse functions. Mirrors the `extraConfig` surface on Extract / Join — separated from `parseConfig` so the per-call Parse output shape stays distinct from operator-level execution flags.
      - `enableBoundingBoxes` boolean — When true, return per-section and per-entity-mention coordinates in the parse event's `fieldBoundingBoxes` map (same shape as Extract: JSON Pointer key → array of `{page, left, top, width, height}` with coordinates normalized to [0, 1]). Keys are `/sections/{N}` and `/entities/{N}/occurrences/{M}` into the parse output. Only applies to the open-ended discovery path (no `schema`) and to vision input types. Bedrock-backed parse functions silently return an empty map (no native bbox support). Defaults to false.
  - object
    - `functionName` string — Name of function. Must be UNIQUE on a per-environment basis.
    - `displayName` string — Display name of function. Human-readable name to help you identify the function.
    - `tags` string[] — Array of tags to categorize and organize functions.
    - `type` 'render', required
    - `renderConfig` RenderConfigInput — Request-side render configuration. Carries the template document as base64-encoded `.docx` bytes: the server validates them, stores the template, and derives the placeholder/style-id contract at create/update time, so clients never submit `placeholders` or `styleIds`. The response shape (`RenderConfig`) returns the derived contract.
      - `template` RenderTemplateInput, required
        - `name` string — Original upload filename (e.g. `contract.docx`), stored for display only. Does not affect where the template is stored.
        - `base64` string, byte, required — Base64-encoded `.docx` bytes. In the Bem CLI, use `@path/to/file` to embed it automatically.

## Response `200`

The request has succeeded.

- FunctionResponseV3 — Single-function response wrapper used by V3 function endpoints. V3 wraps individual function responses in a `{"function": ...}` envelope for consistency with other V3 resource endpoints.
  - `function` union, required — V3 read-side union. Same shape as the shared `Function` union but with `classify` in place of `route`. Legacy `transform` and `analyze` functions remain readable via V3.
    - object
      - `functionID` string, required — Unique identifier of function.
      - `functionName` string, required — Name of function. Must be UNIQUE on a per-environment basis.
      - `versionNum` integer, required — Version number of function.
      - `usedInWorkflows` WorkflowUsageInfo[] — List of workflows that use this function.
        - `workflowID` string, required — Unique identifier of workflow.
        - `workflowName` string, required — Name of workflow.
        - `currentVersionNum` integer, required — Current version number of workflow, provided for reference - compare to usedInWorkflowVersionNums to see whether the current version of the workflow uses this function version.
        - `usedInWorkflowVersionNums` integer[], required — Version numbers of workflows that this function version is used in.
      - `displayName` string — Display name of function. Human-readable name to help you identify the function.
      - `tags` string[] — Array of tags to categorize and organize functions.
      - `audit` FunctionAudit
        - `functionCreatedBy` UserActionSummary
          - `userActionID` string, required — Unique identifier of the user action.
          - `userID` string — User's ID. Present for user-initiated actions.
          - `userEmail` string — User's email address. Present for user-initiated actions.
          - `apiKeyName` string — API key name. Present for API key-initiated actions.
          - `emailAddress` string — Email address. Present for email-initiated actions.
          - `createdAt` string, date-time, required — The date and time the action was created.
        - `functionLastUpdatedBy` UserActionSummary
          - `userActionID` string, required — Unique identifier of the user action.
          - `userID` string — User's ID. Present for user-initiated actions.
          - `userEmail` string — User's email address. Present for user-initiated actions.
          - `apiKeyName` string — API key name. Present for API key-initiated actions.
          - `emailAddress` string — Email address. Present for email-initiated actions.
          - `createdAt` string, date-time, required — The date and time the action was created.
        - `versionCreatedBy` UserActionSummary
          - `userActionID` string, required — Unique identifier of the user action.
          - `userID` string — User's ID. Present for user-initiated actions.
          - `userEmail` string — User's email address. Present for user-initiated actions.
          - `apiKeyName` string — API key name. Present for API key-initiated actions.
          - `emailAddress` string — Email address. Present for email-initiated actions.
          - `createdAt` string, date-time, required — The date and time the action was created.
      - `type` 'transform', required
      - `outputSchemaName` string, required — Name of output schema object.
      - `outputSchema` object, required — Desired output structure defined in standard JSON Schema convention.
      - `emailAddress` string, required — Email address automatically created by bem. You can forward emails with or without attachments, to be transformed.
      - `tabularChunkingEnabled` boolean, required — Whether tabular chunking is enabled on the pipeline. This processes tables in CSV/Excel in row batches, rather than all rows at once.
    - object — A function that extracts structured JSON from documents and images. Accepts a wide range of input types including PDFs, images, spreadsheets, emails, and more.
      - `functionID` string, required — Unique identifier of function.
      - `functionName` string, required — Name of function. Must be UNIQUE on a per-environment basis.
      - `versionNum` integer, required — Version number of function.
      - `usedInWorkflows` WorkflowUsageInfo[] — List of workflows that use this function.
        - `workflowID` string, required — Unique identifier of workflow.
        - `workflowName` string, required — Name of workflow.
        - `currentVersionNum` integer, required — Current version number of workflow, provided for reference - compare to usedInWorkflowVersionNums to see whether the current version of the workflow uses this function version.
        - `usedInWorkflowVersionNums` integer[], required — Version numbers of workflows that this function version is used in.
      - `displayName` string — Display name of function. Human-readable name to help you identify the function.
      - `tags` string[] — Array of tags to categorize and organize functions.
      - `audit` FunctionAudit
        - `functionCreatedBy` UserActionSummary
          - `userActionID` string, required — Unique identifier of the user action.
          - `userID` string — User's ID. Present for user-initiated actions.
          - `userEmail` string — User's email address. Present for user-initiated actions.
          - `apiKeyName` string — API key name. Present for API key-initiated actions.
          - `emailAddress` string — Email address. Present for email-initiated actions.
          - `createdAt` string, date-time, required — The date and time the action was created.
        - `functionLastUpdatedBy` UserActionSummary
          - `userActionID` string, required — Unique identifier of the user action.
          - `userID` string — User's ID. Present for user-initiated actions.
          - `userEmail` string — User's email address. Present for user-initiated actions.
          - `apiKeyName` string — API key name. Present for API key-initiated actions.
          - `emailAddress` string — Email address. Present for email-initiated actions.
          - `createdAt` string, date-time, required — The date and time the action was created.
        - `versionCreatedBy` UserActionSummary
          - `userActionID` string, required — Unique identifier of the user action.
          - `userID` string — User's ID. Present for user-initiated actions.
          - `userEmail` string — User's email address. Present for user-initiated actions.
          - `apiKeyName` string — API key name. Present for API key-initiated actions.
          - `emailAddress` string — Email address. Present for email-initiated actions.
          - `createdAt` string, date-time, required — The date and time the action was created.
      - `type` 'extract', required
      - `outputSchemaName` string, required — Name of output schema object.
      - `outputSchema` object, required — Desired output structure defined in standard JSON Schema convention.
      - `enableBoundingBoxes` boolean, required — Whether bounding box extraction is enabled. Applies to vision input types (pdf, png, jpeg, heic, heif, webp) that dispatch through the analyze path. When true, the function returns the document regions (page, coordinates) from which each field was extracted.
      - `preCount` boolean, required — Reducing the risk of the model stopping early on long documents. Trade-off: Increases total latency.
    - object
      - `functionID` string, required — Unique identifier of function.
      - `functionName` string, required — Name of function. Must be UNIQUE on a per-environment basis.
      - `versionNum` integer, required — Version number of function.
      - `usedInWorkflows` WorkflowUsageInfo[] — List of workflows that use this function.
        - `workflowID` string, required — Unique identifier of workflow.
        - `workflowName` string, required — Name of workflow.
        - `currentVersionNum` integer, required — Current version number of workflow, provided for reference - compare to usedInWorkflowVersionNums to see whether the current version of the workflow uses this function version.
        - `usedInWorkflowVersionNums` integer[], required — Version numbers of workflows that this function version is used in.
      - `displayName` string — Display name of function. Human-readable name to help you identify the function.
      - `tags` string[] — Array of tags to categorize and organize functions.
      - `audit` FunctionAudit
        - `functionCreatedBy` UserActionSummary
          - `userActionID` string, required — Unique identifier of the user action.
          - `userID` string — User's ID. Present for user-initiated actions.
          - `userEmail` string — User's email address. Present for user-initiated actions.
          - `apiKeyName` string — API key name. Present for API key-initiated actions.
          - `emailAddress` string — Email address. Present for email-initiated actions.
          - `createdAt` string, date-time, required — The date and time the action was created.
        - `functionLastUpdatedBy` UserActionSummary
          - `userActionID` string, required — Unique identifier of the user action.
          - `userID` string — User's ID. Present for user-initiated actions.
          - `userEmail` string — User's email address. Present for user-initiated actions.
          - `apiKeyName` string — API key name. Present for API key-initiated actions.
          - `emailAddress` string — Email address. Present for email-initiated actions.
          - `createdAt` string, date-time, required — The date and time the action was created.
        - `versionCreatedBy` UserActionSummary
          - `userActionID` string, required — Unique identifier of the user action.
          - `userID` string — User's ID. Present for user-initiated actions.
          - `userEmail` string — User's email address. Present for user-initiated actions.
          - `apiKeyName` string — API key name. Present for API key-initiated actions.
          - `emailAddress` string — Email address. Present for email-initiated actions.
          - `createdAt` string, date-time, required — The date and time the action was created.
      - `type` 'analyze', required
      - `outputSchemaName` string, required — Name of output schema object.
      - `outputSchema` object, required — Desired output structure defined in standard JSON Schema convention.
      - `enableBoundingBoxes` boolean, required — Whether bounding box extraction is enabled. Only applicable to analyze and extract functions. When true, the function returns the document regions (page, coordinates) from which each field was extracted.
      - `preCount` boolean, required — Reducing the risk of the model stopping early on long documents. Trade-off: Increases total latency.
    - object
      - `functionID` string, required — Unique identifier of function.
      - `functionName` string, required — Name of function. Must be UNIQUE on a per-environment basis.
      - `versionNum` integer, required — Version number of function.
      - `usedInWorkflows` WorkflowUsageInfo[] — List of workflows that use this function.
        - `workflowID` string, required — Unique identifier of workflow.
        - `workflowName` string, required — Name of workflow.
        - `currentVersionNum` integer, required — Current version number of workflow, provided for reference - compare to usedInWorkflowVersionNums to see whether the current version of the workflow uses this function version.
        - `usedInWorkflowVersionNums` integer[], required — Version numbers of workflows that this function version is used in.
      - `displayName` string — Display name of function. Human-readable name to help you identify the function.
      - `tags` string[] — Array of tags to categorize and organize functions.
      - `audit` FunctionAudit
        - `functionCreatedBy` UserActionSummary
          - `userActionID` string, required — Unique identifier of the user action.
          - `userID` string — User's ID. Present for user-initiated actions.
          - `userEmail` string — User's email address. Present for user-initiated actions.
          - `apiKeyName` string — API key name. Present for API key-initiated actions.
          - `emailAddress` string — Email address. Present for email-initiated actions.
          - `createdAt` string, date-time, required — The date and time the action was created.
        - `functionLastUpdatedBy` UserActionSummary
          - `userActionID` string, required — Unique identifier of the user action.
          - `userID` string — User's ID. Present for user-initiated actions.
          - `userEmail` string — User's email address. Present for user-initiated actions.
          - `apiKeyName` string — API key name. Present for API key-initiated actions.
          - `emailAddress` string — Email address. Present for email-initiated actions.
          - `createdAt` string, date-time, required — The date and time the action was created.
        - `versionCreatedBy` UserActionSummary
          - `userActionID` string, required — Unique identifier of the user action.
          - `userID` string — User's ID. Present for user-initiated actions.
          - `userEmail` string — User's email address. Present for user-initiated actions.
          - `apiKeyName` string — API key name. Present for API key-initiated actions.
          - `emailAddress` string — Email address. Present for email-initiated actions.
          - `createdAt` string, date-time, required — The date and time the action was created.
      - `type` 'classify', required
      - `description` string, required — Description of classifier. Can be used to provide additional context on classifier's purpose and expected inputs.
      - `classifications` object[], required — List of classifications a classify function can produce. Shares the underlying route list shape.
        - `name` string, required
        - `description` string
        - `isErrorFallback` boolean
        - `origin` object
          - `email` object
            - `patterns` string[]
        - `regex` object
          - `patterns` string[]
        - `functionID` string
        - `functionName` string
      - `emailAddress` string, required — Email address automatically created by bem. You can forward emails with or without attachments, to be classified.
      - `nativeVisualInput` boolean — When true, image and PDF inputs are sent directly to the model for routing instead of being OCR'd to text first. Defaults to true for new classify functions and false for the legacy route type.
    - object — A function that delivers workflow outputs to an external destination. Send functions receive the output of an upstream workflow node and forward it to a webhook, S3 bucket, or Google Drive folder.
      - `functionID` string, required — Unique identifier of function.
      - `functionName` string, required — Name of function. Must be UNIQUE on a per-environment basis.
      - `versionNum` integer, required — Version number of function.
      - `usedInWorkflows` WorkflowUsageInfo[] — List of workflows that use this function.
        - `workflowID` string, required — Unique identifier of workflow.
        - `workflowName` string, required — Name of workflow.
        - `currentVersionNum` integer, required — Current version number of workflow, provided for reference - compare to usedInWorkflowVersionNums to see whether the current version of the workflow uses this function version.
        - `usedInWorkflowVersionNums` integer[], required — Version numbers of workflows that this function version is used in.
      - `displayName` string — Display name of function. Human-readable name to help you identify the function.
      - `tags` string[] — Array of tags to categorize and organize functions.
      - `audit` FunctionAudit
        - `functionCreatedBy` UserActionSummary
          - `userActionID` string, required — Unique identifier of the user action.
          - `userID` string — User's ID. Present for user-initiated actions.
          - `userEmail` string — User's email address. Present for user-initiated actions.
          - `apiKeyName` string — API key name. Present for API key-initiated actions.
          - `emailAddress` string — Email address. Present for email-initiated actions.
          - `createdAt` string, date-time, required — The date and time the action was created.
        - `functionLastUpdatedBy` UserActionSummary
          - `userActionID` string, required — Unique identifier of the user action.
          - `userID` string — User's ID. Present for user-initiated actions.
          - `userEmail` string — User's email address. Present for user-initiated actions.
          - `apiKeyName` string — API key name. Present for API key-initiated actions.
          - `emailAddress` string — Email address. Present for email-initiated actions.
          - `createdAt` string, date-time, required — The date and time the action was created.
        - `versionCreatedBy` UserActionSummary
          - `userActionID` string, required — Unique identifier of the user action.
          - `userID` string — User's ID. Present for user-initiated actions.
          - `userEmail` string — User's email address. Present for user-initiated actions.
          - `apiKeyName` string — API key name. Present for API key-initiated actions.
          - `emailAddress` string — Email address. Present for email-initiated actions.
          - `createdAt` string, date-time, required — The date and time the action was created.
      - `type` 'send', required
      - `destinationType` 'webhook' | 's3' | 'google_drive', required — Destination type for a Send function.
      - `webhookUrl` string — Webhook URL to POST the payload to. Present when destinationType is webhook.
      - `webhookSigningEnabled` boolean — Whether webhook payloads are signed with an HMAC-SHA256 `bem-signature` header.
      - `s3Bucket` string — S3 bucket to upload the payload to. Present when destinationType is s3.
      - `s3Prefix` string — S3 key prefix (folder path). Optional, present when destinationType is s3.
      - `googleDriveFolderId` string — Google Drive folder ID. Present when destinationType is google_drive. Managed via Paragon OAuth.
    - object
      - `functionID` string, required — Unique identifier of function.
      - `functionName` string, required — Name of function. Must be UNIQUE on a per-environment basis.
      - `versionNum` integer, required — Version number of function.
      - `usedInWorkflows` WorkflowUsageInfo[] — List of workflows that use this function.
        - `workflowID` string, required — Unique identifier of workflow.
        - `workflowName` string, required — Name of workflow.
        - `currentVersionNum` integer, required — Current version number of workflow, provided for reference - compare to usedInWorkflowVersionNums to see whether the current version of the workflow uses this function version.
        - `usedInWorkflowVersionNums` integer[], required — Version numbers of workflows that this function version is used in.
      - `displayName` string — Display name of function. Human-readable name to help you identify the function.
      - `tags` string[] — Array of tags to categorize and organize functions.
      - `audit` FunctionAudit
        - `functionCreatedBy` UserActionSummary
          - `userActionID` string, required — Unique identifier of the user action.
          - `userID` string — User's ID. Present for user-initiated actions.
          - `userEmail` string — User's email address. Present for user-initiated actions.
          - `apiKeyName` string — API key name. Present for API key-initiated actions.
          - `emailAddress` string — Email address. Present for email-initiated actions.
          - `createdAt` string, date-time, required — The date and time the action was created.
        - `functionLastUpdatedBy` UserActionSummary
          - `userActionID` string, required — Unique identifier of the user action.
          - `userID` string — User's ID. Present for user-initiated actions.
          - `userEmail` string — User's email address. Present for user-initiated actions.
          - `apiKeyName` string — API key name. Present for API key-initiated actions.
          - `emailAddress` string — Email address. Present for email-initiated actions.
          - `createdAt` string, date-time, required — The date and time the action was created.
        - `versionCreatedBy` UserActionSummary
          - `userActionID` string, required — Unique identifier of the user action.
          - `userID` string — User's ID. Present for user-initiated actions.
          - `userEmail` string — User's email address. Present for user-initiated actions.
          - `apiKeyName` string — API key name. Present for API key-initiated actions.
          - `emailAddress` string — Email address. Present for email-initiated actions.
          - `createdAt` string, date-time, required — The date and time the action was created.
      - `type` 'split', required
      - `splitType` 'print_page' | 'semantic_page', required — The method used to split pages.
      - `printPageSplitConfig` object — Configuration for print page splitting.
        - `nextFunctionID` string
      - `semanticPageSplitConfig` object — Configuration for semantic page splitting.
        - `itemClasses` SplitFunctionSemanticPageItemClass[]
          - `name` string, required
          - `description` string
          - `nextFunctionID` string — The unique ID of the function you want to use for this item class.
          - `nextFunctionName` string — The unique name of the function you want to use for this item class.
    - object
      - `functionID` string, required — Unique identifier of function.
      - `functionName` string, required — Name of function. Must be UNIQUE on a per-environment basis.
      - `versionNum` integer, required — Version number of function.
      - `usedInWorkflows` WorkflowUsageInfo[] — List of workflows that use this function.
        - `workflowID` string, required — Unique identifier of workflow.
        - `workflowName` string, required — Name of workflow.
        - `currentVersionNum` integer, required — Current version number of workflow, provided for reference - compare to usedInWorkflowVersionNums to see whether the current version of the workflow uses this function version.
        - `usedInWorkflowVersionNums` integer[], required — Version numbers of workflows that this function version is used in.
      - `displayName` string — Display name of function. Human-readable name to help you identify the function.
      - `tags` string[] — Array of tags to categorize and organize functions.
      - `audit` FunctionAudit
        - `functionCreatedBy` UserActionSummary
          - `userActionID` string, required — Unique identifier of the user action.
          - `userID` string — User's ID. Present for user-initiated actions.
          - `userEmail` string — User's email address. Present for user-initiated actions.
          - `apiKeyName` string — API key name. Present for API key-initiated actions.
          - `emailAddress` string — Email address. Present for email-initiated actions.
          - `createdAt` string, date-time, required — The date and time the action was created.
        - `functionLastUpdatedBy` UserActionSummary
          - `userActionID` string, required — Unique identifier of the user action.
          - `userID` string — User's ID. Present for user-initiated actions.
          - `userEmail` string — User's email address. Present for user-initiated actions.
          - `apiKeyName` string — API key name. Present for API key-initiated actions.
          - `emailAddress` string — Email address. Present for email-initiated actions.
          - `createdAt` string, date-time, required — The date and time the action was created.
        - `versionCreatedBy` UserActionSummary
          - `userActionID` string, required — Unique identifier of the user action.
          - `userID` string — User's ID. Present for user-initiated actions.
          - `userEmail` string — User's email address. Present for user-initiated actions.
          - `apiKeyName` string — API key name. Present for API key-initiated actions.
          - `emailAddress` string — Email address. Present for email-initiated actions.
          - `createdAt` string, date-time, required — The date and time the action was created.
      - `type` 'join', required
      - `description` string, required — Description of join function.
      - `joinType` 'standard', required — The type of join to perform.
      - `outputSchemaName` string, required — Name of output schema object.
      - `outputSchema` object, required — Desired output structure defined in standard JSON Schema convention.
    - object — A function that transforms and customizes input payloads using JMESPath expressions. Payload shaping allows you to extract specific data, perform calculations, and reshape complex input structures into simplified, standardized output formats tailored to your downstream systems or business requirements.
      - `functionID` string, required — Unique identifier of function.
      - `functionName` string, required — Name of function. Must be UNIQUE on a per-environment basis.
      - `versionNum` integer, required — Version number of function.
      - `usedInWorkflows` WorkflowUsageInfo[] — List of workflows that use this function.
        - `workflowID` string, required — Unique identifier of workflow.
        - `workflowName` string, required — Name of workflow.
        - `currentVersionNum` integer, required — Current version number of workflow, provided for reference - compare to usedInWorkflowVersionNums to see whether the current version of the workflow uses this function version.
        - `usedInWorkflowVersionNums` integer[], required — Version numbers of workflows that this function version is used in.
      - `displayName` string — Display name of function. Human-readable name to help you identify the function.
      - `tags` string[] — Array of tags to categorize and organize functions.
      - `audit` FunctionAudit
        - `functionCreatedBy` UserActionSummary
          - `userActionID` string, required — Unique identifier of the user action.
          - `userID` string — User's ID. Present for user-initiated actions.
          - `userEmail` string — User's email address. Present for user-initiated actions.
          - `apiKeyName` string — API key name. Present for API key-initiated actions.
          - `emailAddress` string — Email address. Present for email-initiated actions.
          - `createdAt` string, date-time, required — The date and time the action was created.
        - `functionLastUpdatedBy` UserActionSummary
          - `userActionID` string, required — Unique identifier of the user action.
          - `userID` string — User's ID. Present for user-initiated actions.
          - `userEmail` string — User's email address. Present for user-initiated actions.
          - `apiKeyName` string — API key name. Present for API key-initiated actions.
          - `emailAddress` string — Email address. Present for email-initiated actions.
          - `createdAt` string, date-time, required — The date and time the action was created.
        - `versionCreatedBy` UserActionSummary
          - `userActionID` string, required — Unique identifier of the user action.
          - `userID` string — User's ID. Present for user-initiated actions.
          - `userEmail` string — User's email address. Present for user-initiated actions.
          - `apiKeyName` string — API key name. Present for API key-initiated actions.
          - `emailAddress` string — Email address. Present for email-initiated actions.
          - `createdAt` string, date-time, required — The date and time the action was created.
      - `type` 'payload_shaping', required
      - `shapingSchema` string, required — JMESPath expression that defines how to transform and customize the input payload structure. Payload shaping allows you to extract, reshape, and reorganize data from complex input payloads into a simplified, standardized output format. Use JMESPath syntax to select specific fields, perform calculations, and create new data structures tailored to your needs.
    - object
      - `functionID` string, required — Unique identifier of function.
      - `functionName` string, required — Name of function. Must be UNIQUE on a per-environment basis.
      - `versionNum` integer, required — Version number of function.
      - `usedInWorkflows` WorkflowUsageInfo[] — List of workflows that use this function.
        - `workflowID` string, required — Unique identifier of workflow.
        - `workflowName` string, required — Name of workflow.
        - `currentVersionNum` integer, required — Current version number of workflow, provided for reference - compare to usedInWorkflowVersionNums to see whether the current version of the workflow uses this function version.
        - `usedInWorkflowVersionNums` integer[], required — Version numbers of workflows that this function version is used in.
      - `displayName` string — Display name of function. Human-readable name to help you identify the function.
      - `tags` string[] — Array of tags to categorize and organize functions.
      - `audit` FunctionAudit
        - `functionCreatedBy` UserActionSummary
          - `userActionID` string, required — Unique identifier of the user action.
          - `userID` string — User's ID. Present for user-initiated actions.
          - `userEmail` string — User's email address. Present for user-initiated actions.
          - `apiKeyName` string — API key name. Present for API key-initiated actions.
          - `emailAddress` string — Email address. Present for email-initiated actions.
          - `createdAt` string, date-time, required — The date and time the action was created.
        - `functionLastUpdatedBy` UserActionSummary
          - `userActionID` string, required — Unique identifier of the user action.
          - `userID` string — User's ID. Present for user-initiated actions.
          - `userEmail` string — User's email address. Present for user-initiated actions.
          - `apiKeyName` string — API key name. Present for API key-initiated actions.
          - `emailAddress` string — Email address. Present for email-initiated actions.
          - `createdAt` string, date-time, required — The date and time the action was created.
        - `versionCreatedBy` UserActionSummary
          - `userActionID` string, required — Unique identifier of the user action.
          - `userID` string — User's ID. Present for user-initiated actions.
          - `userEmail` string — User's email address. Present for user-initiated actions.
          - `apiKeyName` string — API key name. Present for API key-initiated actions.
          - `emailAddress` string — Email address. Present for email-initiated actions.
          - `createdAt` string, date-time, required — The date and time the action was created.
      - `type` 'enrich', required
      - `config` EnrichConfig, required — Configuration for an enrich function. **How Enrich Functions Work:** Enrich functions augment JSON input with data from external sources. They take JSON input (typically from a previous function), extract specified fields, fetch or search for matching data, and inject the results back into the JSON. **Data Sources:** - **Collections** (`source: "collection"`): Vector/keyword search against a BEM collection. Best for semantic matching against pre-indexed documents. - **Endpoints** (`source: "endpoint"`): HTTP call to any user-provided REST API. Best for looking up live data from CRMs, ERPs, or other external systems. Optionally uses LLM agent reasoning to rank candidates returned by the endpoint. **Input Requirements:** - Must receive JSON input (typically from a previous function's output) **Example Use Cases:** - Match product descriptions to SKU codes from a product catalog collection - Enrich customer data with account details from a CRM endpoint - Use LLM agent reasoning to fuzzy-match line item descriptions to catalog products **Configuration:** - Define named endpoints (for endpoint-source steps) - Define one or more enrichment steps; steps are executed sequentially
        - `steps` EnrichStep[], required — Array of enrichment steps to execute sequentially.
          - `source` 'collection' | 'endpoint' — Where to fetch enrichment data from (default: `"collection"`). - `"collection"`: Vector/keyword search against a BEM collection. Requires `collectionName`. - `"endpoint"`: HTTP call to a named endpoint defined in `enrichConfig.endpoints`. Requires `endpointName`.
          - `sourceField` string, required — JMESPath expression to extract source data. Can extract a single value or an array. Each extracted value is looked up independently.
          - `collectionName` string — Name of the collection to search against. Required when `source` is `"collection"`. The collection must exist and contain items. Supports hierarchical paths when used with `includeSubcollections`.
          - `endpointName` string — Name of an endpoint defined in `enrichConfig.endpoints`. Required when `source` is `"endpoint"`.
          - `targetField` string, required — Field path where enriched results should be placed. Use simple field names (e.g., "enriched_products"). Results are always injected as an array (list), regardless of topK value.
          - `topK` integer — Number of top matching results to return per query (default: 1). Results are always returned as an array (list), sorted best match first (by cosine distance for `semantic`/`exact`, or by fused relevance score for `hybrid`). Duplicate items are collapsed, so results are distinct: you get `topK` distinct matches unless the collection contains fewer. - 1: Returns array with single best match: `[{...}]` - >1: Returns array with multiple matches: `[{...}, {...}, ...]` When re-ranking is on (the default for `semantic`/`hybrid`), `topK` is still the number of results returned — re-ranking changes their order, not the count. The candidate pool the LLM chooses from is widened internally to at least 5, so even `topK: 1` re-ranks a real pool and returns the single best match.
          - `searchMode` 'semantic' | 'exact' | 'hybrid' — Search mode to use for enrichment (default: "semantic"). **semantic**: Vector similarity search using dense embeddings. Best for finding conceptually similar items. - Use for: Product descriptions, natural language content - Example: "red sports car" matches "crimson convertible automobile" **exact**: Exact keyword matching using PostgreSQL text search. Best for exact identifiers. - Use for: SKU numbers, routing numbers, account IDs, exact tags - Example: "SKU-12345" only matches items containing that exact text **hybrid**: Fuses the dense (semantic) and sparse (keyword) rankings with weighted Reciprocal Rank Fusion (k=60, 0.5 dense / 0.5 sparse). Because RRF combines rank positions rather than raw scores, semantic meaning and exact-token overlap contribute on the same scale. - Use for: Tags, categories, partial identifiers - Example: Balances semantic meaning with exact keyword matching
          - `scoreThreshold` number — Maximum cosine distance threshold for filtering results (default: 0.6). Results with cosine distance above this threshold are excluded. **Applies to `semantic` and `hybrid` search modes.** For `hybrid`, the Reciprocal Rank Fusion score is mapped onto the same 0–2 dissimilarity scale as cosine distance, so a single threshold works for both. `exact` uses keyword matching and ignores this setting. Note the default `0.6` is calibrated for cosine distance and is relatively strict for hybrid. Cosine distance ranges from 0.0 (identical) to 2.0 (opposite): - 0.0 - 0.3: Very similar (strict threshold, high-quality matches only) - 0.3 - 0.6: Reasonably similar (moderate threshold) - 0.6 - 1.0: Loosely related (lenient threshold) - > 1.0: Rarely useful — allows nearly unrelated results For most semantic search use cases, good matches typically fall in the 0.2 - 0.5 range.
          - `includeScore` boolean — Whether to include retrieval scores in results. When enabled, each result includes a `score` field and a `scoreType` identifying the metric: - `"cosineDistance"` (semantic): 0.0 (perfect match) to 2.0 (completely dissimilar) — lower is better. - `"hybridScore"` (hybrid): an RRF score mapped onto cosine distance's 0–2 scale — lower is better (0.0 = top of both rankings).
          - `includeSubcollections` boolean — When true, searches all collections under the hierarchical path. For example, "customers" will match "customers", "customers.premium", etc.
        - `endpoints` EnrichEndpoint[] — Named HTTP endpoints available to endpoint-source steps. Each endpoint must have a unique `name` referenced by the step's `endpointName`. Required when any step uses `source: "endpoint"`.
          - `name` string, required — Unique name for this endpoint, referenced by enrichStep.endpointName.
          - `url` string, required — Full URL of the endpoint (must be http:// or https://).
          - `method` 'GET' | 'POST', required — HTTP method to use.
          - `headers` object — Additional HTTP headers to include in every request (e.g. `Authorization: Bearer <token>`).
          - `queryParam` string — Query parameter name used to pass the extracted source value. **Required for GET endpoints.** The value is URL-encoded and appended as `?{queryParam}={sourceValue}`. Example: `queryParam: "q"` → `GET /products?q=blue+widget`
          - `bodyTemplate` string — JSON body template for POST requests. **Required for POST endpoints.** Must contain the `{value}` placeholder, which is replaced with the extracted source value at runtime. Example: `bodyTemplate: "{\"query\": \"{value}\", \"limit\": 10}"`
          - `responsePath` string — JMESPath expression applied to the response body to extract the enrichment value. Omit to use the entire response body as the result. **For agent reasoning:** use a wildcard projection (e.g. `items[*]` or `results[*].data`) so the endpoint's list of candidates is flattened into an array before being passed to the LLM. A non-wildcard path (e.g. `data.product`) extracts a single value treated as one candidate. **Response size:** the platform reads at most 50 MB of the response body before decoding, regardless of the Content-Length header.
          - `matchInstructions` string — Natural-language instructions for LLM agent reasoning. When set, the candidates fetched from the endpoint are passed to an LLM with these instructions, which selects the best match(es) and returns them ranked best-first. Each injected result has the shape `{ data, rank, confidence, reasoning? }` (rank is 1-based, 1 = best). When omitted, the raw fetched value is injected without any LLM involvement.
          - `matchTopK` integer — Maximum number of ranked matches to return per source value when `matchInstructions` is set (default: 1). Ignored when `matchInstructions` is empty.
          - `maxCandidates` integer — LLM batch size during agent reasoning (default: 50). All candidates — across all fetched pages — are scored in batches of this size. Smaller values reduce per-call token usage; larger values mean fewer LLM calls. Ignored when `matchInstructions` is empty.
          - `nextPagePath` string — JMESPath expression applied to each raw response to extract the cursor or token for the next page (e.g. `"nextCursor"`, `"pagination.nextToken"`). An absent, null, or empty-string result stops pagination. Both string and numeric values are supported — numbers are converted to their decimal string representation before being forwarded as a query parameter. Must be set together with `nextPageParam`. **Supported pagination styles:** - **Cursor/token-based** — server returns an opaque token in the response body (e.g. `{"nextCursor": "abc123"}`). Set `nextPagePath: "nextCursor"` and the platform forwards it verbatim on the next request. - **Server-computed offset/page** — server echoes back the next offset or page number in the response body (e.g. `{"nextOffset": 50}` or `{"nextPage": 2}`). Set `nextPagePath: "nextOffset"` and the platform forwards the value as-is. **Not supported:** - **Client-computed offset** — APIs where the client must compute `offset += limit` itself (e.g. `?offset=0&limit=50` with no next-offset in the response). Workaround: ask the API provider to return the next offset in the response body, or bake a fixed page size into the URL and use a server-side cursor instead. - **Client-computed page number** — APIs where the client increments `?page=N` itself with no next-page value in the response. Same workaround applies. - **Link header** — `Link: <url>; rel="next"` in HTTP response headers. The platform only inspects the response body.
          - `nextPageParam` string — Query parameter name used to pass the cursor on subsequent GET requests, or the `{placeholder}` name used in the POST `bodyTemplate` (e.g. `"cursor"`, `"pageToken"`, `"offset"`). Must be set together with `nextPagePath`.
          - `maxPages` integer — Maximum number of pages to fetch (default: 10). Acts as a safety cap against infinite pagination loops when the server never returns an empty cursor.
    - object
      - `functionID` string, required — Unique identifier of function.
      - `functionName` string, required — Name of function. Must be UNIQUE on a per-environment basis.
      - `versionNum` integer, required — Version number of function.
      - `usedInWorkflows` WorkflowUsageInfo[] — List of workflows that use this function.
        - `workflowID` string, required — Unique identifier of workflow.
        - `workflowName` string, required — Name of workflow.
        - `currentVersionNum` integer, required — Current version number of workflow, provided for reference - compare to usedInWorkflowVersionNums to see whether the current version of the workflow uses this function version.
        - `usedInWorkflowVersionNums` integer[], required — Version numbers of workflows that this function version is used in.
      - `displayName` string — Display name of function. Human-readable name to help you identify the function.
      - `tags` string[] — Array of tags to categorize and organize functions.
      - `audit` FunctionAudit
        - `functionCreatedBy` UserActionSummary
          - `userActionID` string, required — Unique identifier of the user action.
          - `userID` string — User's ID. Present for user-initiated actions.
          - `userEmail` string — User's email address. Present for user-initiated actions.
          - `apiKeyName` string — API key name. Present for API key-initiated actions.
          - `emailAddress` string — Email address. Present for email-initiated actions.
          - `createdAt` string, date-time, required — The date and time the action was created.
        - `functionLastUpdatedBy` UserActionSummary
          - `userActionID` string, required — Unique identifier of the user action.
          - `userID` string — User's ID. Present for user-initiated actions.
          - `userEmail` string — User's email address. Present for user-initiated actions.
          - `apiKeyName` string — API key name. Present for API key-initiated actions.
          - `emailAddress` string — Email address. Present for email-initiated actions.
          - `createdAt` string, date-time, required — The date and time the action was created.
        - `versionCreatedBy` UserActionSummary
          - `userActionID` string, required — Unique identifier of the user action.
          - `userID` string — User's ID. Present for user-initiated actions.
          - `userEmail` string — User's email address. Present for user-initiated actions.
          - `apiKeyName` string — API key name. Present for API key-initiated actions.
          - `emailAddress` string — Email address. Present for email-initiated actions.
          - `createdAt` string, date-time, required — The date and time the action was created.
      - `type` 'parse', required
      - `parseConfig` ParseConfig — Per-version configuration for a Parse function. Parse renders document pages (PDF, image) via vision LLM and emits structured JSON. The two toggles below independently control entity extraction (a per-call output concern) and cross-document memory linking (an environment-wide concern).
        - `extractEntities` boolean — When true, extract named entities (people, organizations, products, studies, identifiers, etc.) and the relationships between them, and dedupe by canonical name within the document. When false, only `sections[]` is extracted; `entities[]` and `relationships[]` come back empty in the parse output. Defaults to true.
        - `linkAcrossDocuments` boolean — When true, link this document's entities to entities seen in earlier documents in this environment, building one canonical record per real-world thing across the corpus. Visible in the Memory tab and queryable via `POST /v3/fs` (op=find / open / xref). Doesn't change this call's parse output. Requires `extractEntities=true`. Defaults to true.
        - `schema` object — Optional JSONSchema. When provided, each chunk performs schema-guided extraction. When absent, chunks perform open-ended discovery and return sections, entities, and relationships per the discovery schema.
        - `defaultBucket` string — Optional bucket NAME that parse-extracted entities land in when no call-level bucket is supplied. Lower precedence than a call-level bucket, higher than the account+environment default.
      - `extraConfig` ParseExtraFunctionConfiguration — Cross-cutting toggles for Parse functions. Mirrors the `extraConfig` surface on Extract / Join — separated from `parseConfig` so the per-call Parse output shape stays distinct from operator-level execution flags.
        - `enableBoundingBoxes` boolean — When true, return per-section and per-entity-mention coordinates in the parse event's `fieldBoundingBoxes` map (same shape as Extract: JSON Pointer key → array of `{page, left, top, width, height}` with coordinates normalized to [0, 1]). Keys are `/sections/{N}` and `/entities/{N}/occurrences/{M}` into the parse output. Only applies to the open-ended discovery path (no `schema`) and to vision input types. Bedrock-backed parse functions silently return an empty map (no native bbox support). Defaults to false.
    - object
      - `functionID` string, required — Unique identifier of function.
      - `functionName` string, required — Name of function. Must be UNIQUE on a per-environment basis.
      - `versionNum` integer, required — Version number of function.
      - `usedInWorkflows` WorkflowUsageInfo[] — List of workflows that use this function.
        - `workflowID` string, required — Unique identifier of workflow.
        - `workflowName` string, required — Name of workflow.
        - `currentVersionNum` integer, required — Current version number of workflow, provided for reference - compare to usedInWorkflowVersionNums to see whether the current version of the workflow uses this function version.
        - `usedInWorkflowVersionNums` integer[], required — Version numbers of workflows that this function version is used in.
      - `displayName` string — Display name of function. Human-readable name to help you identify the function.
      - `tags` string[] — Array of tags to categorize and organize functions.
      - `audit` FunctionAudit
        - `functionCreatedBy` UserActionSummary
          - `userActionID` string, required — Unique identifier of the user action.
          - `userID` string — User's ID. Present for user-initiated actions.
          - `userEmail` string — User's email address. Present for user-initiated actions.
          - `apiKeyName` string — API key name. Present for API key-initiated actions.
          - `emailAddress` string — Email address. Present for email-initiated actions.
          - `createdAt` string, date-time, required — The date and time the action was created.
        - `functionLastUpdatedBy` UserActionSummary
          - `userActionID` string, required — Unique identifier of the user action.
          - `userID` string — User's ID. Present for user-initiated actions.
          - `userEmail` string — User's email address. Present for user-initiated actions.
          - `apiKeyName` string — API key name. Present for API key-initiated actions.
          - `emailAddress` string — Email address. Present for email-initiated actions.
          - `createdAt` string, date-time, required — The date and time the action was created.
        - `versionCreatedBy` UserActionSummary
          - `userActionID` string, required — Unique identifier of the user action.
          - `userID` string — User's ID. Present for user-initiated actions.
          - `userEmail` string — User's email address. Present for user-initiated actions.
          - `apiKeyName` string — API key name. Present for API key-initiated actions.
          - `emailAddress` string — Email address. Present for email-initiated actions.
          - `createdAt` string, date-time, required — The date and time the action was created.
      - `type` 'render', required
      - `renderConfig` RenderConfig — Per-version configuration for a Render function. Render emits a `.docx` from schema-typed JSON by composing the JSON into a `.docx` template. The template document is stored server-side; this response exposes only the contract derived from it. Schema validation runs internally in the ML service against the bundled core schema; no customer-supplied schema rides this surface.
        - `template` RenderTemplate
          - `name` string — Original filename of the uploaded template (e.g. `contract.docx`), echoed back for display. Absent on templates uploaded before the filename was captured.
          - `downloadURL` string, uri — Short-lived presigned URL to download the stored `.docx`. The private storage location is never exposed.
          - `placeholders` RenderTemplatePlaceholders — The placeholder contract a Render template declares, grouped by how each placeholder is filled. Derived from the template at create/update time by scanning its `docxtpl` tags; not user-supplied. - `stringKeys`: bare string placeholders (`{{ key }}`) filled with a single value. - `blockKeys`: wrapped-primitive placeholders (`{{p key }}`) — bind one core primitive (paragraph, table, image, or list). The placeholder's own paragraph dissolves and is replaced by the rendered subdocument's blocks, rather than substituting text inline.
            - `stringKeys` string[], required
            - `blockKeys` string[], required
          - `styleIds` string[] — Paragraph/character style IDs the uploaded template defines and the rendered output can reference. Derived from the template's `styles.xml` at create/update time.
          - `tableStyleIds` string[] — Style IDs whose type is table — the styles a `table` primitive's required `styleId` can name. Empty means the template defines no table style, so any table primitive will fail at render.
          - `listKinds` string[] — Supported list kinds (`decimal`, `bullet`) the template's `numbering.xml` defines an `abstractNum` for. Empty means the template can hold no list, so any list primitive will fail at render.

---

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