Add competitors
curl --request POST \
--url https://api.spreadjam.com/v1/brand/competitors \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"competitors": [
"Profound",
{
"name": "Athena",
"domain": "athenahq.ai",
"aliases": [
"AthenaHQ"
]
}
]
}
'import requests
url = "https://api.spreadjam.com/v1/brand/competitors"
payload = { "competitors": [
"Profound",
{
"name": "Athena",
"domain": "athenahq.ai",
"aliases": ["AthenaHQ"]
}
] }
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({
competitors: ['Profound', {name: 'Athena', domain: 'athenahq.ai', aliases: ['AthenaHQ']}]
})
};
fetch('https://api.spreadjam.com/v1/brand/competitors', 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.spreadjam.com/v1/brand/competitors",
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([
'competitors' => [
'Profound',
[
'name' => 'Athena',
'domain' => 'athenahq.ai',
'aliases' => [
'AthenaHQ'
]
]
]
]),
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.spreadjam.com/v1/brand/competitors"
payload := strings.NewReader("{\n \"competitors\": [\n \"Profound\",\n {\n \"name\": \"Athena\",\n \"domain\": \"athenahq.ai\",\n \"aliases\": [\n \"AthenaHQ\"\n ]\n }\n ]\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.spreadjam.com/v1/brand/competitors")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"competitors\": [\n \"Profound\",\n {\n \"name\": \"Athena\",\n \"domain\": \"athenahq.ai\",\n \"aliases\": [\n \"AthenaHQ\"\n ]\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.spreadjam.com/v1/brand/competitors")
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 \"competitors\": [\n \"Profound\",\n {\n \"name\": \"Athena\",\n \"domain\": \"athenahq.ai\",\n \"aliases\": [\n \"AthenaHQ\"\n ]\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"changed": [
"<string>"
],
"competitors": [
"<string>"
],
"pinned": true,
"roster": [
{
"name": "<string>",
"domain": "<string>",
"aliases": [
"<string>"
]
}
]
}{
"error": "<string>",
"code": "<string>",
"requestId": "<string>",
"docs": "<string>",
"resolveUrl": "<string>",
"details": [
{}
]
}{
"error": "<string>",
"code": "<string>",
"requestId": "<string>",
"docs": "<string>",
"resolveUrl": "<string>",
"details": [
{}
]
}{
"error": "<string>",
"code": "<string>",
"requestId": "<string>",
"docs": "<string>",
"resolveUrl": "<string>",
"details": [
{}
]
}{
"error": "<string>",
"code": "<string>",
"requestId": "<string>",
"docs": "<string>",
"resolveUrl": "<string>",
"details": [
{}
]
}{
"error": "<string>",
"code": "<string>",
"requestId": "<string>",
"docs": "<string>",
"resolveUrl": "<string>",
"details": [
{}
]
}Brand
Add competitors
Add one or more competitors to the tracked list, keeping the ones already on it, and pin the list. Each is a name or { name, domain?, aliases? }; the domain and other names are what answers are matched to from the next scan on. Names already on the list are not added twice (their domain and aliases are updated when sent). Acts on the active project. Requires a paid plan.
POST
/
v1
/
brand
/
competitors
Add competitors
curl --request POST \
--url https://api.spreadjam.com/v1/brand/competitors \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"competitors": [
"Profound",
{
"name": "Athena",
"domain": "athenahq.ai",
"aliases": [
"AthenaHQ"
]
}
]
}
'import requests
url = "https://api.spreadjam.com/v1/brand/competitors"
payload = { "competitors": [
"Profound",
{
"name": "Athena",
"domain": "athenahq.ai",
"aliases": ["AthenaHQ"]
}
] }
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({
competitors: ['Profound', {name: 'Athena', domain: 'athenahq.ai', aliases: ['AthenaHQ']}]
})
};
fetch('https://api.spreadjam.com/v1/brand/competitors', 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.spreadjam.com/v1/brand/competitors",
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([
'competitors' => [
'Profound',
[
'name' => 'Athena',
'domain' => 'athenahq.ai',
'aliases' => [
'AthenaHQ'
]
]
]
]),
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.spreadjam.com/v1/brand/competitors"
payload := strings.NewReader("{\n \"competitors\": [\n \"Profound\",\n {\n \"name\": \"Athena\",\n \"domain\": \"athenahq.ai\",\n \"aliases\": [\n \"AthenaHQ\"\n ]\n }\n ]\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.spreadjam.com/v1/brand/competitors")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"competitors\": [\n \"Profound\",\n {\n \"name\": \"Athena\",\n \"domain\": \"athenahq.ai\",\n \"aliases\": [\n \"AthenaHQ\"\n ]\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.spreadjam.com/v1/brand/competitors")
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 \"competitors\": [\n \"Profound\",\n {\n \"name\": \"Athena\",\n \"domain\": \"athenahq.ai\",\n \"aliases\": [\n \"AthenaHQ\"\n ]\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"changed": [
"<string>"
],
"competitors": [
"<string>"
],
"pinned": true,
"roster": [
{
"name": "<string>",
"domain": "<string>",
"aliases": [
"<string>"
]
}
]
}{
"error": "<string>",
"code": "<string>",
"requestId": "<string>",
"docs": "<string>",
"resolveUrl": "<string>",
"details": [
{}
]
}{
"error": "<string>",
"code": "<string>",
"requestId": "<string>",
"docs": "<string>",
"resolveUrl": "<string>",
"details": [
{}
]
}{
"error": "<string>",
"code": "<string>",
"requestId": "<string>",
"docs": "<string>",
"resolveUrl": "<string>",
"details": [
{}
]
}{
"error": "<string>",
"code": "<string>",
"requestId": "<string>",
"docs": "<string>",
"resolveUrl": "<string>",
"details": [
{}
]
}{
"error": "<string>",
"code": "<string>",
"requestId": "<string>",
"docs": "<string>",
"resolveUrl": "<string>",
"details": [
{}
]
}Authorizations
Body
application/json
Competitors to add: a name (a domain is fine), or { name, domain?, aliases? }. Sending one already on the list with a domain or aliases updates them.
Required array length:
1 - 50 elementsRequired string length:
1 - 200Example:
[ "Profound", { "name": "Athena", "domain": "athenahq.ai", "aliases": ["AthenaHQ"] } ]
Response
The list after the add.