> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.itspropel.com/llms.txt.
> For full documentation content, see https://docs.itspropel.com/llms-full.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.itspropel.com/_mcp/server.

# Update

PATCH https://companies/%7Bcompany_id%7D
Content-Type: multipart/form-data

# Create Tenant Endpoint

This endpoint allows users to create a new tenant. Upon successful creation of a tenant, several related endpoints for managing locations under that tenant are available.

## Related Endpoints

Once a tenant is created, the following endpoints can be utilized to manage locations associated with that tenant:

1. **List Locations**
    - **GET** `{{url}}/tenants/{tenant_id}/locations`
    - Description: Retrieves a list of all locations associated with the specified tenant.
2. **Create Location**
    - **POST** `{{url}}/tenants/{tenant_id}/locations`
    - Description: Creates a new location for the specified tenant.
3. **Get Single Location**
    - **GET** `{{url}}/tenants/{tenant_id}/locations/{id}`
    - Description: Retrieves details of a specific location associated with the specified tenant.
4. **Update Location**
    - **PUT** `{{url}}/tenants/{tenant_id}/locations/{id}`
    - Description: Updates the details of a specific location associated with the specified tenant.
5. **Delete Location**
    - **DELETE** `{{url}}/tenants/{tenant_id}/locations/{id}`
    - Description: Deletes a specific location associated with the specified tenant.

## Request Body

The request body for creating a tenant should include the necessary parameters to define the tenant's details.

## Response

Upon successful creation of a tenant, the response will confirm the creation and may include details of the newly created tenant.

This endpoint is essential for setting up a new tenant and managing its locations effectively.

Reference: https://docs.itspropel.com/propel-biz/03-company/03-company-crud/update

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: PropelBiz
  version: 1.0.0
paths:
  /companies/%7Bcompany_id%7D:
    patch:
      operationId: update
      summary: Update
      description: >-
        # Create Tenant Endpoint


        This endpoint allows users to create a new tenant. Upon successful
        creation of a tenant, several related endpoints for managing locations
        under that tenant are available.


        ## Related Endpoints


        Once a tenant is created, the following endpoints can be utilized to
        manage locations associated with that tenant:


        1. **List Locations**
            - **GET** `{{url}}/tenants/{tenant_id}/locations`
            - Description: Retrieves a list of all locations associated with the specified tenant.
        2. **Create Location**
            - **POST** `{{url}}/tenants/{tenant_id}/locations`
            - Description: Creates a new location for the specified tenant.
        3. **Get Single Location**
            - **GET** `{{url}}/tenants/{tenant_id}/locations/{id}`
            - Description: Retrieves details of a specific location associated with the specified tenant.
        4. **Update Location**
            - **PUT** `{{url}}/tenants/{tenant_id}/locations/{id}`
            - Description: Updates the details of a specific location associated with the specified tenant.
        5. **Delete Location**
            - **DELETE** `{{url}}/tenants/{tenant_id}/locations/{id}`
            - Description: Deletes a specific location associated with the specified tenant.

        ## Request Body


        The request body for creating a tenant should include the necessary
        parameters to define the tenant's details.


        ## Response


        Upon successful creation of a tenant, the response will confirm the
        creation and may include details of the newly created tenant.


        This endpoint is essential for setting up a new tenant and managing its
        locations effectively.
      tags:
        - subpackage_03Company.subpackage_03Company/03CompanyCrud
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/03 Company_03 Company >
                  CRUD_Update_Response_200
      requestBody:
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                city:
                  type: string
                  description: 'Optional: City'
                name:
                  type: string
                  description: 'Required: Name of the company'
                phone:
                  type: string
                  description: 'Optional: Phone'
                state:
                  type: string
                  description: 'Optional: State'
                website:
                  type: string
                  description: 'Optional: Website'
                zipcode:
                  type: string
                  description: 'Optional: Zipcode'
                address1:
                  type: string
                  description: 'Optional: Address 1'
                address2:
                  type: string
                  description: 'Optional: Address 2'
                timezone:
                  type: string
                  description: >-
                    Optional: IANA timezone name (e.g. America/New_York,
                    Europe/London). Drives business-hours-aware behavior — e.g.
                    Communications inbound-callback routing reads
                    location.timezone first, then falls back to tenant.timezone,
                    then config('app.timezone'). Validates against PHP
                    timezone:all rule.
                description:
                  type: string
                  description: 'Optional: Description'
                for_testing:
                  type: string
                  description: 'Optional: Default is true'
              required:
                - city
                - name
                - phone
                - state
                - website
                - zipcode
                - address1
                - address2
                - timezone
                - description
                - for_testing
