Update a company
curl --request PATCH \
--url https://api.wellapp.ai/v1/companies/{id} \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '
{
"type": "company",
"attributes": {
"description": "Enterprise open source solutions company.",
"locale": "en",
"domain_name_primary_link_url": "acme.com",
"tax_id": {
"value": "DE123456789",
"type": "VAT"
},
"registration": {
"trade_name": "TechSol",
"registered_name": "Tech Solutions GmbH"
},
"registration_number": {
"business_type": "GmbH",
"value": "HRB 123456",
"registry_name": "Handelsregister Berlin",
"registry_country": "DE"
}
},
"relationships": {
"created_by": {
"data": {
"type": "people",
"id": "people1"
}
},
"media": {
"data": [
{
"type": "media",
"id": "media1"
}
]
},
"web_links": {
"data": [
{
"type": "web_link",
"id": "sl1"
}
]
},
"emails": {
"data": [
{
"type": "email",
"id": "email1"
}
]
},
"phones": {
"data": [
{
"type": "phone",
"id": "phone1"
}
]
},
"locations": {
"data": [
{
"type": "location",
"id": "loc1"
}
]
},
"people": {
"data": [
{
"type": "people",
"id": "people1",
"meta": {
"relationship_type": "owner"
}
}
]
},
"parents": {
"data": {
"type": "company",
"id": "parent_company1"
}
},
"subsidiaries": {
"data": [
{
"type": "company",
"id": "subsidiary1"
}
]
},
"workspaces": {
"data": [
{
"type": "workspace",
"id": "workspace_tenant"
}
]
}
},
"included": [
{
"type": "people",
"id": "people1",
"attributes": {
"first_name": "John",
"last_name": "Doe",
"full_name": "John Doe"
}
},
{
"type": "media",
"id": "media1",
"attributes": {
"file_name": "company_logo.png",
"media_type": "logo",
"is_primary": true
}
},
{
"type": "web_link",
"id": "sl1",
"attributes": {
"url": "https://www.linkedin.com/company/acme",
"platform": "linkedin"
}
},
{
"type": "email",
"id": "email1",
"attributes": {
"value": "contact@acme.com",
"label": "work",
"is_primary": true
}
},
{
"type": "phone",
"id": "phone1",
"attributes": {
"e164_number": "+33123456789",
"label": "work",
"is_primary": true
}
},
{
"type": "location",
"id": "loc1",
"attributes": {
"street": "123 Tech Street",
"city": "Berlin",
"postal_code": "10115",
"country": "DE",
"is_primary": true
}
},
{
"type": "workspace",
"id": "workspace_tenant",
"attributes": {
"name": "Main Workspace",
"description": "Primary workspace for ACME operations"
}
},
{
"type": "company",
"id": "parent_company1",
"attributes": {
"name": "ACME Global Holdings",
"description": "Parent company of ACME",
"registration": {
"registered_name": "ACME Global Holdings GmbH"
}
}
},
{
"type": "company",
"id": "subsidiary1",
"attributes": {
"name": "ACME France",
"description": "French subsidiary of ACME",
"registration": {
"registered_name": "ACME France SAS"
}
}
},
{
"type": "document",
"id": "550e8400-e29b-41d4-a716-446655440016",
"attributes": {
"name": "company_registration.pdf",
"file_size": 245678,
"content_type": "application/pdf",
"created_at": "2025-09-25T10:00:00.000Z"
}
}
]
}
'import requests
url = "https://api.wellapp.ai/v1/companies/{id}"
payload = {
"type": "company",
"attributes": {
"description": "Enterprise open source solutions company.",
"locale": "en",
"domain_name_primary_link_url": "acme.com",
"tax_id": {
"value": "DE123456789",
"type": "VAT"
},
"registration": {
"trade_name": "TechSol",
"registered_name": "Tech Solutions GmbH"
},
"registration_number": {
"business_type": "GmbH",
"value": "HRB 123456",
"registry_name": "Handelsregister Berlin",
"registry_country": "DE"
}
},
"relationships": {
"created_by": { "data": {
"type": "people",
"id": "people1"
} },
"media": { "data": [
{
"type": "media",
"id": "media1"
}
] },
"web_links": { "data": [
{
"type": "web_link",
"id": "sl1"
}
] },
"emails": { "data": [
{
"type": "email",
"id": "email1"
}
] },
"phones": { "data": [
{
"type": "phone",
"id": "phone1"
}
] },
"locations": { "data": [
{
"type": "location",
"id": "loc1"
}
] },
"people": { "data": [
{
"type": "people",
"id": "people1",
"meta": { "relationship_type": "owner" }
}
] },
"parents": { "data": {
"type": "company",
"id": "parent_company1"
} },
"subsidiaries": { "data": [
{
"type": "company",
"id": "subsidiary1"
}
] },
"workspaces": { "data": [
{
"type": "workspace",
"id": "workspace_tenant"
}
] }
},
"included": [
{
"type": "people",
"id": "people1",
"attributes": {
"first_name": "John",
"last_name": "Doe",
"full_name": "John Doe"
}
},
{
"type": "media",
"id": "media1",
"attributes": {
"file_name": "company_logo.png",
"media_type": "logo",
"is_primary": True
}
},
{
"type": "web_link",
"id": "sl1",
"attributes": {
"url": "https://www.linkedin.com/company/acme",
"platform": "linkedin"
}
},
{
"type": "email",
"id": "email1",
"attributes": {
"value": "contact@acme.com",
"label": "work",
"is_primary": True
}
},
{
"type": "phone",
"id": "phone1",
"attributes": {
"e164_number": "+33123456789",
"label": "work",
"is_primary": True
}
},
{
"type": "location",
"id": "loc1",
"attributes": {
"street": "123 Tech Street",
"city": "Berlin",
"postal_code": "10115",
"country": "DE",
"is_primary": True
}
},
{
"type": "workspace",
"id": "workspace_tenant",
"attributes": {
"name": "Main Workspace",
"description": "Primary workspace for ACME operations"
}
},
{
"type": "company",
"id": "parent_company1",
"attributes": {
"name": "ACME Global Holdings",
"description": "Parent company of ACME",
"registration": { "registered_name": "ACME Global Holdings GmbH" }
}
},
{
"type": "company",
"id": "subsidiary1",
"attributes": {
"name": "ACME France",
"description": "French subsidiary of ACME",
"registration": { "registered_name": "ACME France SAS" }
}
},
{
"type": "document",
"id": "550e8400-e29b-41d4-a716-446655440016",
"attributes": {
"name": "company_registration.pdf",
"file_size": 245678,
"content_type": "application/pdf",
"created_at": "2025-09-25T10:00:00.000Z"
}
}
]
}
headers = {
"Authorization": "<authorization>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: '<authorization>', 'Content-Type': 'application/json'},
body: JSON.stringify({
type: 'company',
attributes: {
description: 'Enterprise open source solutions company.',
locale: 'en',
domain_name_primary_link_url: 'acme.com',
tax_id: {value: 'DE123456789', type: 'VAT'},
registration: {trade_name: 'TechSol', registered_name: 'Tech Solutions GmbH'},
registration_number: {
business_type: 'GmbH',
value: 'HRB 123456',
registry_name: 'Handelsregister Berlin',
registry_country: 'DE'
}
},
relationships: {
created_by: {data: {type: 'people', id: 'people1'}},
media: {data: [{type: 'media', id: 'media1'}]},
web_links: {data: [{type: 'web_link', id: 'sl1'}]},
emails: {data: [{type: 'email', id: 'email1'}]},
phones: {data: [{type: 'phone', id: 'phone1'}]},
locations: {data: [{type: 'location', id: 'loc1'}]},
people: {data: [{type: 'people', id: 'people1', meta: {relationship_type: 'owner'}}]},
parents: {data: {type: 'company', id: 'parent_company1'}},
subsidiaries: {data: [{type: 'company', id: 'subsidiary1'}]},
workspaces: {data: [{type: 'workspace', id: 'workspace_tenant'}]}
},
included: [
{
type: 'people',
id: 'people1',
attributes: {first_name: 'John', last_name: 'Doe', full_name: 'John Doe'}
},
{
type: 'media',
id: 'media1',
attributes: {file_name: 'company_logo.png', media_type: 'logo', is_primary: true}
},
{
type: 'web_link',
id: 'sl1',
attributes: {url: 'https://www.linkedin.com/company/acme', platform: 'linkedin'}
},
{
type: 'email',
id: 'email1',
attributes: {value: 'contact@acme.com', label: 'work', is_primary: true}
},
{
type: 'phone',
id: 'phone1',
attributes: {e164_number: '+33123456789', label: 'work', is_primary: true}
},
{
type: 'location',
id: 'loc1',
attributes: {
street: '123 Tech Street',
city: 'Berlin',
postal_code: '10115',
country: 'DE',
is_primary: true
}
},
{
type: 'workspace',
id: 'workspace_tenant',
attributes: {name: 'Main Workspace', description: 'Primary workspace for ACME operations'}
},
{
type: 'company',
id: 'parent_company1',
attributes: {
name: 'ACME Global Holdings',
description: 'Parent company of ACME',
registration: {registered_name: 'ACME Global Holdings GmbH'}
}
},
{
type: 'company',
id: 'subsidiary1',
attributes: {
name: 'ACME France',
description: 'French subsidiary of ACME',
registration: {registered_name: 'ACME France SAS'}
}
},
{
type: 'document',
id: '550e8400-e29b-41d4-a716-446655440016',
attributes: {
name: 'company_registration.pdf',
file_size: 245678,
content_type: 'application/pdf',
created_at: '2025-09-25T10:00:00.000Z'
}
}
]
})
};
fetch('https://api.wellapp.ai/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://api.wellapp.ai/v1/companies/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'type' => 'company',
'attributes' => [
'description' => 'Enterprise open source solutions company.',
'locale' => 'en',
'domain_name_primary_link_url' => 'acme.com',
'tax_id' => [
'value' => 'DE123456789',
'type' => 'VAT'
],
'registration' => [
'trade_name' => 'TechSol',
'registered_name' => 'Tech Solutions GmbH'
],
'registration_number' => [
'business_type' => 'GmbH',
'value' => 'HRB 123456',
'registry_name' => 'Handelsregister Berlin',
'registry_country' => 'DE'
]
],
'relationships' => [
'created_by' => [
'data' => [
'type' => 'people',
'id' => 'people1'
]
],
'media' => [
'data' => [
[
'type' => 'media',
'id' => 'media1'
]
]
],
'web_links' => [
'data' => [
[
'type' => 'web_link',
'id' => 'sl1'
]
]
],
'emails' => [
'data' => [
[
'type' => 'email',
'id' => 'email1'
]
]
],
'phones' => [
'data' => [
[
'type' => 'phone',
'id' => 'phone1'
]
]
],
'locations' => [
'data' => [
[
'type' => 'location',
'id' => 'loc1'
]
]
],
'people' => [
'data' => [
[
'type' => 'people',
'id' => 'people1',
'meta' => [
'relationship_type' => 'owner'
]
]
]
],
'parents' => [
'data' => [
'type' => 'company',
'id' => 'parent_company1'
]
],
'subsidiaries' => [
'data' => [
[
'type' => 'company',
'id' => 'subsidiary1'
]
]
],
'workspaces' => [
'data' => [
[
'type' => 'workspace',
'id' => 'workspace_tenant'
]
]
]
],
'included' => [
[
'type' => 'people',
'id' => 'people1',
'attributes' => [
'first_name' => 'John',
'last_name' => 'Doe',
'full_name' => 'John Doe'
]
],
[
'type' => 'media',
'id' => 'media1',
'attributes' => [
'file_name' => 'company_logo.png',
'media_type' => 'logo',
'is_primary' => true
]
],
[
'type' => 'web_link',
'id' => 'sl1',
'attributes' => [
'url' => 'https://www.linkedin.com/company/acme',
'platform' => 'linkedin'
]
],
[
'type' => 'email',
'id' => 'email1',
'attributes' => [
'value' => 'contact@acme.com',
'label' => 'work',
'is_primary' => true
]
],
[
'type' => 'phone',
'id' => 'phone1',
'attributes' => [
'e164_number' => '+33123456789',
'label' => 'work',
'is_primary' => true
]
],
[
'type' => 'location',
'id' => 'loc1',
'attributes' => [
'street' => '123 Tech Street',
'city' => 'Berlin',
'postal_code' => '10115',
'country' => 'DE',
'is_primary' => true
]
],
[
'type' => 'workspace',
'id' => 'workspace_tenant',
'attributes' => [
'name' => 'Main Workspace',
'description' => 'Primary workspace for ACME operations'
]
],
[
'type' => 'company',
'id' => 'parent_company1',
'attributes' => [
'name' => 'ACME Global Holdings',
'description' => 'Parent company of ACME',
'registration' => [
'registered_name' => 'ACME Global Holdings GmbH'
]
]
],
[
'type' => 'company',
'id' => 'subsidiary1',
'attributes' => [
'name' => 'ACME France',
'description' => 'French subsidiary of ACME',
'registration' => [
'registered_name' => 'ACME France SAS'
]
]
],
[
'type' => 'document',
'id' => '550e8400-e29b-41d4-a716-446655440016',
'attributes' => [
'name' => 'company_registration.pdf',
'file_size' => 245678,
'content_type' => 'application/pdf',
'created_at' => '2025-09-25T10:00:00.000Z'
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"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.wellapp.ai/v1/companies/{id}"
payload := strings.NewReader("{\n \"type\": \"company\",\n \"attributes\": {\n \"description\": \"Enterprise open source solutions company.\",\n \"locale\": \"en\",\n \"domain_name_primary_link_url\": \"acme.com\",\n \"tax_id\": {\n \"value\": \"DE123456789\",\n \"type\": \"VAT\"\n },\n \"registration\": {\n \"trade_name\": \"TechSol\",\n \"registered_name\": \"Tech Solutions GmbH\"\n },\n \"registration_number\": {\n \"business_type\": \"GmbH\",\n \"value\": \"HRB 123456\",\n \"registry_name\": \"Handelsregister Berlin\",\n \"registry_country\": \"DE\"\n }\n },\n \"relationships\": {\n \"created_by\": {\n \"data\": {\n \"type\": \"people\",\n \"id\": \"people1\"\n }\n },\n \"media\": {\n \"data\": [\n {\n \"type\": \"media\",\n \"id\": \"media1\"\n }\n ]\n },\n \"web_links\": {\n \"data\": [\n {\n \"type\": \"web_link\",\n \"id\": \"sl1\"\n }\n ]\n },\n \"emails\": {\n \"data\": [\n {\n \"type\": \"email\",\n \"id\": \"email1\"\n }\n ]\n },\n \"phones\": {\n \"data\": [\n {\n \"type\": \"phone\",\n \"id\": \"phone1\"\n }\n ]\n },\n \"locations\": {\n \"data\": [\n {\n \"type\": \"location\",\n \"id\": \"loc1\"\n }\n ]\n },\n \"people\": {\n \"data\": [\n {\n \"type\": \"people\",\n \"id\": \"people1\",\n \"meta\": {\n \"relationship_type\": \"owner\"\n }\n }\n ]\n },\n \"parents\": {\n \"data\": {\n \"type\": \"company\",\n \"id\": \"parent_company1\"\n }\n },\n \"subsidiaries\": {\n \"data\": [\n {\n \"type\": \"company\",\n \"id\": \"subsidiary1\"\n }\n ]\n },\n \"workspaces\": {\n \"data\": [\n {\n \"type\": \"workspace\",\n \"id\": \"workspace_tenant\"\n }\n ]\n }\n },\n \"included\": [\n {\n \"type\": \"people\",\n \"id\": \"people1\",\n \"attributes\": {\n \"first_name\": \"John\",\n \"last_name\": \"Doe\",\n \"full_name\": \"John Doe\"\n }\n },\n {\n \"type\": \"media\",\n \"id\": \"media1\",\n \"attributes\": {\n \"file_name\": \"company_logo.png\",\n \"media_type\": \"logo\",\n \"is_primary\": true\n }\n },\n {\n \"type\": \"web_link\",\n \"id\": \"sl1\",\n \"attributes\": {\n \"url\": \"https://www.linkedin.com/company/acme\",\n \"platform\": \"linkedin\"\n }\n },\n {\n \"type\": \"email\",\n \"id\": \"email1\",\n \"attributes\": {\n \"value\": \"contact@acme.com\",\n \"label\": \"work\",\n \"is_primary\": true\n }\n },\n {\n \"type\": \"phone\",\n \"id\": \"phone1\",\n \"attributes\": {\n \"e164_number\": \"+33123456789\",\n \"label\": \"work\",\n \"is_primary\": true\n }\n },\n {\n \"type\": \"location\",\n \"id\": \"loc1\",\n \"attributes\": {\n \"street\": \"123 Tech Street\",\n \"city\": \"Berlin\",\n \"postal_code\": \"10115\",\n \"country\": \"DE\",\n \"is_primary\": true\n }\n },\n {\n \"type\": \"workspace\",\n \"id\": \"workspace_tenant\",\n \"attributes\": {\n \"name\": \"Main Workspace\",\n \"description\": \"Primary workspace for ACME operations\"\n }\n },\n {\n \"type\": \"company\",\n \"id\": \"parent_company1\",\n \"attributes\": {\n \"name\": \"ACME Global Holdings\",\n \"description\": \"Parent company of ACME\",\n \"registration\": {\n \"registered_name\": \"ACME Global Holdings GmbH\"\n }\n }\n },\n {\n \"type\": \"company\",\n \"id\": \"subsidiary1\",\n \"attributes\": {\n \"name\": \"ACME France\",\n \"description\": \"French subsidiary of ACME\",\n \"registration\": {\n \"registered_name\": \"ACME France SAS\"\n }\n }\n },\n {\n \"type\": \"document\",\n \"id\": \"550e8400-e29b-41d4-a716-446655440016\",\n \"attributes\": {\n \"name\": \"company_registration.pdf\",\n \"file_size\": 245678,\n \"content_type\": \"application/pdf\",\n \"created_at\": \"2025-09-25T10:00:00.000Z\"\n }\n }\n ]\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "<authorization>")
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.patch("https://api.wellapp.ai/v1/companies/{id}")
.header("Authorization", "<authorization>")
.header("Content-Type", "application/json")
.body("{\n \"type\": \"company\",\n \"attributes\": {\n \"description\": \"Enterprise open source solutions company.\",\n \"locale\": \"en\",\n \"domain_name_primary_link_url\": \"acme.com\",\n \"tax_id\": {\n \"value\": \"DE123456789\",\n \"type\": \"VAT\"\n },\n \"registration\": {\n \"trade_name\": \"TechSol\",\n \"registered_name\": \"Tech Solutions GmbH\"\n },\n \"registration_number\": {\n \"business_type\": \"GmbH\",\n \"value\": \"HRB 123456\",\n \"registry_name\": \"Handelsregister Berlin\",\n \"registry_country\": \"DE\"\n }\n },\n \"relationships\": {\n \"created_by\": {\n \"data\": {\n \"type\": \"people\",\n \"id\": \"people1\"\n }\n },\n \"media\": {\n \"data\": [\n {\n \"type\": \"media\",\n \"id\": \"media1\"\n }\n ]\n },\n \"web_links\": {\n \"data\": [\n {\n \"type\": \"web_link\",\n \"id\": \"sl1\"\n }\n ]\n },\n \"emails\": {\n \"data\": [\n {\n \"type\": \"email\",\n \"id\": \"email1\"\n }\n ]\n },\n \"phones\": {\n \"data\": [\n {\n \"type\": \"phone\",\n \"id\": \"phone1\"\n }\n ]\n },\n \"locations\": {\n \"data\": [\n {\n \"type\": \"location\",\n \"id\": \"loc1\"\n }\n ]\n },\n \"people\": {\n \"data\": [\n {\n \"type\": \"people\",\n \"id\": \"people1\",\n \"meta\": {\n \"relationship_type\": \"owner\"\n }\n }\n ]\n },\n \"parents\": {\n \"data\": {\n \"type\": \"company\",\n \"id\": \"parent_company1\"\n }\n },\n \"subsidiaries\": {\n \"data\": [\n {\n \"type\": \"company\",\n \"id\": \"subsidiary1\"\n }\n ]\n },\n \"workspaces\": {\n \"data\": [\n {\n \"type\": \"workspace\",\n \"id\": \"workspace_tenant\"\n }\n ]\n }\n },\n \"included\": [\n {\n \"type\": \"people\",\n \"id\": \"people1\",\n \"attributes\": {\n \"first_name\": \"John\",\n \"last_name\": \"Doe\",\n \"full_name\": \"John Doe\"\n }\n },\n {\n \"type\": \"media\",\n \"id\": \"media1\",\n \"attributes\": {\n \"file_name\": \"company_logo.png\",\n \"media_type\": \"logo\",\n \"is_primary\": true\n }\n },\n {\n \"type\": \"web_link\",\n \"id\": \"sl1\",\n \"attributes\": {\n \"url\": \"https://www.linkedin.com/company/acme\",\n \"platform\": \"linkedin\"\n }\n },\n {\n \"type\": \"email\",\n \"id\": \"email1\",\n \"attributes\": {\n \"value\": \"contact@acme.com\",\n \"label\": \"work\",\n \"is_primary\": true\n }\n },\n {\n \"type\": \"phone\",\n \"id\": \"phone1\",\n \"attributes\": {\n \"e164_number\": \"+33123456789\",\n \"label\": \"work\",\n \"is_primary\": true\n }\n },\n {\n \"type\": \"location\",\n \"id\": \"loc1\",\n \"attributes\": {\n \"street\": \"123 Tech Street\",\n \"city\": \"Berlin\",\n \"postal_code\": \"10115\",\n \"country\": \"DE\",\n \"is_primary\": true\n }\n },\n {\n \"type\": \"workspace\",\n \"id\": \"workspace_tenant\",\n \"attributes\": {\n \"name\": \"Main Workspace\",\n \"description\": \"Primary workspace for ACME operations\"\n }\n },\n {\n \"type\": \"company\",\n \"id\": \"parent_company1\",\n \"attributes\": {\n \"name\": \"ACME Global Holdings\",\n \"description\": \"Parent company of ACME\",\n \"registration\": {\n \"registered_name\": \"ACME Global Holdings GmbH\"\n }\n }\n },\n {\n \"type\": \"company\",\n \"id\": \"subsidiary1\",\n \"attributes\": {\n \"name\": \"ACME France\",\n \"description\": \"French subsidiary of ACME\",\n \"registration\": {\n \"registered_name\": \"ACME France SAS\"\n }\n }\n },\n {\n \"type\": \"document\",\n \"id\": \"550e8400-e29b-41d4-a716-446655440016\",\n \"attributes\": {\n \"name\": \"company_registration.pdf\",\n \"file_size\": 245678,\n \"content_type\": \"application/pdf\",\n \"created_at\": \"2025-09-25T10:00:00.000Z\"\n }\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.wellapp.ai/v1/companies/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = '<authorization>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"type\": \"company\",\n \"attributes\": {\n \"description\": \"Enterprise open source solutions company.\",\n \"locale\": \"en\",\n \"domain_name_primary_link_url\": \"acme.com\",\n \"tax_id\": {\n \"value\": \"DE123456789\",\n \"type\": \"VAT\"\n },\n \"registration\": {\n \"trade_name\": \"TechSol\",\n \"registered_name\": \"Tech Solutions GmbH\"\n },\n \"registration_number\": {\n \"business_type\": \"GmbH\",\n \"value\": \"HRB 123456\",\n \"registry_name\": \"Handelsregister Berlin\",\n \"registry_country\": \"DE\"\n }\n },\n \"relationships\": {\n \"created_by\": {\n \"data\": {\n \"type\": \"people\",\n \"id\": \"people1\"\n }\n },\n \"media\": {\n \"data\": [\n {\n \"type\": \"media\",\n \"id\": \"media1\"\n }\n ]\n },\n \"web_links\": {\n \"data\": [\n {\n \"type\": \"web_link\",\n \"id\": \"sl1\"\n }\n ]\n },\n \"emails\": {\n \"data\": [\n {\n \"type\": \"email\",\n \"id\": \"email1\"\n }\n ]\n },\n \"phones\": {\n \"data\": [\n {\n \"type\": \"phone\",\n \"id\": \"phone1\"\n }\n ]\n },\n \"locations\": {\n \"data\": [\n {\n \"type\": \"location\",\n \"id\": \"loc1\"\n }\n ]\n },\n \"people\": {\n \"data\": [\n {\n \"type\": \"people\",\n \"id\": \"people1\",\n \"meta\": {\n \"relationship_type\": \"owner\"\n }\n }\n ]\n },\n \"parents\": {\n \"data\": {\n \"type\": \"company\",\n \"id\": \"parent_company1\"\n }\n },\n \"subsidiaries\": {\n \"data\": [\n {\n \"type\": \"company\",\n \"id\": \"subsidiary1\"\n }\n ]\n },\n \"workspaces\": {\n \"data\": [\n {\n \"type\": \"workspace\",\n \"id\": \"workspace_tenant\"\n }\n ]\n }\n },\n \"included\": [\n {\n \"type\": \"people\",\n \"id\": \"people1\",\n \"attributes\": {\n \"first_name\": \"John\",\n \"last_name\": \"Doe\",\n \"full_name\": \"John Doe\"\n }\n },\n {\n \"type\": \"media\",\n \"id\": \"media1\",\n \"attributes\": {\n \"file_name\": \"company_logo.png\",\n \"media_type\": \"logo\",\n \"is_primary\": true\n }\n },\n {\n \"type\": \"web_link\",\n \"id\": \"sl1\",\n \"attributes\": {\n \"url\": \"https://www.linkedin.com/company/acme\",\n \"platform\": \"linkedin\"\n }\n },\n {\n \"type\": \"email\",\n \"id\": \"email1\",\n \"attributes\": {\n \"value\": \"contact@acme.com\",\n \"label\": \"work\",\n \"is_primary\": true\n }\n },\n {\n \"type\": \"phone\",\n \"id\": \"phone1\",\n \"attributes\": {\n \"e164_number\": \"+33123456789\",\n \"label\": \"work\",\n \"is_primary\": true\n }\n },\n {\n \"type\": \"location\",\n \"id\": \"loc1\",\n \"attributes\": {\n \"street\": \"123 Tech Street\",\n \"city\": \"Berlin\",\n \"postal_code\": \"10115\",\n \"country\": \"DE\",\n \"is_primary\": true\n }\n },\n {\n \"type\": \"workspace\",\n \"id\": \"workspace_tenant\",\n \"attributes\": {\n \"name\": \"Main Workspace\",\n \"description\": \"Primary workspace for ACME operations\"\n }\n },\n {\n \"type\": \"company\",\n \"id\": \"parent_company1\",\n \"attributes\": {\n \"name\": \"ACME Global Holdings\",\n \"description\": \"Parent company of ACME\",\n \"registration\": {\n \"registered_name\": \"ACME Global Holdings GmbH\"\n }\n }\n },\n {\n \"type\": \"company\",\n \"id\": \"subsidiary1\",\n \"attributes\": {\n \"name\": \"ACME France\",\n \"description\": \"French subsidiary of ACME\",\n \"registration\": {\n \"registered_name\": \"ACME France SAS\"\n }\n }\n },\n {\n \"type\": \"document\",\n \"id\": \"550e8400-e29b-41d4-a716-446655440016\",\n \"attributes\": {\n \"name\": \"company_registration.pdf\",\n \"file_size\": 245678,\n \"content_type\": \"application/pdf\",\n \"created_at\": \"2025-09-25T10:00:00.000Z\"\n }\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": {
"type": "company",
"id": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
"attributes": {
"description": "Enterprise open source solutions company.",
"locale": "en",
"domain_name_primary_link_url": "acme.com",
"tax_id": {
"value": "DE123456789",
"type": "VAT"
},
"registration": {
"trade_name": "TechSol",
"registered_name": "Tech Solutions GmbH"
},
"registration_number": {
"business_type": "GmbH",
"value": "HRB 123456",
"registry_name": "Handelsregister Berlin",
"registry_country": "DE"
},
"created_at": "2025-09-30T14:30:00.000Z",
"updated_at": "2025-09-30T14:30:00.000Z"
},
"relationships": {
"created_by": {
"data": {
"type": "people",
"id": "6ba7b810-9dad-11d1-80b4-00c04fd430c8"
}
},
"media": {
"data": [
{
"type": "media",
"id": "550e8400-e29b-41d4-a716-446655440010"
}
]
},
"web_links": {
"data": [
{
"type": "web_link",
"id": "550e8400-e29b-41d4-a716-446655440011"
}
]
},
"emails": {
"data": [
{
"type": "email",
"id": "550e8400-e29b-41d4-a716-446655440012"
}
]
},
"phones": {
"data": [
{
"type": "phone",
"id": "550e8400-e29b-41d4-a716-446655440013"
}
]
},
"locations": {
"data": [
{
"type": "location",
"id": "550e8400-e29b-41d4-a716-446655440015"
}
]
},
"people": {
"data": [
{
"type": "people",
"id": "6ba7b810-9dad-11d1-80b4-00c04fd430c8"
}
]
},
"documents": {
"data": [
{
"type": "document",
"id": "550e8400-e29b-41d4-a716-446655440016"
}
]
},
"parents": {
"data": {
"type": "company",
"id": "550e8400-e29b-41d4-a716-446655440019"
}
},
"subsidiaries": {
"data": [
{
"type": "company",
"id": "550e8400-e29b-41d4-a716-446655440020"
}
]
},
"workspaces": {
"data": [
{
"type": "workspace",
"id": "550e8400-e29b-41d4-a716-446655440001"
}
]
}
}
},
"included": [
{
"type": "people",
"id": "6ba7b810-9dad-11d1-80b4-00c04fd430c8",
"attributes": {
"first_name": "Alexandre",
"last_name": "Dubois",
"full_name": "Alexandre Dubois",
"relationship_type": "owner"
}
},
{
"type": "workspace",
"id": "550e8400-e29b-41d4-a716-446655440001",
"attributes": {
"name": "Development Team",
"description": "Main development workspace for software engineering projects and client solutions",
"created_at": "2025-09-10T08:00:00.000Z",
"updated_at": "2025-09-15T16:45:00.000Z"
}
},
{
"type": "media",
"id": "550e8400-e29b-41d4-a716-446655440010",
"attributes": {
"file_name": "company_logo.png",
"content_type": "image/png",
"file_size": 15678
}
},
{
"type": "web_link",
"id": "550e8400-e29b-41d4-a716-446655440011",
"attributes": {
"url": "https://www.linkedin.com/company/acme",
"platform": "linkedin"
}
},
{
"type": "email",
"id": "550e8400-e29b-41d4-a716-446655440012",
"attributes": {
"value": "contact@acme.com",
"label": "work",
"is_primary": true
}
},
{
"type": "phone",
"id": "550e8400-e29b-41d4-a716-446655440013",
"attributes": {
"e164_number": "+4930123456789",
"label": "work",
"is_primary": true
}
},
{
"type": "location",
"id": "550e8400-e29b-41d4-a716-446655440015",
"attributes": {
"street": "Unter den Linden 1",
"city": "Berlin",
"postal_code": "10117",
"country": "DE",
"is_primary": true
}
},
{
"type": "document",
"id": "550e8400-e29b-41d4-a716-446655440016",
"attributes": {
"name": "company_registration.pdf",
"file_size": 245678,
"content_type": "application/pdf",
"created_at": "2025-09-25T10:00:00.000Z"
}
},
{
"type": "company",
"id": "550e8400-e29b-41d4-a716-446655440019",
"attributes": {
"name": "ACME Global Holdings",
"description": "Parent company of ACME",
"registration": {
"registered_name": "ACME Global Holdings GmbH"
}
}
},
{
"type": "company",
"id": "550e8400-e29b-41d4-a716-446655440020",
"attributes": {
"name": "ACME France",
"description": "French subsidiary of ACME",
"registration": {
"registered_name": "ACME France SAS"
}
}
}
]
}{
"code": "SCHEMA_VALIDATION_ERROR",
"status": 400,
"title": "Validation Error",
"message": "The request is invalid",
"meta": {
"log_id": "65c669d4-679c-4a8b-b8c0-fbe37699bb5b"
},
"details": [
{
"instancePath": "<string>",
"schemaPath": "<string>",
"keyword": "<string>",
"params": {},
"message": "<string>"
}
]
}{
"code": "UNAUTHORIZED",
"status": 401,
"title": "Unauthorized",
"message": "You are not authorized to access this resource",
"meta": {
"log_id": "65c669d4-679c-4a8b-b8c0-fbe37699bb5b"
}
}{
"code": "COMPANY_NOT_FOUND",
"status": 404,
"title": "Company Not Found",
"message": "The requested company could not be found",
"meta": {
"log_id": "65c669d4-679c-4a8b-b8c0-fbe37699bb5b"
}
}Companies
Update Company
Update an existing company record
PATCH
/
v1
/
companies
/
{id}
Update a company
curl --request PATCH \
--url https://api.wellapp.ai/v1/companies/{id} \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '
{
"type": "company",
"attributes": {
"description": "Enterprise open source solutions company.",
"locale": "en",
"domain_name_primary_link_url": "acme.com",
"tax_id": {
"value": "DE123456789",
"type": "VAT"
},
"registration": {
"trade_name": "TechSol",
"registered_name": "Tech Solutions GmbH"
},
"registration_number": {
"business_type": "GmbH",
"value": "HRB 123456",
"registry_name": "Handelsregister Berlin",
"registry_country": "DE"
}
},
"relationships": {
"created_by": {
"data": {
"type": "people",
"id": "people1"
}
},
"media": {
"data": [
{
"type": "media",
"id": "media1"
}
]
},
"web_links": {
"data": [
{
"type": "web_link",
"id": "sl1"
}
]
},
"emails": {
"data": [
{
"type": "email",
"id": "email1"
}
]
},
"phones": {
"data": [
{
"type": "phone",
"id": "phone1"
}
]
},
"locations": {
"data": [
{
"type": "location",
"id": "loc1"
}
]
},
"people": {
"data": [
{
"type": "people",
"id": "people1",
"meta": {
"relationship_type": "owner"
}
}
]
},
"parents": {
"data": {
"type": "company",
"id": "parent_company1"
}
},
"subsidiaries": {
"data": [
{
"type": "company",
"id": "subsidiary1"
}
]
},
"workspaces": {
"data": [
{
"type": "workspace",
"id": "workspace_tenant"
}
]
}
},
"included": [
{
"type": "people",
"id": "people1",
"attributes": {
"first_name": "John",
"last_name": "Doe",
"full_name": "John Doe"
}
},
{
"type": "media",
"id": "media1",
"attributes": {
"file_name": "company_logo.png",
"media_type": "logo",
"is_primary": true
}
},
{
"type": "web_link",
"id": "sl1",
"attributes": {
"url": "https://www.linkedin.com/company/acme",
"platform": "linkedin"
}
},
{
"type": "email",
"id": "email1",
"attributes": {
"value": "contact@acme.com",
"label": "work",
"is_primary": true
}
},
{
"type": "phone",
"id": "phone1",
"attributes": {
"e164_number": "+33123456789",
"label": "work",
"is_primary": true
}
},
{
"type": "location",
"id": "loc1",
"attributes": {
"street": "123 Tech Street",
"city": "Berlin",
"postal_code": "10115",
"country": "DE",
"is_primary": true
}
},
{
"type": "workspace",
"id": "workspace_tenant",
"attributes": {
"name": "Main Workspace",
"description": "Primary workspace for ACME operations"
}
},
{
"type": "company",
"id": "parent_company1",
"attributes": {
"name": "ACME Global Holdings",
"description": "Parent company of ACME",
"registration": {
"registered_name": "ACME Global Holdings GmbH"
}
}
},
{
"type": "company",
"id": "subsidiary1",
"attributes": {
"name": "ACME France",
"description": "French subsidiary of ACME",
"registration": {
"registered_name": "ACME France SAS"
}
}
},
{
"type": "document",
"id": "550e8400-e29b-41d4-a716-446655440016",
"attributes": {
"name": "company_registration.pdf",
"file_size": 245678,
"content_type": "application/pdf",
"created_at": "2025-09-25T10:00:00.000Z"
}
}
]
}
'import requests
url = "https://api.wellapp.ai/v1/companies/{id}"
payload = {
"type": "company",
"attributes": {
"description": "Enterprise open source solutions company.",
"locale": "en",
"domain_name_primary_link_url": "acme.com",
"tax_id": {
"value": "DE123456789",
"type": "VAT"
},
"registration": {
"trade_name": "TechSol",
"registered_name": "Tech Solutions GmbH"
},
"registration_number": {
"business_type": "GmbH",
"value": "HRB 123456",
"registry_name": "Handelsregister Berlin",
"registry_country": "DE"
}
},
"relationships": {
"created_by": { "data": {
"type": "people",
"id": "people1"
} },
"media": { "data": [
{
"type": "media",
"id": "media1"
}
] },
"web_links": { "data": [
{
"type": "web_link",
"id": "sl1"
}
] },
"emails": { "data": [
{
"type": "email",
"id": "email1"
}
] },
"phones": { "data": [
{
"type": "phone",
"id": "phone1"
}
] },
"locations": { "data": [
{
"type": "location",
"id": "loc1"
}
] },
"people": { "data": [
{
"type": "people",
"id": "people1",
"meta": { "relationship_type": "owner" }
}
] },
"parents": { "data": {
"type": "company",
"id": "parent_company1"
} },
"subsidiaries": { "data": [
{
"type": "company",
"id": "subsidiary1"
}
] },
"workspaces": { "data": [
{
"type": "workspace",
"id": "workspace_tenant"
}
] }
},
"included": [
{
"type": "people",
"id": "people1",
"attributes": {
"first_name": "John",
"last_name": "Doe",
"full_name": "John Doe"
}
},
{
"type": "media",
"id": "media1",
"attributes": {
"file_name": "company_logo.png",
"media_type": "logo",
"is_primary": True
}
},
{
"type": "web_link",
"id": "sl1",
"attributes": {
"url": "https://www.linkedin.com/company/acme",
"platform": "linkedin"
}
},
{
"type": "email",
"id": "email1",
"attributes": {
"value": "contact@acme.com",
"label": "work",
"is_primary": True
}
},
{
"type": "phone",
"id": "phone1",
"attributes": {
"e164_number": "+33123456789",
"label": "work",
"is_primary": True
}
},
{
"type": "location",
"id": "loc1",
"attributes": {
"street": "123 Tech Street",
"city": "Berlin",
"postal_code": "10115",
"country": "DE",
"is_primary": True
}
},
{
"type": "workspace",
"id": "workspace_tenant",
"attributes": {
"name": "Main Workspace",
"description": "Primary workspace for ACME operations"
}
},
{
"type": "company",
"id": "parent_company1",
"attributes": {
"name": "ACME Global Holdings",
"description": "Parent company of ACME",
"registration": { "registered_name": "ACME Global Holdings GmbH" }
}
},
{
"type": "company",
"id": "subsidiary1",
"attributes": {
"name": "ACME France",
"description": "French subsidiary of ACME",
"registration": { "registered_name": "ACME France SAS" }
}
},
{
"type": "document",
"id": "550e8400-e29b-41d4-a716-446655440016",
"attributes": {
"name": "company_registration.pdf",
"file_size": 245678,
"content_type": "application/pdf",
"created_at": "2025-09-25T10:00:00.000Z"
}
}
]
}
headers = {
"Authorization": "<authorization>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: '<authorization>', 'Content-Type': 'application/json'},
body: JSON.stringify({
type: 'company',
attributes: {
description: 'Enterprise open source solutions company.',
locale: 'en',
domain_name_primary_link_url: 'acme.com',
tax_id: {value: 'DE123456789', type: 'VAT'},
registration: {trade_name: 'TechSol', registered_name: 'Tech Solutions GmbH'},
registration_number: {
business_type: 'GmbH',
value: 'HRB 123456',
registry_name: 'Handelsregister Berlin',
registry_country: 'DE'
}
},
relationships: {
created_by: {data: {type: 'people', id: 'people1'}},
media: {data: [{type: 'media', id: 'media1'}]},
web_links: {data: [{type: 'web_link', id: 'sl1'}]},
emails: {data: [{type: 'email', id: 'email1'}]},
phones: {data: [{type: 'phone', id: 'phone1'}]},
locations: {data: [{type: 'location', id: 'loc1'}]},
people: {data: [{type: 'people', id: 'people1', meta: {relationship_type: 'owner'}}]},
parents: {data: {type: 'company', id: 'parent_company1'}},
subsidiaries: {data: [{type: 'company', id: 'subsidiary1'}]},
workspaces: {data: [{type: 'workspace', id: 'workspace_tenant'}]}
},
included: [
{
type: 'people',
id: 'people1',
attributes: {first_name: 'John', last_name: 'Doe', full_name: 'John Doe'}
},
{
type: 'media',
id: 'media1',
attributes: {file_name: 'company_logo.png', media_type: 'logo', is_primary: true}
},
{
type: 'web_link',
id: 'sl1',
attributes: {url: 'https://www.linkedin.com/company/acme', platform: 'linkedin'}
},
{
type: 'email',
id: 'email1',
attributes: {value: 'contact@acme.com', label: 'work', is_primary: true}
},
{
type: 'phone',
id: 'phone1',
attributes: {e164_number: '+33123456789', label: 'work', is_primary: true}
},
{
type: 'location',
id: 'loc1',
attributes: {
street: '123 Tech Street',
city: 'Berlin',
postal_code: '10115',
country: 'DE',
is_primary: true
}
},
{
type: 'workspace',
id: 'workspace_tenant',
attributes: {name: 'Main Workspace', description: 'Primary workspace for ACME operations'}
},
{
type: 'company',
id: 'parent_company1',
attributes: {
name: 'ACME Global Holdings',
description: 'Parent company of ACME',
registration: {registered_name: 'ACME Global Holdings GmbH'}
}
},
{
type: 'company',
id: 'subsidiary1',
attributes: {
name: 'ACME France',
description: 'French subsidiary of ACME',
registration: {registered_name: 'ACME France SAS'}
}
},
{
type: 'document',
id: '550e8400-e29b-41d4-a716-446655440016',
attributes: {
name: 'company_registration.pdf',
file_size: 245678,
content_type: 'application/pdf',
created_at: '2025-09-25T10:00:00.000Z'
}
}
]
})
};
fetch('https://api.wellapp.ai/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://api.wellapp.ai/v1/companies/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'type' => 'company',
'attributes' => [
'description' => 'Enterprise open source solutions company.',
'locale' => 'en',
'domain_name_primary_link_url' => 'acme.com',
'tax_id' => [
'value' => 'DE123456789',
'type' => 'VAT'
],
'registration' => [
'trade_name' => 'TechSol',
'registered_name' => 'Tech Solutions GmbH'
],
'registration_number' => [
'business_type' => 'GmbH',
'value' => 'HRB 123456',
'registry_name' => 'Handelsregister Berlin',
'registry_country' => 'DE'
]
],
'relationships' => [
'created_by' => [
'data' => [
'type' => 'people',
'id' => 'people1'
]
],
'media' => [
'data' => [
[
'type' => 'media',
'id' => 'media1'
]
]
],
'web_links' => [
'data' => [
[
'type' => 'web_link',
'id' => 'sl1'
]
]
],
'emails' => [
'data' => [
[
'type' => 'email',
'id' => 'email1'
]
]
],
'phones' => [
'data' => [
[
'type' => 'phone',
'id' => 'phone1'
]
]
],
'locations' => [
'data' => [
[
'type' => 'location',
'id' => 'loc1'
]
]
],
'people' => [
'data' => [
[
'type' => 'people',
'id' => 'people1',
'meta' => [
'relationship_type' => 'owner'
]
]
]
],
'parents' => [
'data' => [
'type' => 'company',
'id' => 'parent_company1'
]
],
'subsidiaries' => [
'data' => [
[
'type' => 'company',
'id' => 'subsidiary1'
]
]
],
'workspaces' => [
'data' => [
[
'type' => 'workspace',
'id' => 'workspace_tenant'
]
]
]
],
'included' => [
[
'type' => 'people',
'id' => 'people1',
'attributes' => [
'first_name' => 'John',
'last_name' => 'Doe',
'full_name' => 'John Doe'
]
],
[
'type' => 'media',
'id' => 'media1',
'attributes' => [
'file_name' => 'company_logo.png',
'media_type' => 'logo',
'is_primary' => true
]
],
[
'type' => 'web_link',
'id' => 'sl1',
'attributes' => [
'url' => 'https://www.linkedin.com/company/acme',
'platform' => 'linkedin'
]
],
[
'type' => 'email',
'id' => 'email1',
'attributes' => [
'value' => 'contact@acme.com',
'label' => 'work',
'is_primary' => true
]
],
[
'type' => 'phone',
'id' => 'phone1',
'attributes' => [
'e164_number' => '+33123456789',
'label' => 'work',
'is_primary' => true
]
],
[
'type' => 'location',
'id' => 'loc1',
'attributes' => [
'street' => '123 Tech Street',
'city' => 'Berlin',
'postal_code' => '10115',
'country' => 'DE',
'is_primary' => true
]
],
[
'type' => 'workspace',
'id' => 'workspace_tenant',
'attributes' => [
'name' => 'Main Workspace',
'description' => 'Primary workspace for ACME operations'
]
],
[
'type' => 'company',
'id' => 'parent_company1',
'attributes' => [
'name' => 'ACME Global Holdings',
'description' => 'Parent company of ACME',
'registration' => [
'registered_name' => 'ACME Global Holdings GmbH'
]
]
],
[
'type' => 'company',
'id' => 'subsidiary1',
'attributes' => [
'name' => 'ACME France',
'description' => 'French subsidiary of ACME',
'registration' => [
'registered_name' => 'ACME France SAS'
]
]
],
[
'type' => 'document',
'id' => '550e8400-e29b-41d4-a716-446655440016',
'attributes' => [
'name' => 'company_registration.pdf',
'file_size' => 245678,
'content_type' => 'application/pdf',
'created_at' => '2025-09-25T10:00:00.000Z'
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"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.wellapp.ai/v1/companies/{id}"
payload := strings.NewReader("{\n \"type\": \"company\",\n \"attributes\": {\n \"description\": \"Enterprise open source solutions company.\",\n \"locale\": \"en\",\n \"domain_name_primary_link_url\": \"acme.com\",\n \"tax_id\": {\n \"value\": \"DE123456789\",\n \"type\": \"VAT\"\n },\n \"registration\": {\n \"trade_name\": \"TechSol\",\n \"registered_name\": \"Tech Solutions GmbH\"\n },\n \"registration_number\": {\n \"business_type\": \"GmbH\",\n \"value\": \"HRB 123456\",\n \"registry_name\": \"Handelsregister Berlin\",\n \"registry_country\": \"DE\"\n }\n },\n \"relationships\": {\n \"created_by\": {\n \"data\": {\n \"type\": \"people\",\n \"id\": \"people1\"\n }\n },\n \"media\": {\n \"data\": [\n {\n \"type\": \"media\",\n \"id\": \"media1\"\n }\n ]\n },\n \"web_links\": {\n \"data\": [\n {\n \"type\": \"web_link\",\n \"id\": \"sl1\"\n }\n ]\n },\n \"emails\": {\n \"data\": [\n {\n \"type\": \"email\",\n \"id\": \"email1\"\n }\n ]\n },\n \"phones\": {\n \"data\": [\n {\n \"type\": \"phone\",\n \"id\": \"phone1\"\n }\n ]\n },\n \"locations\": {\n \"data\": [\n {\n \"type\": \"location\",\n \"id\": \"loc1\"\n }\n ]\n },\n \"people\": {\n \"data\": [\n {\n \"type\": \"people\",\n \"id\": \"people1\",\n \"meta\": {\n \"relationship_type\": \"owner\"\n }\n }\n ]\n },\n \"parents\": {\n \"data\": {\n \"type\": \"company\",\n \"id\": \"parent_company1\"\n }\n },\n \"subsidiaries\": {\n \"data\": [\n {\n \"type\": \"company\",\n \"id\": \"subsidiary1\"\n }\n ]\n },\n \"workspaces\": {\n \"data\": [\n {\n \"type\": \"workspace\",\n \"id\": \"workspace_tenant\"\n }\n ]\n }\n },\n \"included\": [\n {\n \"type\": \"people\",\n \"id\": \"people1\",\n \"attributes\": {\n \"first_name\": \"John\",\n \"last_name\": \"Doe\",\n \"full_name\": \"John Doe\"\n }\n },\n {\n \"type\": \"media\",\n \"id\": \"media1\",\n \"attributes\": {\n \"file_name\": \"company_logo.png\",\n \"media_type\": \"logo\",\n \"is_primary\": true\n }\n },\n {\n \"type\": \"web_link\",\n \"id\": \"sl1\",\n \"attributes\": {\n \"url\": \"https://www.linkedin.com/company/acme\",\n \"platform\": \"linkedin\"\n }\n },\n {\n \"type\": \"email\",\n \"id\": \"email1\",\n \"attributes\": {\n \"value\": \"contact@acme.com\",\n \"label\": \"work\",\n \"is_primary\": true\n }\n },\n {\n \"type\": \"phone\",\n \"id\": \"phone1\",\n \"attributes\": {\n \"e164_number\": \"+33123456789\",\n \"label\": \"work\",\n \"is_primary\": true\n }\n },\n {\n \"type\": \"location\",\n \"id\": \"loc1\",\n \"attributes\": {\n \"street\": \"123 Tech Street\",\n \"city\": \"Berlin\",\n \"postal_code\": \"10115\",\n \"country\": \"DE\",\n \"is_primary\": true\n }\n },\n {\n \"type\": \"workspace\",\n \"id\": \"workspace_tenant\",\n \"attributes\": {\n \"name\": \"Main Workspace\",\n \"description\": \"Primary workspace for ACME operations\"\n }\n },\n {\n \"type\": \"company\",\n \"id\": \"parent_company1\",\n \"attributes\": {\n \"name\": \"ACME Global Holdings\",\n \"description\": \"Parent company of ACME\",\n \"registration\": {\n \"registered_name\": \"ACME Global Holdings GmbH\"\n }\n }\n },\n {\n \"type\": \"company\",\n \"id\": \"subsidiary1\",\n \"attributes\": {\n \"name\": \"ACME France\",\n \"description\": \"French subsidiary of ACME\",\n \"registration\": {\n \"registered_name\": \"ACME France SAS\"\n }\n }\n },\n {\n \"type\": \"document\",\n \"id\": \"550e8400-e29b-41d4-a716-446655440016\",\n \"attributes\": {\n \"name\": \"company_registration.pdf\",\n \"file_size\": 245678,\n \"content_type\": \"application/pdf\",\n \"created_at\": \"2025-09-25T10:00:00.000Z\"\n }\n }\n ]\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "<authorization>")
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.patch("https://api.wellapp.ai/v1/companies/{id}")
.header("Authorization", "<authorization>")
.header("Content-Type", "application/json")
.body("{\n \"type\": \"company\",\n \"attributes\": {\n \"description\": \"Enterprise open source solutions company.\",\n \"locale\": \"en\",\n \"domain_name_primary_link_url\": \"acme.com\",\n \"tax_id\": {\n \"value\": \"DE123456789\",\n \"type\": \"VAT\"\n },\n \"registration\": {\n \"trade_name\": \"TechSol\",\n \"registered_name\": \"Tech Solutions GmbH\"\n },\n \"registration_number\": {\n \"business_type\": \"GmbH\",\n \"value\": \"HRB 123456\",\n \"registry_name\": \"Handelsregister Berlin\",\n \"registry_country\": \"DE\"\n }\n },\n \"relationships\": {\n \"created_by\": {\n \"data\": {\n \"type\": \"people\",\n \"id\": \"people1\"\n }\n },\n \"media\": {\n \"data\": [\n {\n \"type\": \"media\",\n \"id\": \"media1\"\n }\n ]\n },\n \"web_links\": {\n \"data\": [\n {\n \"type\": \"web_link\",\n \"id\": \"sl1\"\n }\n ]\n },\n \"emails\": {\n \"data\": [\n {\n \"type\": \"email\",\n \"id\": \"email1\"\n }\n ]\n },\n \"phones\": {\n \"data\": [\n {\n \"type\": \"phone\",\n \"id\": \"phone1\"\n }\n ]\n },\n \"locations\": {\n \"data\": [\n {\n \"type\": \"location\",\n \"id\": \"loc1\"\n }\n ]\n },\n \"people\": {\n \"data\": [\n {\n \"type\": \"people\",\n \"id\": \"people1\",\n \"meta\": {\n \"relationship_type\": \"owner\"\n }\n }\n ]\n },\n \"parents\": {\n \"data\": {\n \"type\": \"company\",\n \"id\": \"parent_company1\"\n }\n },\n \"subsidiaries\": {\n \"data\": [\n {\n \"type\": \"company\",\n \"id\": \"subsidiary1\"\n }\n ]\n },\n \"workspaces\": {\n \"data\": [\n {\n \"type\": \"workspace\",\n \"id\": \"workspace_tenant\"\n }\n ]\n }\n },\n \"included\": [\n {\n \"type\": \"people\",\n \"id\": \"people1\",\n \"attributes\": {\n \"first_name\": \"John\",\n \"last_name\": \"Doe\",\n \"full_name\": \"John Doe\"\n }\n },\n {\n \"type\": \"media\",\n \"id\": \"media1\",\n \"attributes\": {\n \"file_name\": \"company_logo.png\",\n \"media_type\": \"logo\",\n \"is_primary\": true\n }\n },\n {\n \"type\": \"web_link\",\n \"id\": \"sl1\",\n \"attributes\": {\n \"url\": \"https://www.linkedin.com/company/acme\",\n \"platform\": \"linkedin\"\n }\n },\n {\n \"type\": \"email\",\n \"id\": \"email1\",\n \"attributes\": {\n \"value\": \"contact@acme.com\",\n \"label\": \"work\",\n \"is_primary\": true\n }\n },\n {\n \"type\": \"phone\",\n \"id\": \"phone1\",\n \"attributes\": {\n \"e164_number\": \"+33123456789\",\n \"label\": \"work\",\n \"is_primary\": true\n }\n },\n {\n \"type\": \"location\",\n \"id\": \"loc1\",\n \"attributes\": {\n \"street\": \"123 Tech Street\",\n \"city\": \"Berlin\",\n \"postal_code\": \"10115\",\n \"country\": \"DE\",\n \"is_primary\": true\n }\n },\n {\n \"type\": \"workspace\",\n \"id\": \"workspace_tenant\",\n \"attributes\": {\n \"name\": \"Main Workspace\",\n \"description\": \"Primary workspace for ACME operations\"\n }\n },\n {\n \"type\": \"company\",\n \"id\": \"parent_company1\",\n \"attributes\": {\n \"name\": \"ACME Global Holdings\",\n \"description\": \"Parent company of ACME\",\n \"registration\": {\n \"registered_name\": \"ACME Global Holdings GmbH\"\n }\n }\n },\n {\n \"type\": \"company\",\n \"id\": \"subsidiary1\",\n \"attributes\": {\n \"name\": \"ACME France\",\n \"description\": \"French subsidiary of ACME\",\n \"registration\": {\n \"registered_name\": \"ACME France SAS\"\n }\n }\n },\n {\n \"type\": \"document\",\n \"id\": \"550e8400-e29b-41d4-a716-446655440016\",\n \"attributes\": {\n \"name\": \"company_registration.pdf\",\n \"file_size\": 245678,\n \"content_type\": \"application/pdf\",\n \"created_at\": \"2025-09-25T10:00:00.000Z\"\n }\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.wellapp.ai/v1/companies/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = '<authorization>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"type\": \"company\",\n \"attributes\": {\n \"description\": \"Enterprise open source solutions company.\",\n \"locale\": \"en\",\n \"domain_name_primary_link_url\": \"acme.com\",\n \"tax_id\": {\n \"value\": \"DE123456789\",\n \"type\": \"VAT\"\n },\n \"registration\": {\n \"trade_name\": \"TechSol\",\n \"registered_name\": \"Tech Solutions GmbH\"\n },\n \"registration_number\": {\n \"business_type\": \"GmbH\",\n \"value\": \"HRB 123456\",\n \"registry_name\": \"Handelsregister Berlin\",\n \"registry_country\": \"DE\"\n }\n },\n \"relationships\": {\n \"created_by\": {\n \"data\": {\n \"type\": \"people\",\n \"id\": \"people1\"\n }\n },\n \"media\": {\n \"data\": [\n {\n \"type\": \"media\",\n \"id\": \"media1\"\n }\n ]\n },\n \"web_links\": {\n \"data\": [\n {\n \"type\": \"web_link\",\n \"id\": \"sl1\"\n }\n ]\n },\n \"emails\": {\n \"data\": [\n {\n \"type\": \"email\",\n \"id\": \"email1\"\n }\n ]\n },\n \"phones\": {\n \"data\": [\n {\n \"type\": \"phone\",\n \"id\": \"phone1\"\n }\n ]\n },\n \"locations\": {\n \"data\": [\n {\n \"type\": \"location\",\n \"id\": \"loc1\"\n }\n ]\n },\n \"people\": {\n \"data\": [\n {\n \"type\": \"people\",\n \"id\": \"people1\",\n \"meta\": {\n \"relationship_type\": \"owner\"\n }\n }\n ]\n },\n \"parents\": {\n \"data\": {\n \"type\": \"company\",\n \"id\": \"parent_company1\"\n }\n },\n \"subsidiaries\": {\n \"data\": [\n {\n \"type\": \"company\",\n \"id\": \"subsidiary1\"\n }\n ]\n },\n \"workspaces\": {\n \"data\": [\n {\n \"type\": \"workspace\",\n \"id\": \"workspace_tenant\"\n }\n ]\n }\n },\n \"included\": [\n {\n \"type\": \"people\",\n \"id\": \"people1\",\n \"attributes\": {\n \"first_name\": \"John\",\n \"last_name\": \"Doe\",\n \"full_name\": \"John Doe\"\n }\n },\n {\n \"type\": \"media\",\n \"id\": \"media1\",\n \"attributes\": {\n \"file_name\": \"company_logo.png\",\n \"media_type\": \"logo\",\n \"is_primary\": true\n }\n },\n {\n \"type\": \"web_link\",\n \"id\": \"sl1\",\n \"attributes\": {\n \"url\": \"https://www.linkedin.com/company/acme\",\n \"platform\": \"linkedin\"\n }\n },\n {\n \"type\": \"email\",\n \"id\": \"email1\",\n \"attributes\": {\n \"value\": \"contact@acme.com\",\n \"label\": \"work\",\n \"is_primary\": true\n }\n },\n {\n \"type\": \"phone\",\n \"id\": \"phone1\",\n \"attributes\": {\n \"e164_number\": \"+33123456789\",\n \"label\": \"work\",\n \"is_primary\": true\n }\n },\n {\n \"type\": \"location\",\n \"id\": \"loc1\",\n \"attributes\": {\n \"street\": \"123 Tech Street\",\n \"city\": \"Berlin\",\n \"postal_code\": \"10115\",\n \"country\": \"DE\",\n \"is_primary\": true\n }\n },\n {\n \"type\": \"workspace\",\n \"id\": \"workspace_tenant\",\n \"attributes\": {\n \"name\": \"Main Workspace\",\n \"description\": \"Primary workspace for ACME operations\"\n }\n },\n {\n \"type\": \"company\",\n \"id\": \"parent_company1\",\n \"attributes\": {\n \"name\": \"ACME Global Holdings\",\n \"description\": \"Parent company of ACME\",\n \"registration\": {\n \"registered_name\": \"ACME Global Holdings GmbH\"\n }\n }\n },\n {\n \"type\": \"company\",\n \"id\": \"subsidiary1\",\n \"attributes\": {\n \"name\": \"ACME France\",\n \"description\": \"French subsidiary of ACME\",\n \"registration\": {\n \"registered_name\": \"ACME France SAS\"\n }\n }\n },\n {\n \"type\": \"document\",\n \"id\": \"550e8400-e29b-41d4-a716-446655440016\",\n \"attributes\": {\n \"name\": \"company_registration.pdf\",\n \"file_size\": 245678,\n \"content_type\": \"application/pdf\",\n \"created_at\": \"2025-09-25T10:00:00.000Z\"\n }\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": {
"type": "company",
"id": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
"attributes": {
"description": "Enterprise open source solutions company.",
"locale": "en",
"domain_name_primary_link_url": "acme.com",
"tax_id": {
"value": "DE123456789",
"type": "VAT"
},
"registration": {
"trade_name": "TechSol",
"registered_name": "Tech Solutions GmbH"
},
"registration_number": {
"business_type": "GmbH",
"value": "HRB 123456",
"registry_name": "Handelsregister Berlin",
"registry_country": "DE"
},
"created_at": "2025-09-30T14:30:00.000Z",
"updated_at": "2025-09-30T14:30:00.000Z"
},
"relationships": {
"created_by": {
"data": {
"type": "people",
"id": "6ba7b810-9dad-11d1-80b4-00c04fd430c8"
}
},
"media": {
"data": [
{
"type": "media",
"id": "550e8400-e29b-41d4-a716-446655440010"
}
]
},
"web_links": {
"data": [
{
"type": "web_link",
"id": "550e8400-e29b-41d4-a716-446655440011"
}
]
},
"emails": {
"data": [
{
"type": "email",
"id": "550e8400-e29b-41d4-a716-446655440012"
}
]
},
"phones": {
"data": [
{
"type": "phone",
"id": "550e8400-e29b-41d4-a716-446655440013"
}
]
},
"locations": {
"data": [
{
"type": "location",
"id": "550e8400-e29b-41d4-a716-446655440015"
}
]
},
"people": {
"data": [
{
"type": "people",
"id": "6ba7b810-9dad-11d1-80b4-00c04fd430c8"
}
]
},
"documents": {
"data": [
{
"type": "document",
"id": "550e8400-e29b-41d4-a716-446655440016"
}
]
},
"parents": {
"data": {
"type": "company",
"id": "550e8400-e29b-41d4-a716-446655440019"
}
},
"subsidiaries": {
"data": [
{
"type": "company",
"id": "550e8400-e29b-41d4-a716-446655440020"
}
]
},
"workspaces": {
"data": [
{
"type": "workspace",
"id": "550e8400-e29b-41d4-a716-446655440001"
}
]
}
}
},
"included": [
{
"type": "people",
"id": "6ba7b810-9dad-11d1-80b4-00c04fd430c8",
"attributes": {
"first_name": "Alexandre",
"last_name": "Dubois",
"full_name": "Alexandre Dubois",
"relationship_type": "owner"
}
},
{
"type": "workspace",
"id": "550e8400-e29b-41d4-a716-446655440001",
"attributes": {
"name": "Development Team",
"description": "Main development workspace for software engineering projects and client solutions",
"created_at": "2025-09-10T08:00:00.000Z",
"updated_at": "2025-09-15T16:45:00.000Z"
}
},
{
"type": "media",
"id": "550e8400-e29b-41d4-a716-446655440010",
"attributes": {
"file_name": "company_logo.png",
"content_type": "image/png",
"file_size": 15678
}
},
{
"type": "web_link",
"id": "550e8400-e29b-41d4-a716-446655440011",
"attributes": {
"url": "https://www.linkedin.com/company/acme",
"platform": "linkedin"
}
},
{
"type": "email",
"id": "550e8400-e29b-41d4-a716-446655440012",
"attributes": {
"value": "contact@acme.com",
"label": "work",
"is_primary": true
}
},
{
"type": "phone",
"id": "550e8400-e29b-41d4-a716-446655440013",
"attributes": {
"e164_number": "+4930123456789",
"label": "work",
"is_primary": true
}
},
{
"type": "location",
"id": "550e8400-e29b-41d4-a716-446655440015",
"attributes": {
"street": "Unter den Linden 1",
"city": "Berlin",
"postal_code": "10117",
"country": "DE",
"is_primary": true
}
},
{
"type": "document",
"id": "550e8400-e29b-41d4-a716-446655440016",
"attributes": {
"name": "company_registration.pdf",
"file_size": 245678,
"content_type": "application/pdf",
"created_at": "2025-09-25T10:00:00.000Z"
}
},
{
"type": "company",
"id": "550e8400-e29b-41d4-a716-446655440019",
"attributes": {
"name": "ACME Global Holdings",
"description": "Parent company of ACME",
"registration": {
"registered_name": "ACME Global Holdings GmbH"
}
}
},
{
"type": "company",
"id": "550e8400-e29b-41d4-a716-446655440020",
"attributes": {
"name": "ACME France",
"description": "French subsidiary of ACME",
"registration": {
"registered_name": "ACME France SAS"
}
}
}
]
}{
"code": "SCHEMA_VALIDATION_ERROR",
"status": 400,
"title": "Validation Error",
"message": "The request is invalid",
"meta": {
"log_id": "65c669d4-679c-4a8b-b8c0-fbe37699bb5b"
},
"details": [
{
"instancePath": "<string>",
"schemaPath": "<string>",
"keyword": "<string>",
"params": {},
"message": "<string>"
}
]
}{
"code": "UNAUTHORIZED",
"status": 401,
"title": "Unauthorized",
"message": "You are not authorized to access this resource",
"meta": {
"log_id": "65c669d4-679c-4a8b-b8c0-fbe37699bb5b"
}
}{
"code": "COMPANY_NOT_FOUND",
"status": 404,
"title": "Company Not Found",
"message": "The requested company could not be found",
"meta": {
"log_id": "65c669d4-679c-4a8b-b8c0-fbe37699bb5b"
}
}⌘I