# Update Company — Teamleader Focus

> Update a company. See the documentation

- Key: `teamleader_focus-update-company`
- Type: Action (Write)
- Version: 0.0.3
- App: Teamleader Focus (`teamleader_focus`) — https://pipedream.com/apps/teamleader-focus.md
- This page (HTML): https://pipedream.com/apps/teamleader-focus/actions/update-company
- Hints: open-world
- Source: https://github.com/PipedreamHQ/pipedream/blob/master/components/teamleader_focus/actions/update-company/update-company.mjs

## Description

Update a company. [See the documentation](https://developer.focus.teamleader.eu/docs/api/companies-update)

## Props

| Prop | Type | Required | Description |
|---|---|---|---|
| `companyId` | `string` | Yes | Identifier of a company Options are loaded from the connected account. |
| `name` | `string` | No | Name of the company |
| `email` | `string` | No | Email of the company |
| `phone` | `string` | No | Phone number of the company |
| `website` | `string` | No | Website of the company |
| `businessTypeId` | `string` | No | Business type of the company Options are loaded from the connected account. |
| `vatNumber` | `string` | No | VAT number of the company |
| `nationalIdentificationNumber` | `string` | No | National identification number of the company |
| `iban` | `string` | No | IBAN of the company |
| `bic` | `string` | No | BIC of the company |
| `language` | `string` | No | Language of the company. Example: en |
| `responsibleUserId` | `string` | No | ID of the user responsible for the company Options are loaded from the connected account. |
| `remarks` | `string` | No | Remarks about the company |
| `tags` | `string[]` | No | Tags of the company. Note: This will overwrite existing tags. |
| `marketingMailsConsent` | `boolean` | No | Whether the company has consented to receive marketing emails |
| `preferredCurrency` | `string` | No | Preferred currency of the company |

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

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

---

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