servers:
  - url: https:/
components:
  schemas:
    03 Company_03 Company > CRUD_Update_Response_200:
      type: object
      properties: {}
      description: Empty response body
      title: 03 Company_03 Company > CRUD_Update_Response_200

```

## SDK Code Examples

```python
import requests

url = "https://https/companies/%7Bcompany_id%7D"

payload = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"city\"\r\n\r\nSan Francisco\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"name\"\r\n\r\nAcme Corporation\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"phone\"\r\n\r\n+1-415-555-2671\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"state\"\r\n\r\nCA\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"website\"\r\n\r\nhttps://www.acmecorp.com\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"zipcode\"\r\n\r\n94105\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"address1\"\r\n\r\n123 Market St\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"address2\"\r\n\r\nSuite 400\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"timezone\"\r\n\r\nAmerica/Los_Angeles\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"description\"\r\n\r\nLeading provider of business solutions.\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"for_testing\"\r\n\r\ntrue\r\n-----011000010111000001101001--\r\n"
headers = {"Content-Type": "multipart/form-data; boundary=---011000010111000001101001"}

response = requests.patch(url, data=payload, headers=headers)

print(response.json())
```

```javascript
const url = 'https://https/companies/%7Bcompany_id%7D';
const form = new FormData();
form.append('city', 'San Francisco');
form.append('name', 'Acme Corporation');
form.append('phone', '+1-415-555-2671');
form.append('state', 'CA');
form.append('website', 'https://www.acmecorp.com');
form.append('zipcode', '94105');
form.append('address1', '123 Market St');
form.append('address2', 'Suite 400');
form.append('timezone', 'America/Los_Angeles');
form.append('description', 'Leading provider of business solutions.');
form.append('for_testing', 'true');

const options = {method: 'PATCH'};

