# Update Form — Form.io

> Update a form or resource in Form.io. Only the fields you provide are changed; omitted fields keep their current values. Use List Forms to find the form ID. The components prop is a JSON-string array of Form.io component schema objects…

- Key: `form_io-update-form`
- Type: Action (Write)
- Version: 0.0.1
- App: Form.io (`form_io`) — https://pipedream.com/apps/form-io.md
- This page (HTML): https://pipedream.com/apps/form-io/actions/update-form
- Hints: open-world
- Source: https://github.com/PipedreamHQ/pipedream/blob/master/components/form_io/actions/update-form/update-form.mjs

## Description

Update a form or resource in Form.io. Only the fields you provide are changed; omitted fields keep their current values. Use **List Forms** to find the form ID. The `components` prop is a JSON-string array of Form.io component schema objects. [See the documentation](https://apidocs.form.io/#9faa123a-3183-4513-9ae5-c64553359749).

## Props

| Prop | Type | Required | Description |
|---|---|---|---|
| `formId` | `string` | Yes | The _id of the form. Run List Forms first to obtain valid form IDs. |
| `title` | `string` | No | Updated title of the form. |
| `name` | `string` | No | Updated machine name of the form. |
| `path` | `string` | No | Updated URL path for the form. |
| `type` | `string` | No | The form type. One of form or resource. |
| `components` | `string` | No | JSON-string array of Form.io component schema objects. Example: [{"type":"textfield","key":"name","label":"Full Name","input":true}]. Parsed from a JSON string before sending. |
| `display` | `string` | No | How the form is displayed (e.g. form, wizard, pdf). |
| `tags` | `string[]` | No | Tags to associate with the form. |
| `settings` | `string` | No | JSON-string object of form settings. Example: {"theme":"default"}. |

## Run it

**MCP**

```ts
import { Client } from "@modelcontextprotocol/sdk/client/index.js"
import { StreamableHTTPClientTransport } from "@modelcontextprotocol/sdk/client/streamableHttp.js"
import { PipedreamClient } from "@pipedream/sdk"

const pd = new PipedreamClient({
  projectId: process.env.PIPEDREAM_PROJECT_ID!,
  clientId: process.env.PIPEDREAM_CLIENT_ID!,
  clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
  projectEnvironment: "production",
})

const accessToken = await pd.rawAccessToken

const transport = new StreamableHTTPClientTransport(
  new URL("https://remote.mcp.pipedream.net/v3"),
  {
    requestInit: {
      headers: {
        Authorization: `Bearer ${accessToken}`,
        "x-pd-project-id": process.env.PIPEDREAM_PROJECT_ID!,
        "x-pd-environment": "production",
        "x-pd-external-user-id": "{external_user_id}", // any stable ID for this user in your system
        "x-pd-app-slug": "form_io",
      },
    },
  },
)

const mcp = new Client({ name: "my-agent", version: "1.0.0" })
await mcp.connect(transport)

const { tools } = await mcp.listTools()

// listTools() hands your model this tool's input schema, so it can
// fill the arguments itself:
const result = await mcp.callTool({
  name: "form_io-update-form",
  arguments: {
    formId: "Form ID",
    title: "Title",
  },
})
```

**TypeScript**

```ts
import { PipedreamClient } from "@pipedream/sdk"

const pd = new PipedreamClient({
  projectId: process.env.PIPEDREAM_PROJECT_ID!,
  clientId: process.env.PIPEDREAM_CLIENT_ID!,
  clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
  projectEnvironment: "production",
})

const result = await pd.actions.run({
  id: "form_io-update-form",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    form_io: { authProvisionId: "apn_xxxxxxx" },
    formId: "Form ID",
    title: "Title",
  },
})

console.log(result)
```

**cURL**

```bash
curl -X POST https://api.pipedream.com/v1/connect/{project_id}/actions/run \
  -H "Content-Type: application/json" \
  -H "X-PD-Environment: production" \
  -H "Authorization: Bearer {access_token}" \
  -d '{
    "external_user_id": "{external_user_id}",
    "id": "form_io-update-form",
    "configured_props": {
      "form_io": { "authProvisionId": "apn_xxxxxxx" },
      "formId": "Form ID",
      "title": "Title"
    }
  }'
```

---

- App: https://pipedream.com/apps/form-io.md · All apps: https://pipedream.com/apps
