curl --request POST \
--url https://api.adspo.co/v1/groups/{group_id}/brands \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"brand_id": "15087023444"
}
'import requests
url = "https://api.adspo.co/v1/groups/{group_id}/brands"
payload = { "brand_id": "15087023444" }
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({brand_id: '15087023444'})
};
fetch('https://api.adspo.co/v1/groups/{group_id}/brands', 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.adspo.co/v1/groups/{group_id}/brands",
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([
'brand_id' => '15087023444'
]),
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://api.adspo.co/v1/groups/{group_id}/brands"
payload := strings.NewReader("{\n \"brand_id\": \"15087023444\"\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://api.adspo.co/v1/groups/{group_id}/brands")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"brand_id\": \"15087023444\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.adspo.co/v1/groups/{group_id}/brands")
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 \"brand_id\": \"15087023444\"\n}"
response = http.request(request)
puts response.read_body{
"group_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"brand_id": "<string>",
"brand_name": "<string>",
"workspace_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"already_followed": true,
"already_in_group": true
}{
"group_id": "5b9f3c2e-8d41-4e6a-9a57-2f1c0d7e8b44",
"brand_id": "15087023444",
"brand_name": "Nike",
"workspace_id": null,
"already_followed": true,
"already_in_group": false
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "Follow limit reached: at most 30 follows per minute."
}{
"error": "<string>"
}Add brand to group
Adds a brand to one of your groups, like adding it to a group in the app. If the brand isn’t followed in the group’s workspace yet, it’s followed too.
Only brands already in Adspo can be added: find them with Search brands.
The follow is yours: the key’s owner, or through the MCP, the person who connected it. Adding a brand that’s already in the group returns 200 with already_in_group: true and is free, as are requests that fail. Adding a new one returns 201 and costs 1 credit, including following it if needed. It counts towards the follow limit of 30 a minute per person.
curl --request POST \
--url https://api.adspo.co/v1/groups/{group_id}/brands \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"brand_id": "15087023444"
}
'import requests
url = "https://api.adspo.co/v1/groups/{group_id}/brands"
payload = { "brand_id": "15087023444" }
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({brand_id: '15087023444'})
};
fetch('https://api.adspo.co/v1/groups/{group_id}/brands', 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.adspo.co/v1/groups/{group_id}/brands",
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([
'brand_id' => '15087023444'
]),
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://api.adspo.co/v1/groups/{group_id}/brands"
payload := strings.NewReader("{\n \"brand_id\": \"15087023444\"\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://api.adspo.co/v1/groups/{group_id}/brands")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"brand_id\": \"15087023444\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.adspo.co/v1/groups/{group_id}/brands")
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 \"brand_id\": \"15087023444\"\n}"
response = http.request(request)
puts response.read_body{
"group_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"brand_id": "<string>",
"brand_name": "<string>",
"workspace_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"already_followed": true,
"already_in_group": true
}{
"group_id": "5b9f3c2e-8d41-4e6a-9a57-2f1c0d7e8b44",
"brand_id": "15087023444",
"brand_name": "Nike",
"workspace_id": null,
"already_followed": true,
"already_in_group": false
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "Follow limit reached: at most 30 follows per minute."
}{
"error": "<string>"
}Authorizations
Your Adspo API key.
Path Parameters
The group's ID, from Get groups.
Body
The brand's Facebook Ad Library page ID, from Search brands.
Response
Already in the group. Nothing changed, and no credit was used.
Facebook Ad Library page ID.
The group's workspace. null for the default workspace.
Whether the brand was already followed in the group's workspace, by you or your team.
Whether the brand was already in the group.