Graph API Version

User Businesses

Reading

UserBusinesses

Example

Graph API Explorer
GET /v5.0/{user-id}/businesses HTTP/1.1
Host: graph.facebook.com
/* PHP SDK v5.0.0 */
/* make the API call */
try {
  // Returns a `Facebook\FacebookResponse` object
  $response = $fb->get(
    '/{user-id}/businesses',
    '{access-token}'
  );
} catch(Facebook\Exceptions\FacebookResponseException $e) {
  echo 'Graph returned an error: ' . $e->getMessage();
  exit;
} catch(Facebook\Exceptions\FacebookSDKException $e) {
  echo 'Facebook SDK returned an error: ' . $e->getMessage();
  exit;
}
$graphNode = $response->getGraphNode();
/* handle the result */
/* make the API call */
FB.api(
    "/{user-id}/businesses",
    function (response) {
      if (response && !response.error) {
        /* handle the result */
      }
    }
);
/* make the API call */
new GraphRequest(
    AccessToken.getCurrentAccessToken(),
    "/{user-id}/businesses",
    null,
    HttpMethod.GET,
    new GraphRequest.Callback() {
        public void onCompleted(GraphResponse response) {
            /* handle the result */
        }
    }
).executeAsync();
// For more complex open graph stories, use `FBSDKShareAPI`
// with `FBSDKShareOpenGraphContent`
/* make the API call */
FBSDKGraphRequest *request = [[FBSDKGraphRequest alloc]
                               initWithGraphPath:@"/{user-id}/businesses"
                                      parameters:params
                                      HTTPMethod:@"GET"];
[request startWithCompletionHandler:^(FBSDKGraphRequestConnection *connection,
                                      id result,
                                      NSError *error) {
    // Handle the result
}];
If you want to learn how to use the Graph API, read our Using Graph API guide.

Parameters

This endpoint doesn't have any parameters.

Fields

Reading from this edge will return a JSON formatted result:

{ "data": [], "paging": {} }

data

A list of Business nodes.

The following fields will be added to each node that is returned:

FieldDescription
permitted_roles
list<string>

Roles the user has on the business

paging

For more details about pagination, see the Graph API guide.

Validation Rules

ErrorDescription
200Permissions error
100Invalid parameter
110Invalid user id
190Invalid OAuth 2.0 Access Token

Creating

You can make a POST request to businesses edge from the following paths:
When posting to this edge, a Business will be created.

Parameters

ParameterDescription
email
string

The business email of the business admin

name
string

Username

Required
primary_page
page ID

Primary Page ID

sales_rep_email
string

Sales Rep email address

survey_business_type
enum {AGENCY, ADVERTISER, APP_DEVELOPER, PUBLISHER}

Business Type

survey_num_assets
int64

Number of Assets in the business

survey_num_people
int64

Number of People that will work on the business

timezone_id
int64

Timezone ID

vertical
enum {ADVERTISING, AUTOMOTIVE, CONSUMER_PACKAGED_GOODS, ECOMMERCE, EDUCATION, ENERGY_AND_UTILITIES, ENTERTAINMENT_AND_MEDIA, FINANCIAL_SERVICES, GAMING, GOVERNMENT_AND_POLITICS, MARKETING, ORGANIZATIONS_AND_ASSOCIATIONS, PROFESSIONAL_SERVICES, RETAIL, TECHNOLOGY, TELECOM, TRAVEL, NON_PROFIT, RESTAURANT, HEALTH, LUXURY, OTHER}

Vertical ID

Required

Return Type

This endpoint supports read-after-write and will read the node represented by id in the return type.
Struct {
id: numeric string,
}

Validation Rules

ErrorDescription
3947You are trying to create a Business Manager with the same name as one you are already a part of. Please pick a different name.
100Invalid parameter
3918The Facebook Page you've tried to add is already owned by another Business Manager. You can still request access to this Page, but your request will need to be approved by the Business Manager that owns it.
42000This Page can't be added because it's already linked to an Instagram business profile. To add this Page to Business Manager, go to Instagram and convert to a personal account or change the Page linked to your business profile.
3913It doesn't look like you have permission to create a new Business Manager.
3974The name you chose for this Business Manager is not valid. Try a different name.
3992Your payment account is disabled.
200Permissions error
3973The name you chose for this Business Manager is not valid. Please choose another.
3998You must be an admin of the primary Page to create a business using that page.

Updating

You can't perform this operation on this endpoint.

Deleting

You can dissociate a User from a User by making a DELETE request to /{user_id}/businesses.

Parameters

ParameterDescription
business
numeric string or integer

SELF_EXPLANATORY

Return Type

Struct {
success: bool,
}

Validation Rules

ErrorDescription
3914It looks like you're trying to remove the last admin from this Business Manager. At least one admin is required in Business Manager.
275Cannot determine the target object for this request. Currently supported objects include ad account, business account and associated objects.
294Managing advertisements requires an access token with the extended permission for ads_management
100Invalid parameter