Saved Searches
Create a saved search
Creates a new saved search for the authenticated user.
POST
/
saved-searches
Create a saved search
curl --request POST \
--url https://api.seamless.ai/api/client/v2/saved-searches \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "VP Engineering in SF",
"type": "contacts",
"values": {},
"sortColumn": "<string>",
"sortOrder": "desc",
"tagIds": [
123
],
"numResultsApproved": 50
}
'import requests
url = "https://api.seamless.ai/api/client/v2/saved-searches"
payload = {
"name": "VP Engineering in SF",
"type": "contacts",
"values": {},
"sortColumn": "<string>",
"sortOrder": "desc",
"tagIds": [123],
"numResultsApproved": 50
}
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: 'VP Engineering in SF',
type: 'contacts',
values: {},
sortColumn: '<string>',
sortOrder: 'desc',
tagIds: [123],
numResultsApproved: 50
})
};
fetch('https://api.seamless.ai/api/client/v2/saved-searches', 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/saved-searches",
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' => 'VP Engineering in SF',
'type' => 'contacts',
'values' => [
],
'sortColumn' => '<string>',
'sortOrder' => 'desc',
'tagIds' => [
123
],
'numResultsApproved' => 50
]),
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/saved-searches"
payload := strings.NewReader("{\n \"name\": \"VP Engineering in SF\",\n \"type\": \"contacts\",\n \"values\": {},\n \"sortColumn\": \"<string>\",\n \"sortOrder\": \"desc\",\n \"tagIds\": [\n 123\n ],\n \"numResultsApproved\": 50\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/saved-searches")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"VP Engineering in SF\",\n \"type\": \"contacts\",\n \"values\": {},\n \"sortColumn\": \"<string>\",\n \"sortOrder\": \"desc\",\n \"tagIds\": [\n 123\n ],\n \"numResultsApproved\": 50\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.seamless.ai/api/client/v2/saved-searches")
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\": \"VP Engineering in SF\",\n \"type\": \"contacts\",\n \"values\": {},\n \"sortColumn\": \"<string>\",\n \"sortOrder\": \"desc\",\n \"tagIds\": [\n 123\n ],\n \"numResultsApproved\": 50\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"savedSearchId": "789",
"name": "<string>",
"type": "contacts",
"values": {},
"sortColumn": "<string>",
"sortOrder": "<string>",
"tagIds": [
123
],
"numResultsApproved": 123,
"gptRequestIdNLS": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
}{
"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
Display name of the saved search
Example:
"VP Engineering in SF"
Entity type the search targets
Available options:
contacts, companies Example:
"contacts"
Search criteria/filters object
Column used for sorting results
Sort direction
Example:
"desc"
IDs of lists/tags to associate with the search
Number of approved results
Required range:
x >= 0Example:
50
Was this page helpful?
⌘I
Create a saved search
curl --request POST \
--url https://api.seamless.ai/api/client/v2/saved-searches \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "VP Engineering in SF",
"type": "contacts",
"values": {},
"sortColumn": "<string>",
"sortOrder": "desc",
"tagIds": [
123
],
"numResultsApproved": 50
}
'import requests
url = "https://api.seamless.ai/api/client/v2/saved-searches"
payload = {
"name": "VP Engineering in SF",
"type": "contacts",
"values": {},
"sortColumn": "<string>",
"sortOrder": "desc",
"tagIds": [123],
"numResultsApproved": 50
}
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: 'VP Engineering in SF',
type: 'contacts',
values: {},
sortColumn: '<string>',
sortOrder: 'desc',
tagIds: [123],
numResultsApproved: 50
})
};
fetch('https://api.seamless.ai/api/client/v2/saved-searches', 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/saved-searches",
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' => 'VP Engineering in SF',
'type' => 'contacts',
'values' => [
],
'sortColumn' => '<string>',
'sortOrder' => 'desc',
'tagIds' => [
123
],
'numResultsApproved' => 50
]),
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/saved-searches"
payload := strings.NewReader("{\n \"name\": \"VP Engineering in SF\",\n \"type\": \"contacts\",\n \"values\": {},\n \"sortColumn\": \"<string>\",\n \"sortOrder\": \"desc\",\n \"tagIds\": [\n 123\n ],\n \"numResultsApproved\": 50\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/saved-searches")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"VP Engineering in SF\",\n \"type\": \"contacts\",\n \"values\": {},\n \"sortColumn\": \"<string>\",\n \"sortOrder\": \"desc\",\n \"tagIds\": [\n 123\n ],\n \"numResultsApproved\": 50\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.seamless.ai/api/client/v2/saved-searches")
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\": \"VP Engineering in SF\",\n \"type\": \"contacts\",\n \"values\": {},\n \"sortColumn\": \"<string>\",\n \"sortOrder\": \"desc\",\n \"tagIds\": [\n 123\n ],\n \"numResultsApproved\": 50\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"savedSearchId": "789",
"name": "<string>",
"type": "contacts",
"values": {},
"sortColumn": "<string>",
"sortOrder": "<string>",
"tagIds": [
123
],
"numResultsApproved": 123,
"gptRequestIdNLS": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}