Create or update company
curl --request POST \
--url https://api.stardex.ai/v1/companies \
--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,
"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"
],
"add_company_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"remove_company_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"clear_all": true
}
]
}
'import requests
url = "https://api.stardex.ai/v1/companies"
payload = {
"name": "<string>",
"domain": "<string>",
"linkedin_url": "<string>",
"description": "<string>",
"location": "<string>",
"phone": "<string>",
"is_client": True,
"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"],
"add_company_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"remove_company_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"clear_all": True
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
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,
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'],
add_company_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
remove_company_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
clear_all: true
}
]
})
};
fetch('https://api.stardex.ai/v1/companies', 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",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'domain' => '<string>',
'linkedin_url' => '<string>',
'description' => '<string>',
'location' => '<string>',
'phone' => '<string>',
'is_client' => true,
'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'
],
'add_company_ids' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'remove_company_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"
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 \"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 \"add_company_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"remove_company_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"clear_all\": true\n }\n ]\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.stardex.ai/v1/companies")
.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 \"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 \"add_company_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"remove_company_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")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.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 \"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 \"add_company_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"remove_company_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": {
"id": "456e7890-e12b-34d5-a678-901234567890",
"name": "Acme Corp",
"domain": "acme.com",
"linkedin_url": "https://www.linkedin.com/company/acme",
"linkedin_id": 12345678,
"location": "San Francisco, CA",
"phone": "+1-555-0100",
"description": "Leading technology solutions provider specializing in enterprise SaaS.",
"is_client": true,
"do_not_contact": true,
"do_not_contact_metadata": {
"reason": "Active client — protect from sourcing",
"do_not_contact_added_by": "234e5678-e90a-12b3-c456-789012345678",
"date_added": "2024-06-01T09:00:00Z",
"last_updated_at": "2024-06-15T14:30:00Z",
"last_updated_by": "234e5678-e90a-12b3-c456-789012345678",
"expiration_date": "2024-09-15T00:00:00Z"
},
"created_at": "2024-01-05T10:00:00Z",
"updated_at": "2024-06-15T14:30:00Z",
"updated_by": {
"id": "234e5678-e90a-12b3-c456-789012345678",
"first_name": "Jane",
"last_name": "Smith"
},
"date_of_last_engagement": "2024-06-15T14:30:00Z",
"client_status": {
"id": "789e0123-e45f-67a8-b901-234567890123",
"name": "Active"
},
"enriched_company": {
"id": "ec123456-7890-abcd-ef01-234567890abc",
"name": "Acme Corp",
"domain": "acme.com",
"linkedin_url": "https://www.linkedin.com/company/acme"
},
"owners": [
{
"id": "234e5678-e90a-12b3-c456-789012345678",
"first_name": "Jane",
"last_name": "Smith"
}
],
"custom_fields": [
{
"attribute_id": "e5f6a7b8-c9d0-1234-efab-567890123456",
"attribute_name": "Industry",
"data_type": "single-select",
"value": null,
"tag": {
"id": "f6a7b8c9-d0e1-2345-fabc-678901234567",
"name": "Technology"
},
"team_member": null,
"company": null
},
{
"attribute_id": "a7b8c9d0-e1f2-3456-abcd-789012345678",
"attribute_name": "Account Owner",
"data_type": "multi-team-member",
"value": null,
"tag": null,
"team_member": {
"id": "234e5678-e90a-12b3-c456-789012345678",
"name": "Jane Smith"
},
"company": null
},
{
"attribute_id": "b8c9d0e1-f2a3-4567-bcde-890123456789",
"attribute_name": "Partner Companies",
"data_type": "multi-company",
"value": null,
"tag": null,
"team_member": null,
"company": {
"id": "456e7890-e12b-34d5-a678-901234567890",
"name": "Acme Corp"
}
}
]
}
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>"
}
}Companies
Create or update company
Create a new company record or update an existing one. Matching is done by LinkedIn URL, domain, or name. At least one of name, domain, or linkedin_url must be provided.
Custom fields: Pass custom_fields to set custom attribute values. Get attribute definitions from GET /v1/custom-fields/companies.
POST
/
v1
/
companies
Create or update company
curl --request POST \
--url https://api.stardex.ai/v1/companies \
--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,
"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"
],
"add_company_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"remove_company_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"clear_all": true
}
]
}
'import requests
url = "https://api.stardex.ai/v1/companies"
payload = {
"name": "<string>",
"domain": "<string>",
"linkedin_url": "<string>",
"description": "<string>",
"location": "<string>",
"phone": "<string>",
"is_client": True,
"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"],
"add_company_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"remove_company_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"clear_all": True
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
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,
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'],
add_company_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
remove_company_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
clear_all: true
}
]
})
};
fetch('https://api.stardex.ai/v1/companies', 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",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'domain' => '<string>',
'linkedin_url' => '<string>',
'description' => '<string>',
'location' => '<string>',
'phone' => '<string>',
'is_client' => true,
'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'
],
'add_company_ids' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'remove_company_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"
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 \"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 \"add_company_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"remove_company_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"clear_all\": true\n }\n ]\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.stardex.ai/v1/companies")
.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 \"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 \"add_company_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"remove_company_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")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.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 \"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 \"add_company_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"remove_company_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": {
"id": "456e7890-e12b-34d5-a678-901234567890",
"name": "Acme Corp",
"domain": "acme.com",
"linkedin_url": "https://www.linkedin.com/company/acme",
"linkedin_id": 12345678,
"location": "San Francisco, CA",
"phone": "+1-555-0100",
"description": "Leading technology solutions provider specializing in enterprise SaaS.",
"is_client": true,
"do_not_contact": true,
"do_not_contact_metadata": {
"reason": "Active client — protect from sourcing",
"do_not_contact_added_by": "234e5678-e90a-12b3-c456-789012345678",
"date_added": "2024-06-01T09:00:00Z",
"last_updated_at": "2024-06-15T14:30:00Z",
"last_updated_by": "234e5678-e90a-12b3-c456-789012345678",
"expiration_date": "2024-09-15T00:00:00Z"
},
"created_at": "2024-01-05T10:00:00Z",
"updated_at": "2024-06-15T14:30:00Z",
"updated_by": {
"id": "234e5678-e90a-12b3-c456-789012345678",
"first_name": "Jane",
"last_name": "Smith"
},
"date_of_last_engagement": "2024-06-15T14:30:00Z",
"client_status": {
"id": "789e0123-e45f-67a8-b901-234567890123",
"name": "Active"
},
"enriched_company": {
"id": "ec123456-7890-abcd-ef01-234567890abc",
"name": "Acme Corp",
"domain": "acme.com",
"linkedin_url": "https://www.linkedin.com/company/acme"
},
"owners": [
{
"id": "234e5678-e90a-12b3-c456-789012345678",
"first_name": "Jane",
"last_name": "Smith"
}
],
"custom_fields": [
{
"attribute_id": "e5f6a7b8-c9d0-1234-efab-567890123456",
"attribute_name": "Industry",
"data_type": "single-select",
"value": null,
"tag": {
"id": "f6a7b8c9-d0e1-2345-fabc-678901234567",
"name": "Technology"
},
"team_member": null,
"company": null
},
{
"attribute_id": "a7b8c9d0-e1f2-3456-abcd-789012345678",
"attribute_name": "Account Owner",
"data_type": "multi-team-member",
"value": null,
"tag": null,
"team_member": {
"id": "234e5678-e90a-12b3-c456-789012345678",
"name": "Jane Smith"
},
"company": null
},
{
"attribute_id": "b8c9d0e1-f2a3-4567-bcde-890123456789",
"attribute_name": "Partner Companies",
"data_type": "multi-company",
"value": null,
"tag": null,
"team_member": null,
"company": {
"id": "456e7890-e12b-34d5-a678-901234567890",
"name": "Acme Corp"
}
}
]
}
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>"
}
}Authorizations
Authenticate with a Bearer token: API key, OAuth token, or session token.
Body
application/json
Company name.
Website domain.
LinkedIn company page URL.
Company description.
Company headquarters location.
Company phone number.
Whether to mark the company as a client.
Custom field values to set. Get attribute definitions from GET /v1/custom-fields/companies.
Show child attributes
Show child attributes
Was this page helpful?
⌘I