# Update Contact — Jobnimbus

> Updates a contact. See the documentation

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

## Description

Updates a contact. [See the documentation](https://documenter.getpostman.com/view/3919598/S11PpG4x#6c94f9a6-2bac-4189-9b2e-5d856f0fe310)

## Props

| Prop | Type | Required | Description |
|---|---|---|---|
| `contactId` | `string` | Yes | JNID of the contact. Options are loaded from the connected account. |
| `firstName` | `string` | No | The first name of the person this contact record is associated with. |
| `lastName` | `string` | No | The last name of the person this contact record is associated with. |
| `displayName` | `string` | No | The company name that this contact record is associated with. |
| `company` | `string` | No | Display name used mainly for QB syncing. |
| `number` | `string` | No | The customer defined template generated number assigned to this record, based off of the record id. |
| `isActive` | `boolean` | No | Whether this record is active(true) or deleted(false). |
| `isArchived` | `boolean` | No | Whether this record has been archived (true) or not (false). |
| `tags` | `string[]` | No | List of string tags |
| `description` | `string` | No | The description of this record. |
| `address1` | `string` | No | The line 1 portion of the physical address. |
| `address2` | `string` | No | The line 2 portion of the physical address. |
| `city` | `string` | No | The city portion of the physical address. |
| `state` | `string` | No | The state text portion of the physical address. |
| `zip` | `string` | No | The postal code portion of the physical address. |
| `country` | `string` | No | The country portion of the physical address. |
| `geoLat` | `string` | No | The latitude of geo coordinates of the address associated with this record. |
| `geoLong` | `string` | No | The longitude of geo coordinates of the address associated with this record. |
| `estimatedTime` | `integer` | No | The number of minutes this record is estimated to take to complete. |
| `isLead` | `boolean` | No | Whether this record is a lead or not. |
| `isClosed` | `boolean` | No | Whether this record is closed or not. |
| `isSubcontractor` | `boolean` | No | Whether this contact is a subcontractor or not for User. |
| `email` | `string` | No | The email address associated with the contact. |
| `homePhone` | `string` | No | The home phone number associated with this contact. |
| `mobilePhone` | `string` | No | The mobile phone number associated with this contact. |
| `workPhone` | `string` | No | The work phone number associated with this contact. |
| `faxNumber` | `string` | No | The fax number associated with this contact. |
| `website` | `string` | No | Website |
| `additionalFields` | `object` | No | Additional fields that can be added according to API docs and custom fields. |

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

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: "jobnimbus-update-contact",
  arguments: {
    contactId: "Contact ID",
    firstName: "First 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: "jobnimbus-update-contact",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    jobnimbus: { authProvisionId: "apn_xxxxxxx" },
    contactId: "Contact ID",
    firstName: "First 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": "jobnimbus-update-contact",
    "configured_props": {
      "jobnimbus": { "authProvisionId": "apn_xxxxxxx" },
      "contactId": "Contact ID",
      "firstName": "First Name"
    }
  }'
```

---

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