options.body = form;

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://https/companies/%7Bcompany_id%7D"

	payload := strings.NewReader("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"city\"\r\n\r\nSan Francisco\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"name\"\r\n\r\nAcme Corporation\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"phone\"\r\n\r\n+1-415-555-2671\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"state\"\r\n\r\nCA\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"website\"\r\n\r\nhttps://www.acmecorp.com\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"zipcode\"\r\n\r\n94105\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"address1\"\r\n\r\n123 Market St\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"address2\"\r\n\r\nSuite 400\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"timezone\"\r\n\r\nAmerica/Los_Angeles\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"description\"\r\n\r\nLeading provider of business solutions.\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"for_testing\"\r\n\r\ntrue\r\n-----011000010111000001101001--\r\n")

	req, _ := http.NewRequest("PATCH", url, payload)

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://https/companies/%7Bcompany_id%7D")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Patch.new(url)
request.body = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"city\"\r\n\r\nSan Francisco\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"name\"\r\n\r\nAcme Corporation\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"phone\"\r\n\r\n+1-415-555-2671\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"state\"\r\n\r\nCA\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"website\"\r\n\r\nhttps://www.acmecorp.com\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"zipcode\"\r\n\r\n94105\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"address1\"\r\n\r\n123 Market St\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"address2\"\r\n\r\nSuite 400\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"timezone\"\r\n\r\nAmerica/Los_Angeles\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"description\"\r\n\r\nLeading provider of business solutions.\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"for_testing\"\r\n\r\ntrue\r\n-----011000010111000001101001--\r\n"

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.patch("https://https/companies/%7Bcompany_id%7D")
  .body("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"city\"\r\n\r\nSan Francisco\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"name\"\r\n\r\nAcme Corporation\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"phone\"\r\n\r\n+1-415-555-2671\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"state\"\r\n\r\nCA\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"website\"\r\n\r\nhttps://www.acmecorp.com\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"zipcode\"\r\n\r\n94105\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"address1\"\r\n\r\n123 Market St\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"address2\"\r\n\r\nSuite 400\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"timezone\"\r\n\r\nAmerica/Los_Angeles\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"description\"\r\n\r\nLeading provider of business solutions.\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"for_testing\"\r\n\r\ntrue\r\n-----011000010111000001101001--\r\n")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('PATCH', 'https://https/companies/%7Bcompany_id%7D', [
  'multipart' => [
    [
        'name' => 'city',
        'contents' => 'San Francisco'
    ],
    [
        'name' => 'name',
        'contents' => 'Acme Corporation'
    ],
    [
        'name' => 'phone',
        'contents' => '+1-415-555-2671'
    ],
    [
        'name' => 'state',
        'contents' => 'CA'
    ],
    [
        'name' => 'website',
        'contents' => 'https://www.acmecorp.com'
    ],
    [
        'name' => 'zipcode',
        'contents' => '94105'
    ],
    [
        'name' => 'address1',
        'contents' => '123 Market St'
    ],
    [
        'name' => 'address2',
        'contents' => 'Suite 400'
    ],
    [
        'name' => 'timezone',
        'contents' => 'America/Los_Angeles'
    ],
    [
        'name' => 'description',
        'contents' => 'Leading provider of business solutions.'
    ],
    [
        'name' => 'for_testing',
        'contents' => 'true'
    ]
  ]
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://https/companies/%7Bcompany_id%7D");
var request = new RestRequest(Method.PATCH);
request.AddParameter("undefined", "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"city\"\r\n\r\nSan Francisco\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"name\"\r\n\r\nAcme Corporation\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"phone\"\r\n\r\n+1-415-555-2671\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"state\"\r\n\r\nCA\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"website\"\r\n\r\nhttps://www.acmecorp.com\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"zipcode\"\r\n\r\n94105\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"address1\"\r\n\r\n123 Market St\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"address2\"\r\n\r\nSuite 400\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"timezone\"\r\n\r\nAmerica/Los_Angeles\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"description\"\r\n\r\nLeading provider of business solutions.\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"for_testing\"\r\n\r\ntrue\r\n-----011000010111000001101001--\r\n", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation
let parameters = [
  [
    "name": "city",
    "value": "San Francisco"
  ],
  [
    "name": "name",
    "value": "Acme Corporation"
  ],
  [
    "name": "phone",
    "value": "+1-415-555-2671"
  ],
  [
    "name": "state",
    "value": "CA"
  ],
  [
    "name": "website",
    "value": "https://www.acmecorp.com"
  ],
  [
    "name": "zipcode",
    "value": "94105"
  ],
  [
    "name": "address1",
    "value": "123 Market St"
  ],
  [
    "name": "address2",
    "value": "Suite 400"
  ],
  [
    "name": "timezone",
    "value": "America/Los_Angeles"
  ],
  [
    "name": "description",
    "value": "Leading provider of business solutions."
  ],
  [
    "name": "for_testing",
    "value": "true"
  ]
]

let boundary = "---011000010111000001101001"

var body = ""
var error: NSError? = nil
for param in parameters {
  let paramName = param["name"]!
  body += "--\(boundary)\r\n"
  body += "Content-Disposition:form-data; name=\"\(paramName)\""
  if let filename = param["fileName"] {
    let contentType = param["content-type"]!
    let fileContent = String(contentsOfFile: filename, encoding: String.Encoding.utf8)
    if (error != nil) {
      print(error as Any)
    }
    body += "; filename=\"\(filename)\"\r\n"
    body += "Content-Type: \(contentType)\r\n\r\n"
    body += fileContent
  } else if let paramValue = param["value"] {
    body += "\r\n\r\n\(paramValue)"
  }
}

let request = NSMutableURLRequest(url: NSURL(string: "https://https/companies/%7Bcompany_id%7D")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PATCH"
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```