Skip to main content
PATCH
/
v1
/
companies
/
{id}
Update company
curl --request PATCH \
  --url https://api.stardex.ai/v1/companies/{id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "domain": "<string>",
  "linkedin_url": "<string>",
  "description": "<string>",
  "location": "<string>",
  "phone": "<string>",
  "is_client": true,
  "client_status_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "do_not_contact": true,
  "do_not_contact_reason": "<string>",
  "do_not_contact_expiration_date": "2023-11-07T05:31:56Z",
  "custom_fields": [
    {
      "attribute_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "value": "<string>",
      "add_values": [
        "<string>"
      ],
      "remove_values": [
        "<string>"
      ],
      "add_team_member_ids": [
        "3c90c3cc-0d44-4b50-8888-8dd25736052a"
      ],
      "remove_team_member_ids": [
        "3c90c3cc-0d44-4b50-8888-8dd25736052a"
      ],
      "clear_all": true
    }
  ]
}
'
import requests

url = "https://api.stardex.ai/v1/companies/{id}"

payload = {
"name": "<string>",
"domain": "<string>",
"linkedin_url": "<string>",
"description": "<string>",
"location": "<string>",
"phone": "<string>",
"is_client": True,
"client_status_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"do_not_contact": True,
"do_not_contact_reason": "<string>",
"do_not_contact_expiration_date": "2023-11-07T05:31:56Z",
"custom_fields": [
{
"attribute_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"value": "<string>",
"add_values": ["<string>"],
"remove_values": ["<string>"],
"add_team_member_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"remove_team_member_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"clear_all": True
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}

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

print(response.text)
const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
domain: '<string>',
linkedin_url: '<string>',
description: '<string>',
location: '<string>',
phone: '<string>',
is_client: true,
client_status_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
do_not_contact: true,
do_not_contact_reason: '<string>',
do_not_contact_expiration_date: '2023-11-07T05:31:56Z',
custom_fields: [
{
attribute_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
value: '<string>',
add_values: ['<string>'],
remove_values: ['<string>'],
add_team_member_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
remove_team_member_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
clear_all: true
}
]
})
};

fetch('https://api.stardex.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.stardex.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([
'name' => '<string>',
'domain' => '<string>',
'linkedin_url' => '<string>',
'description' => '<string>',
'location' => '<string>',
'phone' => '<string>',
'is_client' => true,
'client_status_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'do_not_contact' => true,
'do_not_contact_reason' => '<string>',
'do_not_contact_expiration_date' => '2023-11-07T05:31:56Z',
'custom_fields' => [
[
'attribute_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'value' => '<string>',
'add_values' => [
'<string>'
],
'remove_values' => [
'<string>'
],
'add_team_member_ids' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'remove_team_member_ids' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'clear_all' => true
]
]
]),
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://api.stardex.ai/v1/companies/{id}"

payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"domain\": \"<string>\",\n \"linkedin_url\": \"<string>\",\n \"description\": \"<string>\",\n \"location\": \"<string>\",\n \"phone\": \"<string>\",\n \"is_client\": true,\n \"client_status_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"do_not_contact\": true,\n \"do_not_contact_reason\": \"<string>\",\n \"do_not_contact_expiration_date\": \"2023-11-07T05:31:56Z\",\n \"custom_fields\": [\n {\n \"attribute_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"value\": \"<string>\",\n \"add_values\": [\n \"<string>\"\n ],\n \"remove_values\": [\n \"<string>\"\n ],\n \"add_team_member_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"remove_team_member_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"clear_all\": true\n }\n ]\n}")

req, _ := http.NewRequest("PATCH", 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.patch("https://api.stardex.ai/v1/companies/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"domain\": \"<string>\",\n \"linkedin_url\": \"<string>\",\n \"description\": \"<string>\",\n \"location\": \"<string>\",\n \"phone\": \"<string>\",\n \"is_client\": true,\n \"client_status_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"do_not_contact\": true,\n \"do_not_contact_reason\": \"<string>\",\n \"do_not_contact_expiration_date\": \"2023-11-07T05:31:56Z\",\n \"custom_fields\": [\n {\n \"attribute_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"value\": \"<string>\",\n \"add_values\": [\n \"<string>\"\n ],\n \"remove_values\": [\n \"<string>\"\n ],\n \"add_team_member_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"remove_team_member_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"clear_all\": true\n }\n ]\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.stardex.ai/v1/companies/{id}")

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

request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"domain\": \"<string>\",\n \"linkedin_url\": \"<string>\",\n \"description\": \"<string>\",\n \"location\": \"<string>\",\n \"phone\": \"<string>\",\n \"is_client\": true,\n \"client_status_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"do_not_contact\": true,\n \"do_not_contact_reason\": \"<string>\",\n \"do_not_contact_expiration_date\": \"2023-11-07T05:31:56Z\",\n \"custom_fields\": [\n {\n \"attribute_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"value\": \"<string>\",\n \"add_values\": [\n \"<string>\"\n ],\n \"remove_values\": [\n \"<string>\"\n ],\n \"add_team_member_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"remove_team_member_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"clear_all\": true\n }\n ]\n}"

response = http.request(request)
puts response.read_body
{
  "success": true,
  "data": {
    "message": "Company updated successfully"
  }
}
{
"success": false,
"error": {
"code": "<string>",
"message": "<string>"
}
}
{
"success": false,
"error": {
"code": "<string>",
"message": "<string>"
}
}
{
"success": false,
"error": {
"code": "<string>",
"message": "<string>"
}
}

Authorizations

Authorization
string
header
required

Authenticate with a Bearer token: API key, OAuth token, or session token.

Path Parameters

id
string
required

Company ID

Body

application/json
name
string

Company name.

domain
string

Website domain.

linkedin_url
string

LinkedIn company page URL.

description
string

Company description.

location
string

Company headquarters location.

phone
string

Company phone number.

is_client
boolean

Whether to mark the company as a client.

client_status_id
string<uuid> | null

Client status UUID, or null to clear. Use GET /v1/companies/statuses to get available status IDs. Setting a status automatically marks the company as a client.

do_not_contact
boolean

Set to true to mark this company as do-not-contact (blocks outreach to anyone whose current company is this one), or false to clear the flag.

do_not_contact_reason
string

Free-text reason for the do-not-contact flag (e.g. "Active client — protect from sourcing"). Only meaningful when do_not_contact is true. When omitted, any existing reason is preserved.

do_not_contact_expiration_date
string<date-time> | null

ISO 8601 timestamp when do-not-contact should automatically expire. Only meaningful when do_not_contact is true. Pass an explicit date to set a custom expiration, or null for an indefinite do-not-contact. When omitted on a NEW do-not-contact flag, the team default from auth_organization_settings.auto_dnc_company_on_search_days is used (computed as that many days from now); if no default is configured, the do-not-contact is indefinite. When omitted on an existing do-not-contact flag, the current expiration is preserved.

custom_fields
object[]

Custom field values to update. Get attribute definitions from GET /v1/custom-fields/companies.

Response

Company updated

success
enum<boolean>
required
Available options:
true
data
object
required