# Update Vendor — Drata

> Update a Vendor. See the documentation.

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

## Description

Update a Vendor. [See the documentation](https://developers.drata.com/docs/openapi/reference/operation/VendorsPublicController_updateVendor/).

## Props

| Prop | Type | Required | Description |
|---|---|---|---|
| `vendorId` | `integer` | Yes | The ID of the vendor. Options are loaded from the connected account. |
| `name` | `string` | Yes | The name of the vendor |
| `category` | `string` | Yes | The type of vendor |
| `risk` | `string` | Yes | The level of risk for customer data |
| `critical` | `boolean` | Yes | Is this vendor is considered critical |
| `isSubProcessor` | `boolean` | Yes | Is this vendor is considered sub-processor |
| `isSubProcessorActive` | `boolean` | Yes | Is the subprocessor active |
| `userId` | `integer` | Yes | The user ID of the person responsible for the compliance of this vendor Options are loaded from the connected account. |
| `url` | `string` | Yes | The URL of the vendor |
| `privacyUrl` | `string` | Yes | Vendor Privacy Policy URL |
| `termsUrl` | `string` | Yes | Vendor Terms of Use URL |
| `servicesProvided` | `string` | Yes | Describe vendor services |
| `dataStored` | `string` | Yes | What type of data the vendor stores |
| `location` | `string` | Yes | The vendor location |
| `hasPii` | `boolean` | Yes | Does this vendor store any type of PII |
| `passwordPolicy` | `string` | Yes | The vendor password policy |
| `passwordRequiresMinLength` | `boolean` | Yes | Is there a minimum length for user passwords |
| `passwordRequiresNumber` | `boolean` | Yes | Does a password require numbers |
| `passwordRequiresSymbol` | `boolean` | Yes | Does a password require non-alpha-numeric characters |
| `passwordMfaEnabled` | `boolean` | Yes | Is mult-factor authentication enabled for this vendor |
| `accountManagerName` | `string` | Yes | The name of the corresponding account manager for this vendor |
| `accountManagerEmail` | `string` | Yes | The email of the corresponding account manager for this vendor |
| `isComplianceReviewRequired` | `boolean` | Yes | Is vendor compliance report review required? |
| `passwordMinLength` | `integer` | No | Minimum character length for a password |
| `renewalDate` | `string` | No | Vendor renewal ISO 8601 datetime. E.g. 2021-01-01T00:00:00.000Z |
| `renewalScheduleType` | `string` | No | Vendor renewal schedule type |
| `notes` | `string` | No | Additional notes for vendor |
| `confirmed` | `boolean` | No | Is all vendor data confirmed? |

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

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: "drata-update-vendor",
  arguments: {
    vendorId: 10,
    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: "drata-update-vendor",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    drata: { authProvisionId: "apn_xxxxxxx" },
    vendorId: 10,
    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": "drata-update-vendor",
    "configured_props": {
      "drata": { "authProvisionId": "apn_xxxxxxx" },
      "vendorId": 10,
      "name": "Name"
    }
  }'
```

---

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