curl --request POST \
--url https://api.aisa.one/apis/v1/social/accounts/{accountId}/business-partners \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"businessId": "1234567890123"
}
'import requests
url = "https://api.aisa.one/apis/v1/social/accounts/{accountId}/business-partners"
payload = { "businessId": "1234567890123" }
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({businessId: '1234567890123'})
};
fetch('https://api.aisa.one/apis/v1/social/accounts/{accountId}/business-partners', 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.aisa.one/apis/v1/social/accounts/{accountId}/business-partners",
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([
'businessId' => '1234567890123'
]),
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.aisa.one/apis/v1/social/accounts/{accountId}/business-partners"
payload := strings.NewReader("{\n \"businessId\": \"1234567890123\"\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.aisa.one/apis/v1/social/accounts/{accountId}/business-partners")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"businessId\": \"1234567890123\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aisa.one/apis/v1/social/accounts/{accountId}/business-partners")
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 \"businessId\": \"1234567890123\"\n}"
response = http.request(request)
puts response.read_body{
"alreadyShared": true,
"page": {
"business": {
"id": "<string>",
"name": "<string>"
},
"id": "<string>",
"instagramBusinessAccount": {
"id": "<string>",
"username": "<string>"
},
"name": "<string>"
},
"partner": {
"businessId": "<string>",
"permittedTasks": [
"<string>"
]
}
}{
"page": {
"business": {
"id": "<string>",
"name": "<string>"
},
"id": "<string>",
"instagramBusinessAccount": {
"id": "<string>",
"username": "<string>"
},
"name": "<string>"
},
"partner": {
"businessId": "<string>",
"permittedTasks": [
"<string>"
]
}
}{
"error": {
"code": "<string>",
"details": {},
"message": "<string>",
"param": "<string>",
"retryHint": "never",
"retryable": true,
"type": "<string>"
}
}Share the Page with a partner business
Accounts. Acts in public on your connected account; needs social:publish. Audited. Ids are yours: accounts acc_…, profiles prf_…, posts pst_…; every other object id is checked against your accounts before the call.
Grants a partner business portfolio tasks on the Facebook Page behind this account.
With ADVERTISE, the partner can run ads for the Page from ad accounts in its own portfolio. This is how an integrator advertises for an end user without touching the end user’s ad accounts.
Responses
422: the Page is outside any business portfolio. Meta only lets a user token share a Page that a portfolio owns, so claim it into one at business.facebook.com first.200withalreadyShared: trueand the tasks the partner currently holds: the portfolio already has access. Meta refuses a second grant instead of replacing its tasks.
To change a partner’s tasks, revoke and grant again.
After the grant
The partner assigns its own people to the Page with POST /apis/v1/ads/page-users; Meta does not assign partner admins automatically.
The Instagram professional account linked to the Page is returned in page so the partner can reference it. Meta exposes no API to share Instagram accounts; that is done in Business Settings.
curl --request POST \
--url https://api.aisa.one/apis/v1/social/accounts/{accountId}/business-partners \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"businessId": "1234567890123"
}
'import requests
url = "https://api.aisa.one/apis/v1/social/accounts/{accountId}/business-partners"
payload = { "businessId": "1234567890123" }
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({businessId: '1234567890123'})
};
fetch('https://api.aisa.one/apis/v1/social/accounts/{accountId}/business-partners', 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.aisa.one/apis/v1/social/accounts/{accountId}/business-partners",
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([
'businessId' => '1234567890123'
]),
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.aisa.one/apis/v1/social/accounts/{accountId}/business-partners"
payload := strings.NewReader("{\n \"businessId\": \"1234567890123\"\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.aisa.one/apis/v1/social/accounts/{accountId}/business-partners")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"businessId\": \"1234567890123\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aisa.one/apis/v1/social/accounts/{accountId}/business-partners")
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 \"businessId\": \"1234567890123\"\n}"
response = http.request(request)
puts response.read_body{
"alreadyShared": true,
"page": {
"business": {
"id": "<string>",
"name": "<string>"
},
"id": "<string>",
"instagramBusinessAccount": {
"id": "<string>",
"username": "<string>"
},
"name": "<string>"
},
"partner": {
"businessId": "<string>",
"permittedTasks": [
"<string>"
]
}
}{
"page": {
"business": {
"id": "<string>",
"name": "<string>"
},
"id": "<string>",
"instagramBusinessAccount": {
"id": "<string>",
"username": "<string>"
},
"name": "<string>"
},
"partner": {
"businessId": "<string>",
"permittedTasks": [
"<string>"
]
}
}{
"error": {
"code": "<string>",
"details": {},
"message": "<string>",
"param": "<string>",
"retryHint": "never",
"retryable": true,
"type": "<string>"
}
}Request contract
- Method and path: POST /apis/v1/social/accounts/{accountId}/business-partners
- Availability: enabled
- Request URL template:
https://api.aisa.one/apis/v1/social/accounts/{accountId}/business-partners - accountId: path; required
{
"operationId": "post_aisa_social_apis_v1_social_accounts_accounti_31b011",
"method": "POST",
"path": "/apis/v1/social/accounts/{accountId}/business-partners",
"servers": [
{
"url": "https://api.aisa.one"
}
],
"parameters": [
{
"description": "One of your social accounts (acc_...).",
"in": "path",
"name": "accountId",
"required": true,
"schema": {
"pattern": "^acc_[0-9A-Za-z]{22}$",
"type": "string"
}
}
],
"security": [
{
"bearerAuth": []
}
],
"requestBody": {
"content": {
"application/json": {
"example": {
"businessId": "1234567890123",
"permittedTasks": [
"ADVERTISE",
"ANALYZE"
]
},
"schema": {
"properties": {
"businessId": {
"description": "Meta business portfolio id of the partner (numeric string).",
"type": "string"
},
"permittedTasks": {
"description": "Tasks granted on the Page, Meta's permitted_tasks vocabulary. Defaults to ADVERTISE and ANALYZE. The bare names are what Business Settings shows; the PROFILE_PLUS_ names are the New Pages Experience tasks and the only way to grant FACEBOOK_ACCESS or REVENUE. Granting MANAGE also yields MANAGE_LEADS.",
"items": {
"enum": [
"MANAGE",
"CREATE_CONTENT",
"MODERATE",
"MESSAGING",
"ADVERTISE",
"ANALYZE",
"MODERATE_COMMUNITY",
"MANAGE_JOBS",
"PAGES_MESSAGING",
"PAGES_MESSAGING_SUBSCRIPTIONS",
"READ_PAGE_MAILBOXES",
"VIEW_MONETIZATION_INSIGHTS",
"MANAGE_LEADS",
"CASHIER_ROLE",
"GLOBAL_STRUCTURE_MANAGEMENT",
"PROFILE_PLUS_FULL_CONTROL",
"PROFILE_PLUS_MANAGE",
"PROFILE_PLUS_FACEBOOK_ACCESS",
"PROFILE_PLUS_CREATE_CONTENT",
"PROFILE_PLUS_MODERATE",
"PROFILE_PLUS_MODERATE_DELEGATE_COMMUNITY",
"PROFILE_PLUS_MESSAGING",
"PROFILE_PLUS_ADVERTISE",
"PROFILE_PLUS_ANALYZE",
"PROFILE_PLUS_REVENUE",
"PROFILE_PLUS_MANAGE_LEADS",
"PROFILE_PLUS_CREATIVE_MANAGEMENT",
"PROFILE_PLUS_CREATOR_MANAGEMENT",
"PROFILE_PLUS_GLOBAL_STRUCTURE_MANAGEMENT"
],
"type": "string"
},
"type": "array"
}
},
"required": [
"businessId"
],
"type": "object"
}
}
},
"required": true
},
"x-aisa-status": "enabled",
"components": {
"securitySchemes": {
"bearerAuth": {
"scheme": "bearer",
"type": "http"
}
}
}
}
Cost and request rules
No additional charge for this operation.Authorizations
Path Parameters
Body
Tasks granted on the Page, Meta's permitted_tasks vocabulary. Defaults to ADVERTISE and ANALYZE. The bare names are what Business Settings shows; the PROFILE_PLUS_ names are the New Pages Experience tasks and the only way to grant FACEBOOK_ACCESS or REVENUE. Granting MANAGE also yields MANAGE_LEADS.
MANAGE, CREATE_CONTENT, MODERATE, MESSAGING, ADVERTISE, ANALYZE, MODERATE_COMMUNITY, MANAGE_JOBS, PAGES_MESSAGING, PAGES_MESSAGING_SUBSCRIPTIONS, READ_PAGE_MAILBOXES, VIEW_MONETIZATION_INSIGHTS, MANAGE_LEADS, CASHIER_ROLE, GLOBAL_STRUCTURE_MANAGEMENT, PROFILE_PLUS_FULL_CONTROL, PROFILE_PLUS_MANAGE, PROFILE_PLUS_FACEBOOK_ACCESS, PROFILE_PLUS_CREATE_CONTENT, PROFILE_PLUS_MODERATE, PROFILE_PLUS_MODERATE_DELEGATE_COMMUNITY, PROFILE_PLUS_MESSAGING, PROFILE_PLUS_ADVERTISE, PROFILE_PLUS_ANALYZE, PROFILE_PLUS_REVENUE, PROFILE_PLUS_MANAGE_LEADS, PROFILE_PLUS_CREATIVE_MANAGEMENT, PROFILE_PLUS_CREATOR_MANAGEMENT, PROFILE_PLUS_GLOBAL_STRUCTURE_MANAGEMENT