# /forms/{formId}/submitactions/{submitActionId}

Update the configuration of an existing submit action

# OpenAPI definition

```json
{
  "openapi": "3.0.0",
  "info": {
    "title": "Formstack API v2025.0",
    "version": "0.0.4"
  },
  "servers": [
    {
      "url": "https://www.formstack.com/api/v2025",
      "description": "Production server"
    },
    {
      "url": "https://staging-formstack.com/api/v2025",
      "description": "Staging server"
    },
    {
      "url": "https://dev-formstack.com/api/v2025",
      "description": "Development server"
    }
  ],
  "paths": {
    "/forms/{formId}/submitactions/{submitActionId}": {
      "put": {
        "tags": [
          "Submit Actions"
        ],
        "description": "Update the configuration of an existing submit action",
        "operationId": "updateSubmitAction",
        "parameters": [
          {
            "name": "formId",
            "in": "path",
            "description": "Unique identifier of the form that contains the submit action",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "submitActionId",
            "in": "path",
            "description": "Unique identifier of the submit action to update",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EditSubmitActionInputApiDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Submit action updated successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SubmitActionDetailedApiDto"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request data or validation failed"
          },
          "403": {
            "description": "Access denied - insufficient permissions"
          },
          "404": {
            "description": "Submit action or form not found"
          },
          "500": {
            "description": "Internal server error during submit action update"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "LogicDto": {
        "title": "Logic Conditions",
        "description": "Logic conditions for conditional processing",
        "properties": {
          "action": {
            "description": "Action to perform (show/hide)",
            "type": "string",
            "enum": [
              "show",
              "hide"
            ],
            "nullable": false
          },
          "conditional": {
            "description": "Conditional operator (all/any)",
            "type": "string",
            "enum": [
              "all",
              "any"
            ],
            "nullable": false
          },
          "checks": {
            "description": "Array of condition checks",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/LogicFieldCheckDto"
            },
            "nullable": false
          }
        },
        "type": "object"
      },
      "LogicFieldCheckDto": {
        "title": "Logic Check Condition",
        "description": "Single condition check for logic operations",
        "properties": {
          "field": {
            "description": "Field ID to check",
            "type": "string",
            "nullable": false
          },
          "condition": {
            "description": "Condition operator",
            "type": "string",
            "enum": [
              "equals",
              "notequals",
              "greaterthan",
              "lessthan"
            ],
            "nullable": false
          },
          "option": {
            "description": "Value to compare against",
            "type": "string",
            "nullable": false
          }
        },
        "type": "object"
      },
      "SubmitActionDetailedApiDto": {
        "title": "Submit Action Details",
        "description": "Complete details of a form submit action including configuration and logic conditions",
        "properties": {
          "id": {
            "description": "Unique identifier for the submit action",
            "type": "integer",
            "nullable": false
          },
          "name": {
            "description": "Display name for the submit action",
            "type": "string",
            "nullable": true
          },
          "type": {
            "description": "Type of action to perform after form submission: 'default' for standard processing, 'message' to display custom content, or 'redirect' to navigate to a URL",
            "type": "string",
            "enum": [
              "default",
              "message",
              "redirect"
            ],
            "nullable": false
          },
          "message": {
            "description": "HTML content to display to users when type is 'message'",
            "type": "string",
            "nullable": true
          },
          "url": {
            "description": "Target URL to redirect users to when type is 'redirect'",
            "type": "string",
            "format": "uri",
            "nullable": true
          },
          "append_data": {
            "description": "Whether to append form submission data as query parameters to the redirect URL",
            "type": "boolean",
            "nullable": true
          },
          "logic": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/LogicDto"
              }
            ],
            "nullable": true,
            "description": "Conditional logic rules that determine when this submit action should be executed based on form field values"
          }
        },
        "type": "object"
      },
      "EditSubmitActionInputApiDto": {
        "title": "Edit Submit Action",
        "description": "Request payload for updating an existing submit action",
        "properties": {
          "name": {
            "description": "Display name for the submit action",
            "type": "string",
            "nullable": true
          },
          "type": {
            "description": "Type of action to perform after form submission: 'default' for standard processing, 'message' to display custom content, or 'redirect' to navigate to a URL",
            "type": "string",
            "enum": [
              "default",
              "message",
              "redirect"
            ],
            "nullable": false
          },
          "message": {
            "description": "HTML content to display to users (required when type is 'message')",
            "type": "string",
            "nullable": true
          },
          "url": {
            "description": "Target URL to redirect users to (required when type is 'redirect')",
            "type": "string",
            "format": "uri",
            "nullable": true
          },
          "append_data": {
            "description": "Whether to append form submission data as query parameters to the redirect URL",
            "type": "boolean",
            "default": false,
            "nullable": true
          },
          "logic": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/LogicDto"
              }
            ],
            "nullable": true,
            "description": "Conditional logic rules that determine when this submit action should be executed based on form field values"
          }
        },
        "type": "object"
      }
    }
  },
  "tags": [
    {
      "name": "Submit Actions",
      "description": "Submit actions define what happens after a form is submitted—standard processing, displaying a custom message, redirecting to a URL, or running a third-party integration such as WebMerge. Use these endpoints to list a form's submit actions and to create, retrieve, update, and delete them, including the conditional logic that controls when each action runs."
    }
  ]
}
```