Update Contacts
Applies an update to a batch of your saved contacts. Only the properties you send are changed; the rest of each contact is left alone.
The only supported update today is contact list membership, via listIds and listAction.
To put contacts into a list as part of researching them, pass listIds to /contacts/research instead.
curl --request POST \
--url https://api.seamless.ai/api/client/v2/contacts \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"contactIds": [
1,
2,
3
],
"listIds": [
1234
],
"listAction": "add"
}
'import requests
url = "https://api.seamless.ai/api/client/v2/contacts"
payload = {
"contactIds": [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({contactIds: [1, 2, 3], listIds: [1234], listAction: 'add'})
};
fetch('https://api.seamless.ai/api/client/v2/contacts', 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/contacts",
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([
'contactIds' => [
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/contacts"
payload := strings.NewReader("{\n \"contactIds\": [\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/contacts")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"contactIds\": [\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/contacts")
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 \"contactIds\": [\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": {
"contactIds": [
1,
2
],
"skippedContactIds": [
3
],
"listIds": [
1234
],
"listAction": "add"
}
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}Authorizations
The access token received from the authorization server in the OAuth 2.0 flow.
- Authorization URL
- https://login.seamless.ai/oauth/authorize
- Token URL
- https://api.seamless.ai/api/client/v2/oauth/accessToken
Body
IDs of the saved contacts to update.
1 - 500 elements[1, 2, 3]
IDs of the contact 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 contacts.
50[1234]
How listIds is applied. add keeps the lists the contacts are already in,
remove drops only the supplied lists, and replace makes the supplied lists their complete set of lists.
add, remove, replace "add"
Was this page helpful?
curl --request POST \
--url https://api.seamless.ai/api/client/v2/contacts \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"contactIds": [
1,
2,
3
],
"listIds": [
1234
],
"listAction": "add"
}
'import requests
url = "https://api.seamless.ai/api/client/v2/contacts"
payload = {
"contactIds": [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({contactIds: [1, 2, 3], listIds: [1234], listAction: 'add'})
};
fetch('https://api.seamless.ai/api/client/v2/contacts', 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/contacts",
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([
'contactIds' => [
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/contacts"
payload := strings.NewReader("{\n \"contactIds\": [\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/contacts")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"contactIds\": [\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/contacts")
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 \"contactIds\": [\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": {
"contactIds": [
1,
2
],
"skippedContactIds": [
3
],
"listIds": [
1234
],
"listAction": "add"
}
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}