Create company list
curl --request POST \
--url https://app.tryspecter.com/api/v1/lists/companies \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"name": "My Watchlist",
"company_ids": [
"5e3bc2b700c8f4c966ad2bbd",
"5e3bc1b900c8f4c966a99aaa",
"620b43e6d1fb898462f893b8"
]
}
'import requests
url = "https://app.tryspecter.com/api/v1/lists/companies"
payload = {
"name": "My Watchlist",
"company_ids": ["5e3bc2b700c8f4c966ad2bbd", "5e3bc1b900c8f4c966a99aaa", "620b43e6d1fb898462f893b8"]
}
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',
company_ids: [
'5e3bc2b700c8f4c966ad2bbd',
'5e3bc1b900c8f4c966a99aaa',
'620b43e6d1fb898462f893b8'
]
})
};
fetch('https://app.tryspecter.com/api/v1/lists/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://app.tryspecter.com/api/v1/lists/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' => 'My Watchlist',
'company_ids' => [
'5e3bc2b700c8f4c966ad2bbd',
'5e3bc1b900c8f4c966a99aaa',
'620b43e6d1fb898462f893b8'
]
]),
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/companies"
payload := strings.NewReader("{\n \"name\": \"My Watchlist\",\n \"company_ids\": [\n \"5e3bc2b700c8f4c966ad2bbd\",\n \"5e3bc1b900c8f4c966a99aaa\",\n \"620b43e6d1fb898462f893b8\"\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/companies")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"My Watchlist\",\n \"company_ids\": [\n \"5e3bc2b700c8f4c966ad2bbd\",\n \"5e3bc1b900c8f4c966a99aaa\",\n \"620b43e6d1fb898462f893b8\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.tryspecter.com/api/v1/lists/companies")
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 \"company_ids\": [\n \"5e3bc2b700c8f4c966ad2bbd\",\n \"5e3bc1b900c8f4c966a99aaa\",\n \"620b43e6d1fb898462f893b8\"\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": "LIST_NAME_TAKEN",
"message": "A company list with that name already exists for this user. Choose a different name."
}{
"errorCode": "<string>",
"message": "<string>"
}Company Lists
Create company list
Creates a new company 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 company IDs to seed it.
Behaviour
- Pass
name(required); it must be unique. - Optionally seed the list with
company_ids. - Set
is_publicto share the list with your team. - Add companies later via Update company list.
- The list owner is the first team admin on the account.
What you do next
- Add or remove companies. Update membership with Update company list.
- Pull the list. Get its companies with Get company list results.
POST
/
lists
/
companies
Create company list
curl --request POST \
--url https://app.tryspecter.com/api/v1/lists/companies \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"name": "My Watchlist",
"company_ids": [
"5e3bc2b700c8f4c966ad2bbd",
"5e3bc1b900c8f4c966a99aaa",
"620b43e6d1fb898462f893b8"
]
}
'import requests
url = "https://app.tryspecter.com/api/v1/lists/companies"
payload = {
"name": "My Watchlist",
"company_ids": ["5e3bc2b700c8f4c966ad2bbd", "5e3bc1b900c8f4c966a99aaa", "620b43e6d1fb898462f893b8"]
}
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',
company_ids: [
'5e3bc2b700c8f4c966ad2bbd',
'5e3bc1b900c8f4c966a99aaa',
'620b43e6d1fb898462f893b8'
]
})
};
fetch('https://app.tryspecter.com/api/v1/lists/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://app.tryspecter.com/api/v1/lists/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' => 'My Watchlist',
'company_ids' => [
'5e3bc2b700c8f4c966ad2bbd',
'5e3bc1b900c8f4c966a99aaa',
'620b43e6d1fb898462f893b8'
]
]),
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/companies"
payload := strings.NewReader("{\n \"name\": \"My Watchlist\",\n \"company_ids\": [\n \"5e3bc2b700c8f4c966ad2bbd\",\n \"5e3bc1b900c8f4c966a99aaa\",\n \"620b43e6d1fb898462f893b8\"\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/companies")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"My Watchlist\",\n \"company_ids\": [\n \"5e3bc2b700c8f4c966ad2bbd\",\n \"5e3bc1b900c8f4c966a99aaa\",\n \"620b43e6d1fb898462f893b8\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.tryspecter.com/api/v1/lists/companies")
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 \"company_ids\": [\n \"5e3bc2b700c8f4c966ad2bbd\",\n \"5e3bc1b900c8f4c966a99aaa\",\n \"620b43e6d1fb898462f893b8\"\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": "LIST_NAME_TAKEN",
"message": "A company list with that name already exists for this user. Choose a different name."
}{
"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