# Update Member — INDIEFUNNELS

> Updates a Member specified by ID. See the documentation

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

## Description

Updates a Member specified by ID. [See the documentation](https://websitebuilder.docs.apiary.io/#reference/members/single-member/update-member)

## Props

| Prop | Type | Required | Description |
|---|---|---|---|
| `memberId` | `string` | Yes | The ID of the member to update Options are loaded from the connected account. |
| `name` | `string` | No | The name of the member |
| `groups` | `string[]` | No | Member group ID(s) to which the member belongs Options are loaded from the connected account. |
| `approved` | `boolean` | No | Member approval status |
| `contactId` | `string` | No | Contact ID of the member Options are loaded from the connected account. |
| `billingPhone` | `string` | No | Billing address phone number |
| `billingCompanyName` | `string` | No | Billing address company name |
| `billingCompanyId` | `string` | No | Billing address company ID |
| `billingCountry` | `string` | No | Billing address country. 2-letter ISO 3166 code |
| `billingState` | `string` | No | Billing address state |
| `billingCity` | `string` | No | Billing address city |
| `billingZipCode` | `string` | No | Billing address zip code |
| `billingAddress` | `string` | No | Billing address line 1 |
| `billingAddress2` | `string` | No | Billing address line 2 |
| `shippingPhone` | `string` | No | Shipping address phone number |
| `shippingCompanyName` | `string` | No | Shipping address company name |
| `shippingCompanyId` | `string` | No | Shipping address company ID |
| `shippingCountry` | `string` | No | Shipping address country. 2-letter ISO 3166 code |
| `shippingState` | `string` | No | Shipping address state |
| `shippingCity` | `string` | No | Shipping address city |
| `shippingZipCode` | `string` | No | Shipping address zip code |
| `shippingAddress` | `string` | No | Shipping address line 1 |
| `shippingAddress2` | `string` | No | Shipping address line 2 |

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

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: "indiefunnels-update-member",
  arguments: {
    memberId: "Member ID",
    name: "Name",
  },
})
```

**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: "indiefunnels-update-member",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    indiefunnels: { authProvisionId: "apn_xxxxxxx" },
    memberId: "Member ID",
    name: "Name",
  },
})

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": "indiefunnels-update-member",
    "configured_props": {
      "indiefunnels": { "authProvisionId": "apn_xxxxxxx" },
      "memberId": "Member ID",
      "name": "Name"
    }
  }'
```

---

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