Assign a Google Business Profile location to a brand
curl --request POST \
--url https://api.social-api.ai/v1/platforms/google/logins/{loginId}/locations/{locationId}/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/google/logins/{loginId}/locations/{locationId}/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/google/logins/{loginId}/locations/{locationId}/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_account_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": {}
}
}Google
Assign a Google Business Profile location to a brand
Assigns one location from this login to the given brand, without re-doing OAuth. Each location belongs to exactly one brand, and each brand holds at most one Google Business Profile.
POST
/
platforms
/
google
/
logins
/
{loginId}
/
locations
/
{locationId}
/
assign
Assign a Google Business Profile location to a brand
curl --request POST \
--url https://api.social-api.ai/v1/platforms/google/logins/{loginId}/locations/{locationId}/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/google/logins/{loginId}/locations/{locationId}/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/google/logins/{loginId}/locations/{locationId}/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_account_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
Google login (credential) ID
Location resource name (URL-encoded), e.g. accounts%2F123%2Flocations%2F456
Body
application/json
Target brand
Example:
"b7f9..."