Update a company
curl --request PUT \
--url https://app.leonar.app/api/v1/companies/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"domain": "<string>",
"industry": "<string>",
"company_size": "<string>",
"description": "<string>",
"location": "<string>",
"logo_url": "<string>",
"phone": "<string>",
"linkedin_url": "<string>",
"annual_revenue": 123,
"owner_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"custom_data": {}
}
'import requests
url = "https://app.leonar.app/api/v1/companies/{id}"
payload = {
"name": "<string>",
"domain": "<string>",
"industry": "<string>",
"company_size": "<string>",
"description": "<string>",
"location": "<string>",
"logo_url": "<string>",
"phone": "<string>",
"linkedin_url": "<string>",
"annual_revenue": 123,
"owner_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"custom_data": {}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
domain: '<string>',
industry: '<string>',
company_size: '<string>',
description: '<string>',
location: '<string>',
logo_url: '<string>',
phone: '<string>',
linkedin_url: '<string>',
annual_revenue: 123,
owner_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
status_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
custom_data: {}
})
};
fetch('https://app.leonar.app/api/v1/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://app.leonar.app/api/v1/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>',
'domain' => '<string>',
'industry' => '<string>',
'company_size' => '<string>',
'description' => '<string>',
'location' => '<string>',
'logo_url' => '<string>',
'phone' => '<string>',
'linkedin_url' => '<string>',
'annual_revenue' => 123,
'owner_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'status_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'custom_data' => [
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://app.leonar.app/api/v1/companies/{id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"domain\": \"<string>\",\n \"industry\": \"<string>\",\n \"company_size\": \"<string>\",\n \"description\": \"<string>\",\n \"location\": \"<string>\",\n \"logo_url\": \"<string>\",\n \"phone\": \"<string>\",\n \"linkedin_url\": \"<string>\",\n \"annual_revenue\": 123,\n \"owner_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"status_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"custom_data\": {}\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://app.leonar.app/api/v1/companies/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"domain\": \"<string>\",\n \"industry\": \"<string>\",\n \"company_size\": \"<string>\",\n \"description\": \"<string>\",\n \"location\": \"<string>\",\n \"logo_url\": \"<string>\",\n \"phone\": \"<string>\",\n \"linkedin_url\": \"<string>\",\n \"annual_revenue\": 123,\n \"owner_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"status_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"custom_data\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.leonar.app/api/v1/companies/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"domain\": \"<string>\",\n \"industry\": \"<string>\",\n \"company_size\": \"<string>\",\n \"description\": \"<string>\",\n \"location\": \"<string>\",\n \"logo_url\": \"<string>\",\n \"phone\": \"<string>\",\n \"linkedin_url\": \"<string>\",\n \"annual_revenue\": 123,\n \"owner_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"status_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"custom_data\": {}\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "b2c3d4e5-6789-01ab-cdef-234567890abc",
"name": "Doctolib",
"domain": "doctolib.com",
"industry": "Health Tech",
"company_size": "1001-5000",
"description": null,
"location": "Paris, France",
"logo_url": "https://logo.clearbit.com/doctolib.com",
"phone": null,
"linkedin_url": "https://www.linkedin.com/company/doctolib",
"annual_revenue": null,
"owner_id": null,
"status_id": "550e8400-e29b-41d4-a716-446655440000",
"status": {
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "Customer",
"color": "#22c55e",
"position": 1,
"is_default": false
},
"custom_data": {
"crm_tier": "enterprise"
},
"created_at": "2025-01-10T08:00:00Z",
"updated_at": "2025-01-20T14:00:00Z",
"archived_at": null
}
}{
"error": {
"code": "validation_error",
"message": "Invalid input"
}
}{
"error": {
"code": "invalid_api_key",
"message": "Invalid API key"
}
}{
"error": {
"code": "not_found",
"message": "Resource not found"
}
}Companies
Update a company
Updates an existing company.
custom_data uses partial merge semantics:
- sent keys are upserted
- keys set to
nullare removed - omitted keys are preserved
PUT
/
companies
/
{id}
Update a company
curl --request PUT \
--url https://app.leonar.app/api/v1/companies/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"domain": "<string>",
"industry": "<string>",
"company_size": "<string>",
"description": "<string>",
"location": "<string>",
"logo_url": "<string>",
"phone": "<string>",
"linkedin_url": "<string>",
"annual_revenue": 123,
"owner_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"custom_data": {}
}
'import requests
url = "https://app.leonar.app/api/v1/companies/{id}"
payload = {
"name": "<string>",
"domain": "<string>",
"industry": "<string>",
"company_size": "<string>",
"description": "<string>",
"location": "<string>",
"logo_url": "<string>",
"phone": "<string>",
"linkedin_url": "<string>",
"annual_revenue": 123,
"owner_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"custom_data": {}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
domain: '<string>',
industry: '<string>',
company_size: '<string>',
description: '<string>',
location: '<string>',
logo_url: '<string>',
phone: '<string>',
linkedin_url: '<string>',
annual_revenue: 123,
owner_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
status_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
custom_data: {}
})
};
fetch('https://app.leonar.app/api/v1/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://app.leonar.app/api/v1/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>',
'domain' => '<string>',
'industry' => '<string>',
'company_size' => '<string>',
'description' => '<string>',
'location' => '<string>',
'logo_url' => '<string>',
'phone' => '<string>',
'linkedin_url' => '<string>',
'annual_revenue' => 123,
'owner_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'status_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'custom_data' => [
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://app.leonar.app/api/v1/companies/{id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"domain\": \"<string>\",\n \"industry\": \"<string>\",\n \"company_size\": \"<string>\",\n \"description\": \"<string>\",\n \"location\": \"<string>\",\n \"logo_url\": \"<string>\",\n \"phone\": \"<string>\",\n \"linkedin_url\": \"<string>\",\n \"annual_revenue\": 123,\n \"owner_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"status_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"custom_data\": {}\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://app.leonar.app/api/v1/companies/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"domain\": \"<string>\",\n \"industry\": \"<string>\",\n \"company_size\": \"<string>\",\n \"description\": \"<string>\",\n \"location\": \"<string>\",\n \"logo_url\": \"<string>\",\n \"phone\": \"<string>\",\n \"linkedin_url\": \"<string>\",\n \"annual_revenue\": 123,\n \"owner_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"status_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"custom_data\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.leonar.app/api/v1/companies/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"domain\": \"<string>\",\n \"industry\": \"<string>\",\n \"company_size\": \"<string>\",\n \"description\": \"<string>\",\n \"location\": \"<string>\",\n \"logo_url\": \"<string>\",\n \"phone\": \"<string>\",\n \"linkedin_url\": \"<string>\",\n \"annual_revenue\": 123,\n \"owner_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"status_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"custom_data\": {}\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "b2c3d4e5-6789-01ab-cdef-234567890abc",
"name": "Doctolib",
"domain": "doctolib.com",
"industry": "Health Tech",
"company_size": "1001-5000",
"description": null,
"location": "Paris, France",
"logo_url": "https://logo.clearbit.com/doctolib.com",
"phone": null,
"linkedin_url": "https://www.linkedin.com/company/doctolib",
"annual_revenue": null,
"owner_id": null,
"status_id": "550e8400-e29b-41d4-a716-446655440000",
"status": {
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "Customer",
"color": "#22c55e",
"position": 1,
"is_default": false
},
"custom_data": {
"crm_tier": "enterprise"
},
"created_at": "2025-01-10T08:00:00Z",
"updated_at": "2025-01-20T14:00:00Z",
"archived_at": null
}
}{
"error": {
"code": "validation_error",
"message": "Invalid input"
}
}{
"error": {
"code": "invalid_api_key",
"message": "Invalid API key"
}
}{
"error": {
"code": "not_found",
"message": "Resource not found"
}
}Authorizations
API key starting with leo_
Path Parameters
Company ID
Body
application/json
Company status ID. Set to null to clear the status. Must belong to the API key workspace.
Partial custom field update map keyed by custom field key.
Keys with null values are removed; omitted keys are preserved.
Response
Company updated
Show child attributes
Show child attributes
Example:
{
"id": "b2c3d4e5-6789-01ab-cdef-234567890abc",
"name": "Doctolib",
"domain": "doctolib.com",
"industry": "Health Tech",
"company_size": "1001-5000",
"description": null,
"location": "Paris, France",
"logo_url": "https://logo.clearbit.com/doctolib.com",
"phone": null,
"linkedin_url": "https://www.linkedin.com/company/doctolib",
"annual_revenue": null,
"owner_id": null,
"status_id": "550e8400-e29b-41d4-a716-446655440000",
"status": {
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "Customer",
"color": "#22c55e",
"position": 1,
"is_default": false
},
"custom_data": { "crm_tier": "enterprise" },
"created_at": "2025-01-10T08:00:00Z",
"updated_at": "2025-01-20T14:00:00Z",
"archived_at": null
}
⌘I