Update a Forge function (JSON Merge Patch).
PATCH/api/v1/forge-functions/{forge_function_id}forge:deploy
Changes the display name, description, timeout, memory and environment (env_config; null empties it). A timeout, memory or environment change re-deploys the active version after the change is saved, since the function reads them when deployed. Limits are clamped to the server's maximums. Needs Edit Forge Functions, and Provision Forge Versions and Deploy Forge Function Versions when the change re-deploys an active version; is refused to external users, and is unavailable while Forge publishing is off.
| Scope | forge:deploy (sensitive) |
| Asynchronous | No |
| MCP tool | update_forge_function |
| Portal permissions | edit_forge_functions |
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
forge_function_id | path | string | Required | |
Docwize-Version | header | string (date) | Optional | |
If-Match | header | string | Optional |
Request body
| Content type | Type |
|---|---|
application/json | ForgeFunctionPatchInput |
application/merge-patch+json | ForgeFunctionPatchInput |
Responses
| Status | Description | Body |
|---|---|---|
200 | Success. | application/json ForgeFunction or object |
400 | invalid_version, malformed_json | application/problem+json Problem |
401 | token_expired, unauthenticated | application/problem+json Problem |
403 | forbidden, insufficient_scope, token_owner_inactive | application/problem+json Problem |
404 | not_found | application/problem+json Problem |
405 | method_not_allowed | application/problem+json Problem |
406 | not_acceptable | application/problem+json Problem |
409 | conflict | application/problem+json Problem |
412 | precondition_failed | application/problem+json Problem |
413 | payload_too_large | application/problem+json Problem |
415 | unsupported_media_type | application/problem+json Problem |
421 | wrong_region | application/problem+json Problem |
422 | validation_failed | application/problem+json Problem |
500 | internal_error | application/problem+json Problem |
503 | tenant_unavailable, unavailable | application/problem+json Problem |
504 | timeout | application/problem+json Problem |
Errors
The problem codes this operation can answer with. Each code links to its page.
Schemas
ForgeConfigKey
| Field | Type | Required | Description |
|---|---|---|---|
default | string or null | Required | |
description | string or null | Required | |
is_required | boolean | Required | |
is_secret | boolean | Required | A secret key holds a keystore secret's name, never a value. |
key | string | Required |
ForgeConfigKeyInput
| Field | Type | Required | Description |
|---|---|---|---|
default | string or null | Optional | |
description | string or null | Optional | |
is_required | boolean | Optional | |
is_secret | boolean | Optional | A secret key holds a keystore secret's name, never a value. |
key | string | Optional |
ForgeFunction
| Field | Type | Required | Description |
|---|---|---|---|
active_version_number | integer or null | Required | The number of the version that runs. |
archived | boolean | Required | |
artifacts_enabled | boolean | Required | |
config_keys | array of ForgeConfigKey | Required | The settings a workflow step using the function asks for. |
created_at | string (date-time) or null | Required | |
default_mode | string | Required | |
description | string or null | Required | |
display_name | string | Required | |
document_context | array of string | Required | The optional document blocks the active version asked for (tags, folders, locations, review, collected_files). |
entrypoint | array of string | Required | Container packaging: the command the shim runs inside the image. |
env_config | object | Required | The function's environment variables, as an opaque forge_env_config document (format_version 1). |
forge_function_id | string | Required | |
forge_function_version_id | string or null | Required | The version that runs; null when none is active. |
handler | string or null | Required | Zip packaging: the code's entry point. |
invocations_30_days | integer | Required | Runs dispatched in the last 30 days. ≥ -2147483648; ≤ 2147483647 |
last_invoked_at | string (date-time) or null | Required | |
latest_version_status | string or null | Required | The provisioning state of the newest version, so a list shows one that is still deploying. |
max_artifacts | integer | Required | ≥ -2147483648; ≤ 2147483647 |
memory_mb | integer | Required | ≥ -2147483648; ≤ 2147483647 |
name | string | Required | |
output_schema | object or null | Required | The JSON Schema of the function's output (format forge_output_schema); null when it declares none. |
packaging | string | Required | |
registry_repository_uri | string or null | Required | Container packaging: where the image is pushed; null until the Portal made the repository. |
routes | array of ForgeRoute | Required | The handles a workflow edge leaves the function's step by. |
runtime | string | Required | |
timeout_seconds | integer | Required | ≥ -2147483648; ≤ 2147483647 |
ForgeFunctionPatchInput
| Field | Type | Required | Description |
|---|---|---|---|
active_version_number | integer or null | Optional | |
archived | boolean or null | Optional | |
artifacts_enabled | boolean or null | Optional | |
config_keys | array of ForgeConfigKeyInput or null | Optional | |
created_at | string (date-time) or null | Optional | |
default_mode | string or null | Optional | |
description | string or null | Optional | |
display_name | string or null | Optional | |
document_context | array of string or null | Optional | |
entrypoint | array of string or null | Optional | |
env_config | object or null | Optional | The environment variables, as an opaque forge_env_config document (format_version 1). |
forge_function_id | string or null | Optional | |
forge_function_version_id | string or null | Optional | |
handler | string or null | Optional | |
invocations_30_days | integer or null | Optional | |
last_invoked_at | string (date-time) or null | Optional | |
latest_version_status | string or null | Optional | |
max_artifacts | integer or null | Optional | |
memory_mb | integer or null | Optional | |
name | string or null | Optional | |
output_schema | object or null | Optional | |
packaging | string or null | Optional | |
registry_repository_uri | string or null | Optional | |
routes | array of ForgeRouteInput or null | Optional | |
runtime | string or null | Optional | |
timeout_seconds | integer or null | Optional |
ForgeRoute
| Field | Type | Required | Description |
|---|---|---|---|
description | string or null | Required | |
handle | string | Required | |
label | string | Required |
ForgeRouteInput
| Field | Type | Required | Description |
|---|---|---|---|
description | string or null | Optional | |
handle | string | Optional | |
label | string | Optional |