Create people list
curl --request POST \
--url https://app.tryspecter.com/api/v1/lists/people \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"name": "My Watchlist",
"people_ids": [
"per_34f8a8ad1f7497b83e821345",
"per_fd73fc69269b7f4d73b79def",
"per_742509725dfaa1b6b0b99acd"
]
}
'import requests
url = "https://app.tryspecter.com/api/v1/lists/people"
payload = {
"name": "My Watchlist",
"people_ids": ["per_34f8a8ad1f7497b83e821345", "per_fd73fc69269b7f4d73b79def", "per_742509725dfaa1b6b0b99acd"]
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'My Watchlist',
people_ids: [
'per_34f8a8ad1f7497b83e821345',
'per_fd73fc69269b7f4d73b79def',
'per_742509725dfaa1b6b0b99acd'
]
})
};
fetch('https://app.tryspecter.com/api/v1/lists/people', 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://app.tryspecter.com/api/v1/lists/people",
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' => 'My Watchlist',
'people_ids' => [
'per_34f8a8ad1f7497b83e821345',
'per_fd73fc69269b7f4d73b79def',
'per_742509725dfaa1b6b0b99acd'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$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://app.tryspecter.com/api/v1/lists/people"
payload := strings.NewReader("{\n \"name\": \"My Watchlist\",\n \"people_ids\": [\n \"per_34f8a8ad1f7497b83e821345\",\n \"per_fd73fc69269b7f4d73b79def\",\n \"per_742509725dfaa1b6b0b99acd\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
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://app.tryspecter.com/api/v1/lists/people")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"My Watchlist\",\n \"people_ids\": [\n \"per_34f8a8ad1f7497b83e821345\",\n \"per_fd73fc69269b7f4d73b79def\",\n \"per_742509725dfaa1b6b0b99acd\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.tryspecter.com/api/v1/lists/people")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"My Watchlist\",\n \"people_ids\": [\n \"per_34f8a8ad1f7497b83e821345\",\n \"per_fd73fc69269b7f4d73b79def\",\n \"per_742509725dfaa1b6b0b99acd\"\n ]\n}"
response = http.request(request)
puts response.read_body"a1d2434c-e089-480a-8a27-9909d2f558b4"{
"errorCode": "NO_TEAM_ADMIN",
"message": "Cannot process request without a team admin, please request a team admin is added to your account.\n"
}{
"errorCode": "API_KEY_MISSING",
"message": "No API Key was presented on the header X-API-KEY"
}{
"errorCode": "NOT_PERMITTED",
"message": "You do not have permission to access this resource."
}{
"errorCode": "<string>",
"message": "<string>"
}People Lists
Create people list
Creates a new people list shared with the API and returns its ID.
Free. This call does not consume credits.
What you need
A unique list name; optionally the person IDs to seed it.
Behaviour
- Pass
name(required); it must be unique. - Optionally seed the list with
people_ids. - Set
is_publicto share the list with your team. - Add people later via Update people list.
- The list owner is the first team admin on the account.
What you do next
- Add or remove people. Update membership with Update people list.
- Pull the list. Get its people with Get people list results.
POST
/
lists
/
people
Create people list
curl --request POST \
--url https://app.tryspecter.com/api/v1/lists/people \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"name": "My Watchlist",
"people_ids": [
"per_34f8a8ad1f7497b83e821345",
"per_fd73fc69269b7f4d73b79def",
"per_742509725dfaa1b6b0b99acd"
]
}
'import requests
url = "https://app.tryspecter.com/api/v1/lists/people"
payload = {
"name": "My Watchlist",
"people_ids": ["per_34f8a8ad1f7497b83e821345", "per_fd73fc69269b7f4d73b79def", "per_742509725dfaa1b6b0b99acd"]
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'My Watchlist',
people_ids: [
'per_34f8a8ad1f7497b83e821345',
'per_fd73fc69269b7f4d73b79def',
'per_742509725dfaa1b6b0b99acd'
]
})
};
fetch('https://app.tryspecter.com/api/v1/lists/people', 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://app.tryspecter.com/api/v1/lists/people",
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' => 'My Watchlist',
'people_ids' => [
'per_34f8a8ad1f7497b83e821345',
'per_fd73fc69269b7f4d73b79def',
'per_742509725dfaa1b6b0b99acd'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$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://app.tryspecter.com/api/v1/lists/people"
payload := strings.NewReader("{\n \"name\": \"My Watchlist\",\n \"people_ids\": [\n \"per_34f8a8ad1f7497b83e821345\",\n \"per_fd73fc69269b7f4d73b79def\",\n \"per_742509725dfaa1b6b0b99acd\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
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://app.tryspecter.com/api/v1/lists/people")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"My Watchlist\",\n \"people_ids\": [\n \"per_34f8a8ad1f7497b83e821345\",\n \"per_fd73fc69269b7f4d73b79def\",\n \"per_742509725dfaa1b6b0b99acd\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.tryspecter.com/api/v1/lists/people")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"My Watchlist\",\n \"people_ids\": [\n \"per_34f8a8ad1f7497b83e821345\",\n \"per_fd73fc69269b7f4d73b79def\",\n \"per_742509725dfaa1b6b0b99acd\"\n ]\n}"
response = http.request(request)
puts response.read_body"a1d2434c-e089-480a-8a27-9909d2f558b4"{
"errorCode": "NO_TEAM_ADMIN",
"message": "Cannot process request without a team admin, please request a team admin is added to your account.\n"
}{
"errorCode": "API_KEY_MISSING",
"message": "No API Key was presented on the header X-API-KEY"
}{
"errorCode": "NOT_PERMITTED",
"message": "You do not have permission to access this resource."
}{
"errorCode": "<string>",
"message": "<string>"
}Authorizations
Body
application/json
Response
The ID of the list that was created
ID of the list
Example:
"a1d2434c-e089-480a-8a27-9909d2f558b4"
Was this page helpful?
⌘I