Assign a Facebook Page to a brand
curl --request POST \
--url https://api.social-api.ai/v1/platforms/facebook/logins/{login_id}/pages/{page_id}/assign \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"brand_id": "b7f9..."
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({brand_id: 'b7f9...'})
};
fetch('https://api.social-api.ai/v1/platforms/facebook/logins/{login_id}/pages/{page_id}/assign', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.social-api.ai/v1/platforms/facebook/logins/{login_id}/pages/{page_id}/assign"
payload = { "brand_id": "b7f9..." }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"account_id": "acc_01J...",
"brand_id": "<string>",
"platform_page_id": "<string>"
}{
"error": {
"code": "resource.not_found",
"message": "Account not found",
"meta": {}
},
"request_id": "01HZ9X3Q4R5M6N7P8V2K0W1J"
}{
"error": {
"code": "resource.not_found",
"message": "Account not found",
"meta": {}
},
"request_id": "01HZ9X3Q4R5M6N7P8V2K0W1J"
}{
"error": {
"code": "resource.not_found",
"message": "Account not found",
"meta": {}
},
"request_id": "01HZ9X3Q4R5M6N7P8V2K0W1J"
}{
"error": {
"code": "resource.not_found",
"message": "Account not found",
"meta": {}
},
"request_id": "01HZ9X3Q4R5M6N7P8V2K0W1J"
}Facebook
Assign a Facebook Page to a brand
Assigns one Page from this login to the given brand. Each Page belongs to exactly one brand, so a Page another of your brands holds moves to the target brand. When facebook_page_selection is true, assigning beyond your plan’s Facebook Pages per brand returns 403 platform.facebook.page_cap. A brand-restricted key can only move Pages held by brands on its list: any other Page returns 400 validation.page_not_granted.
POST
/
platforms
/
facebook
/
logins
/
{login_id}
/
pages
/
{page_id}
/
assign
Assign a Facebook Page to a brand
curl --request POST \
--url https://api.social-api.ai/v1/platforms/facebook/logins/{login_id}/pages/{page_id}/assign \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"brand_id": "b7f9..."
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({brand_id: 'b7f9...'})
};
fetch('https://api.social-api.ai/v1/platforms/facebook/logins/{login_id}/pages/{page_id}/assign', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.social-api.ai/v1/platforms/facebook/logins/{login_id}/pages/{page_id}/assign"
payload = { "brand_id": "b7f9..." }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"account_id": "acc_01J...",
"brand_id": "<string>",
"platform_page_id": "<string>"
}{
"error": {
"code": "resource.not_found",
"message": "Account not found",
"meta": {}
},
"request_id": "01HZ9X3Q4R5M6N7P8V2K0W1J"
}{
"error": {
"code": "resource.not_found",
"message": "Account not found",
"meta": {}
},
"request_id": "01HZ9X3Q4R5M6N7P8V2K0W1J"
}{
"error": {
"code": "resource.not_found",
"message": "Account not found",
"meta": {}
},
"request_id": "01HZ9X3Q4R5M6N7P8V2K0W1J"
}{
"error": {
"code": "resource.not_found",
"message": "Account not found",
"meta": {}
},
"request_id": "01HZ9X3Q4R5M6N7P8V2K0W1J"
}