Assign a Facebook Page to a brand
curl --request POST \
--url https://api.social-api.ai/v1/platforms/facebook/logins/{loginId}/pages/{pageId}/assign \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"brand_id": "b7f9..."
}
'const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({brand_id: 'b7f9...'})
};
fetch('https://api.social-api.ai/v1/platforms/facebook/logins/{loginId}/pages/{pageId}/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/{loginId}/pages/{pageId}/assign"
payload = { "brand_id": "b7f9..." }
headers = {
"Authorization": "<api-key>",
"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": {}
}
}{
"error": {
"code": "resource.not_found",
"message": "Account not found",
"meta": {}
}
}{
"error": {
"code": "resource.not_found",
"message": "Account not found",
"meta": {}
}
}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 currently held by another brand of yours is moved to the target brand. Each brand can connect up to 5 Facebook Pages, a hard cap. Assigning beyond that limit is refused.
POST
/
platforms
/
facebook
/
logins
/
{loginId}
/
pages
/
{pageId}
/
assign
Assign a Facebook Page to a brand
curl --request POST \
--url https://api.social-api.ai/v1/platforms/facebook/logins/{loginId}/pages/{pageId}/assign \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"brand_id": "b7f9..."
}
'const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({brand_id: 'b7f9...'})
};
fetch('https://api.social-api.ai/v1/platforms/facebook/logins/{loginId}/pages/{pageId}/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/{loginId}/pages/{pageId}/assign"
payload = { "brand_id": "b7f9..." }
headers = {
"Authorization": "<api-key>",
"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": {}
}
}{
"error": {
"code": "resource.not_found",
"message": "Account not found",
"meta": {}
}
}{
"error": {
"code": "resource.not_found",
"message": "Account not found",
"meta": {}
}
}Authorizations
Prefix your API key with "Bearer ". Example: Authorization: Bearer sapi_key_...
Path Parameters
Facebook login (credential) ID
Platform page ID
Body
application/json
Target brand
Example:
"b7f9..."