Update Company
curl --request PUT \
--url https://api.example.com/companies/{id} \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"slug": "<string>",
"industry": "<string>",
"country": "<string>",
"timezone": "<string>",
"currency": "<string>",
"registration_number": "<string>",
"tax_id": "<string>",
"address": "<string>",
"phone": "<string>",
"logo_url": "<string>",
"status": "<string>"
}
'import requests
url = "https://api.example.com/companies/{id}"
payload = {
"name": "<string>",
"slug": "<string>",
"industry": "<string>",
"country": "<string>",
"timezone": "<string>",
"currency": "<string>",
"registration_number": "<string>",
"tax_id": "<string>",
"address": "<string>",
"phone": "<string>",
"logo_url": "<string>",
"status": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
slug: '<string>',
industry: '<string>',
country: '<string>',
timezone: '<string>',
currency: '<string>',
registration_number: '<string>',
tax_id: '<string>',
address: '<string>',
phone: '<string>',
logo_url: '<string>',
status: '<string>'
})
};
fetch('https://api.example.com/companies/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/companies/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'slug' => '<string>',
'industry' => '<string>',
'country' => '<string>',
'timezone' => '<string>',
'currency' => '<string>',
'registration_number' => '<string>',
'tax_id' => '<string>',
'address' => '<string>',
'phone' => '<string>',
'logo_url' => '<string>',
'status' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/companies/{id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"slug\": \"<string>\",\n \"industry\": \"<string>\",\n \"country\": \"<string>\",\n \"timezone\": \"<string>\",\n \"currency\": \"<string>\",\n \"registration_number\": \"<string>\",\n \"tax_id\": \"<string>\",\n \"address\": \"<string>\",\n \"phone\": \"<string>\",\n \"logo_url\": \"<string>\",\n \"status\": \"<string>\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.example.com/companies/{id}")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"slug\": \"<string>\",\n \"industry\": \"<string>\",\n \"country\": \"<string>\",\n \"timezone\": \"<string>\",\n \"currency\": \"<string>\",\n \"registration_number\": \"<string>\",\n \"tax_id\": \"<string>\",\n \"address\": \"<string>\",\n \"phone\": \"<string>\",\n \"logo_url\": \"<string>\",\n \"status\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/companies/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"slug\": \"<string>\",\n \"industry\": \"<string>\",\n \"country\": \"<string>\",\n \"timezone\": \"<string>\",\n \"currency\": \"<string>\",\n \"registration_number\": \"<string>\",\n \"tax_id\": \"<string>\",\n \"address\": \"<string>\",\n \"phone\": \"<string>\",\n \"logo_url\": \"<string>\",\n \"status\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"data.id": "<string>",
"data.name": "<string>",
"data.slug": "<string>",
"data.industry": "<string>",
"data.country": "<string>",
"data.timezone": "<string>",
"data.currency": "<string>",
"data.registration_number": "<string>",
"data.tax_id": "<string>",
"data.address": "<string>",
"data.phone": "<string>",
"data.logo_url": "<string>",
"data.status": "<string>",
"data.settings": {},
"data.created_at": "<string>",
"data.updated_at": "<string>"
}
}Companies
Update Company
PUT
/
companies
/
{id}
Update Company
curl --request PUT \
--url https://api.example.com/companies/{id} \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"slug": "<string>",
"industry": "<string>",
"country": "<string>",
"timezone": "<string>",
"currency": "<string>",
"registration_number": "<string>",
"tax_id": "<string>",
"address": "<string>",
"phone": "<string>",
"logo_url": "<string>",
"status": "<string>"
}
'import requests
url = "https://api.example.com/companies/{id}"
payload = {
"name": "<string>",
"slug": "<string>",
"industry": "<string>",
"country": "<string>",
"timezone": "<string>",
"currency": "<string>",
"registration_number": "<string>",
"tax_id": "<string>",
"address": "<string>",
"phone": "<string>",
"logo_url": "<string>",
"status": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
slug: '<string>',
industry: '<string>',
country: '<string>',
timezone: '<string>',
currency: '<string>',
registration_number: '<string>',
tax_id: '<string>',
address: '<string>',
phone: '<string>',
logo_url: '<string>',
status: '<string>'
})
};
fetch('https://api.example.com/companies/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/companies/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'slug' => '<string>',
'industry' => '<string>',
'country' => '<string>',
'timezone' => '<string>',
'currency' => '<string>',
'registration_number' => '<string>',
'tax_id' => '<string>',
'address' => '<string>',
'phone' => '<string>',
'logo_url' => '<string>',
'status' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/companies/{id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"slug\": \"<string>\",\n \"industry\": \"<string>\",\n \"country\": \"<string>\",\n \"timezone\": \"<string>\",\n \"currency\": \"<string>\",\n \"registration_number\": \"<string>\",\n \"tax_id\": \"<string>\",\n \"address\": \"<string>\",\n \"phone\": \"<string>\",\n \"logo_url\": \"<string>\",\n \"status\": \"<string>\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.example.com/companies/{id}")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"slug\": \"<string>\",\n \"industry\": \"<string>\",\n \"country\": \"<string>\",\n \"timezone\": \"<string>\",\n \"currency\": \"<string>\",\n \"registration_number\": \"<string>\",\n \"tax_id\": \"<string>\",\n \"address\": \"<string>\",\n \"phone\": \"<string>\",\n \"logo_url\": \"<string>\",\n \"status\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/companies/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"slug\": \"<string>\",\n \"industry\": \"<string>\",\n \"country\": \"<string>\",\n \"timezone\": \"<string>\",\n \"currency\": \"<string>\",\n \"registration_number\": \"<string>\",\n \"tax_id\": \"<string>\",\n \"address\": \"<string>\",\n \"phone\": \"<string>\",\n \"logo_url\": \"<string>\",\n \"status\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"data.id": "<string>",
"data.name": "<string>",
"data.slug": "<string>",
"data.industry": "<string>",
"data.country": "<string>",
"data.timezone": "<string>",
"data.currency": "<string>",
"data.registration_number": "<string>",
"data.tax_id": "<string>",
"data.address": "<string>",
"data.phone": "<string>",
"data.logo_url": "<string>",
"data.status": "<string>",
"data.settings": {},
"data.created_at": "<string>",
"data.updated_at": "<string>"
}
}Update an existing company’s information. Supports both PUT and PATCH methods. All fields are optional.
Path Parameters
string
required
Company UUID
Request Body
All fields are optional. Only include fields you want to update.string
Company name (2-255 characters)
string
Unique company identifier (2-255 characters)
string
Industry sector (max 100 characters)
string
Country location (max 100 characters)
string
Timezone identifier (max 50 characters)
string
Currency code (max 10 characters)
string
Business registration number (max 100 characters)
string
Tax identification number (max 100 characters)
string
Physical address
string
Contact phone number (max 100 characters)
string
URL to company logo
string
Company status. One of:
active, suspended, inactiveResponse
boolean
Indicates if the request was successful
object
The updated company object
string
Company UUID
string
Company name
string
Company slug identifier
string
Industry sector
string
Country location
string
Timezone identifier
string
Currency code
string
Registration number
string
Tax identification
string
Physical address
string
Contact phone
string
Logo URL
string
Company status
object
Company settings (JSON)
string
Creation timestamp (ISO 8601)
string
Last update timestamp (ISO 8601)
Request Examples
- PUT
- PATCH
- Update Multiple Fields
cURL
curl -X PUT https://api.companyflow.com/companies/123e4567-e89b-12d3-a456-426614174000 \
-H "Authorization: Bearer YOUR_JWT_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "Acme Corporation Ltd",
"industry": "Technology & Software",
"phone": "+1-555-0199"
}'
cURL
curl -X PATCH https://api.companyflow.com/companies/123e4567-e89b-12d3-a456-426614174000 \
-H "Authorization: Bearer YOUR_JWT_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"status": "suspended"
}'
cURL
curl -X PUT https://api.companyflow.com/companies/123e4567-e89b-12d3-a456-426614174000 \
-H "Authorization: Bearer YOUR_JWT_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "Acme Global Corporation",
"address": "456 New Address, New York, NY 10002",
"phone": "+1-555-0200",
"logo_url": "https://cdn.example.com/new-logo.png",
"timezone": "America/Los_Angeles"
}'
Response Example
200 OK
{
"success": true,
"data": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"name": "Acme Corporation Ltd",
"slug": "acme-corp",
"industry": "Technology & Software",
"country": "United States",
"timezone": "America/New_York",
"currency": "USD",
"registration_number": "123456789",
"tax_id": "98-7654321",
"address": "123 Main St, New York, NY 10001",
"phone": "+1-555-0199",
"logo_url": "https://example.com/logo.png",
"status": "active",
"settings": null,
"created_at": "2026-03-03T10:00:00Z",
"updated_at": "2026-03-03T14:30:00Z"
}
}
400 Bad Request
{
"success": false,
"message": "invalid company id"
}
400 Validation Error
{
"success": false,
"message": "invalid request body"
}
500 Internal Server Error
{
"success": false,
"message": "internal server error"
}
Error Responses
| Status Code | Description |
|---|---|
| 400 | Invalid company ID format or invalid request body |
| 500 | Internal server error |