> ## Documentation Index
> Fetch the complete documentation index at: https://docs.leadlex.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Update Company

> Update an existing company

## Request

### Path Parameters

<ParamField path="id" type="string" required>Company ID (UUID)</ParamField>

### Body Parameters

All fields are optional. Only provided fields will be updated.

<ParamField body="name" type="string">Company name</ParamField>
<ParamField body="industry" type="string">Industry</ParamField>
<ParamField body="website" type="string">Website URL</ParamField>
<ParamField body="linkedin_url" type="string">LinkedIn URL</ParamField>
<ParamField body="size" type="string">Company size</ParamField>
<ParamField body="city" type="string">City</ParamField>
<ParamField body="country" type="string">Country</ParamField>
<ParamField body="domain" type="string">Domain</ParamField>
<ParamField body="description" type="string">Description</ParamField>
<ParamField body="tags" type="array">Tags (replaces existing)</ParamField>

### Headers

```
Authorization: Bearer wbk_your_api_key_here
Content-Type: application/json
```

## Response

<ResponseField name="data" type="object">
  Updated company object with `id`, `name`, `industry`, `updated_date`
</ResponseField>

<CodeGroup>
  ```bash cURL theme={null}
  curl -X PATCH https://data.leadlex.com/functions/v1/api-gateway/v1/companies/co-001 \
    -H "Authorization: Bearer wbk_your_api_key_here" \
    -H "Content-Type: application/json" \
    -d '{ "industry": "Legal Tech", "size": "201-500" }'
  ```

  ```python Python theme={null}
  import requests

  API_KEY = "wbk_your_api_key_here"
  BASE_URL = "https://data.leadlex.com/functions/v1/api-gateway"

  headers = {"Authorization": f"Bearer {API_KEY}", "Content-Type": "application/json"}
  response = requests.patch(f"{BASE_URL}/v1/companies/co-001", headers=headers, json={
      "industry": "Legal Tech"
  })
  print(response.json())
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch(
    'https://data.leadlex.com/functions/v1/api-gateway/v1/companies/co-001',
    {
      method: 'PATCH',
      headers: { 'Authorization': 'Bearer wbk_your_api_key_here', 'Content-Type': 'application/json' },
      body: JSON.stringify({ industry: 'Legal Tech' })
    }
  );
  const { data } = await response.json();
  ```
</CodeGroup>

## Errors

| Status | Code                       | Description                          |
| ------ | -------------------------- | ------------------------------------ |
| 404    | `not_found`                | Company not found                    |
| 403    | `insufficient_permissions` | Missing `companies:write` permission |
