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

# Update Business

> Update Business

Update Business

```http theme={null}
PUT https://services.leadconnectorhq.com/businesses/{businessId}
```

## Autorización

<ParamField header="Authorization" type="string" required>
  Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
</ParamField>

<ParamField header="Version" type="string" required default="2021-07-28">
  Versión de la API.
</ParamField>

## Path parameters

<ParamField path="businessId" type="string" required default="5DP4iH6HLkQsiKESj6rh" />

## Body

<ParamField body="name" type="string" default="Microsoft" />

<ParamField body="phone" type="string" default="+18832327657" />

<ParamField body="email" type="string" default="john@deo.com" />

<ParamField body="postalCode" type="string" default="12312312" />

<ParamField body="website" type="string" default="www.xyz.com" />

<ParamField body="address" type="string" default="street adress" />

<ParamField body="state" type="string" default="new york" />

<ParamField body="city" type="string" default="new york" />

<ParamField body="country" type="string" default="us" />

<ParamField body="description" type="string" default="business description" />

## Respuestas

<Accordion title="200 - Successful response">
  <ResponseField name="success" type="boolean" required default="True">
    Success Value
  </ResponseField>

  <ResponseField name="buiseness" type="object" required>
    Business Response
  </ResponseField>

  ```json theme={null}
  {
    "success": true
  }
  ```
</Accordion>

<Accordion title="400 - Bad Request">
  ```json theme={null}
  {}
  ```
</Accordion>

<Accordion title="401 - Unauthorized">
  ```json theme={null}
  {}
  ```
</Accordion>

<Accordion title="422 - Unprocessable Entity">
  ```json theme={null}
  {}
  ```
</Accordion>

## Ejemplo

<CodeGroup>
  ```bash cURL theme={null}
  curl -X PUT 'https://services.leadconnectorhq.com/businesses/YOUR_businessId' \
    -H 'Authorization: Bearer YOUR_TOKEN' \
    -H 'Version: 2021-07-28' \
    -H 'Content-Type: application/json' \
    -d '{
    "name": "Microsoft",
    "phone": "+18832327657",
    "email": "john@deo.com",
    "postalCode": "12312312",
    "website": "www.xyz.com",
    "address": "street adress",
    "state": "new york",
    "city": "new york",
    "country": "us",
    "description": "business description"
  }'
  ```

  ```javascript Node.js theme={null}
  const response = await fetch('https://services.leadconnectorhq.com/businesses/YOUR_businessId', {
    method: 'PUT',
    headers: {
      Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
      Version: '2021-07-28',
      'Content-Type': 'application/json',
    },
    body: JSON.stringify({"name": "Microsoft", "phone": "+18832327657", "email": "john@deo.com", "postalCode": "12312312", "website": "www.xyz.com", "address": "street adress", "state": "new york", "city": "new york", "country": "us", "description": "business description"}),
  });
  const data = await response.json();
  ```

  ```python Python theme={null}
  import os, requests
  response = requests.request(
      'PUT',
      'https://services.leadconnectorhq.com/businesses/YOUR_businessId',
      headers={
          'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
          'Version': '2021-07-28',
          'Content-Type': 'application/json',
      },
      json={"name": "Microsoft", "phone": "+18832327657", "email": "john@deo.com", "postalCode": "12312312", "website": "www.xyz.com", "address": "street adress", "state": "new york", "city": "new york", "country": "us", "description": "business description"},
  )
  data = response.json()
  ```

  ```php PHP theme={null}
  <?php
  $ch = curl_init('https://services.leadconnectorhq.com/businesses/YOUR_businessId');
  curl_setopt_array($ch, [
      CURLOPT_RETURNTRANSFER => true,
      CURLOPT_CUSTOMREQUEST => 'PUT',
      CURLOPT_HTTPHEADER => [
          'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
          'Version: 2021-07-28',
          'Content-Type: application/json',
      ],
      CURLOPT_POSTFIELDS => json_encode({'name': 'Microsoft', 'phone': '+18832327657', 'email': 'john@deo.com', 'postalCode': '12312312', 'website': 'www.xyz.com', 'address': 'street adress', 'state': 'new york', 'city': 'new york', 'country': 'us', 'description': 'business description'}),
  ]);
  $data = json_decode(curl_exec($ch), true);
  ```
</CodeGroup>
