Org Companies
Update Companies
Applies an update to a batch of your saved companies. Only the properties you send are changed; the rest of each company is left alone.
The only supported update today is list membership, via listIds and listAction.
POST
/
companies
Update Companies
curl --request POST \
--url https://api.seamless.ai/api/client/v2/companies \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"companyIds": [
1,
2,
3
],
"listIds": [
1234
],
"listAction": "add"
}
'import requests
url = "https://api.seamless.ai/api/client/v2/companies"
payload = {
"companyIds": [1, 2, 3],
"listIds": [1234],
"listAction": "add"
}
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({companyIds: [1, 2, 3], listIds: [1234], listAction: 'add'})
};
fetch('https://api.seamless.ai/api/client/v2/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.seamless.ai/api/client/v2/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([
'companyIds' => [
1,
2,
3
],
'listIds' => [
1234
],
'listAction' => 'add'
]),
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.seamless.ai/api/client/v2/companies"
payload := strings.NewReader("{\n \"companyIds\": [\n 1,\n 2,\n 3\n ],\n \"listIds\": [\n 1234\n ],\n \"listAction\": \"add\"\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.seamless.ai/api/client/v2/companies")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"companyIds\": [\n 1,\n 2,\n 3\n ],\n \"listIds\": [\n 1234\n ],\n \"listAction\": \"add\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.seamless.ai/api/client/v2/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 \"companyIds\": [\n 1,\n 2,\n 3\n ],\n \"listIds\": [\n 1234\n ],\n \"listAction\": \"add\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"companyIds": [
1,
2
],
"skippedCompanyIds": [
3
],
"listIds": [
1234
],
"listAction": "add"
}
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}Authorizations
OAuth2ApiKeyAuth
The access token received from the authorization server in the OAuth 2.0 flow.
Body
application/json
IDs of the saved companies to update.
Required array length:
1 - 500 elementsExample:
[1, 2, 3]
IDs of the lists to apply. The lists must already belong to you; an unknown ID fails the request.
May be empty only with listAction replace, which clears every list off the companies.
Maximum array length:
50Example:
[1234]
How listIds is applied. add keeps the lists the companies are already in,
remove drops only the supplied lists, and replace makes the supplied lists their complete set of lists.
Available options:
add, remove, replace Example:
"add"
Was this page helpful?
⌘I
Update Companies
curl --request POST \
--url https://api.seamless.ai/api/client/v2/companies \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"companyIds": [
1,
2,
3
],
"listIds": [
1234
],
"listAction": "add"
}
'import requests
url = "https://api.seamless.ai/api/client/v2/companies"
payload = {
"companyIds": [1, 2, 3],
"listIds": [1234],
"listAction": "add"
}
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({companyIds: [1, 2, 3], listIds: [1234], listAction: 'add'})
};
fetch('https://api.seamless.ai/api/client/v2/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.seamless.ai/api/client/v2/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([
'companyIds' => [
1,
2,
3
],
'listIds' => [
1234
],
'listAction' => 'add'
]),
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.seamless.ai/api/client/v2/companies"
payload := strings.NewReader("{\n \"companyIds\": [\n 1,\n 2,\n 3\n ],\n \"listIds\": [\n 1234\n ],\n \"listAction\": \"add\"\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.seamless.ai/api/client/v2/companies")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"companyIds\": [\n 1,\n 2,\n 3\n ],\n \"listIds\": [\n 1234\n ],\n \"listAction\": \"add\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.seamless.ai/api/client/v2/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 \"companyIds\": [\n 1,\n 2,\n 3\n ],\n \"listIds\": [\n 1234\n ],\n \"listAction\": \"add\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"companyIds": [
1,
2
],
"skippedCompanyIds": [
3
],
"listIds": [
1234
],
"listAction": "add"
}
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}