# Update Person — FogBugz

> Edits an existing person in FogBugz. See the documentation

- Key: `fogbugz-update-person`
- Type: Action (Write)
- Version: 0.0.3
- App: FogBugz (`fogbugz`) — https://pipedream.com/apps/fogbugz.md
- This page (HTML): https://pipedream.com/apps/fogbugz/actions/update-person
- Hints: destructive · open-world
- Source: https://github.com/PipedreamHQ/pipedream/blob/master/components/fogbugz/actions/update-person/update-person.mjs

## Description

Edits an existing person in FogBugz. [See the documentation](https://support.fogbugz.com/hc/en-us/articles/360011330733-FogBugz-XML-API-Editing-a-Person)

## Props

| Prop | Type | Required | Description |
|---|---|---|---|
| `ixPersonId` | `string` | Yes | The ID of the user (ixPerson) to edit. Options are loaded from the connected account. |
| `sEmail` | `string` | No | The email of the user to update. |
| `sFullName` | `string` | No | The full name of the user to update. |
| `nType` | `string` | No | default 0. Set to 0 for a normal user, 1 for an administrator, 2 for a community user, and 3 for a virtual user. |
| `sPassword` | `string` | No | Set a new password to the user. |
| `sPhone` | `string` | No | Set a new phone to the user. |
| `fDeleted` | `boolean` | No | Set fDeleted to True to mark a user as Inactive (does not delete the user, or their history). |

## 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": "fogbugz",
      },
    },
  },
)

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: "fogbugz-update-person",
  arguments: {
    ixPersonId: "User ID",
    sEmail: "Email",
  },
})
```

**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: "fogbugz-update-person",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    fogbugz: { authProvisionId: "apn_xxxxxxx" },
    ixPersonId: "User ID",
    sEmail: "Email",
  },
})

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": "fogbugz-update-person",
    "configured_props": {
      "fogbugz": { "authProvisionId": "apn_xxxxxxx" },
      "ixPersonId": "User ID",
      "sEmail": "Email"
    }
  }'
```

---

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